diff --git a/components/docs-src/src/docs/config.js b/components/docs-src/src/docs/config.js index 33fb36891..82502b482 100644 --- a/components/docs-src/src/docs/config.js +++ b/components/docs-src/src/docs/config.js @@ -12,7 +12,8 @@ const config = { list: [ { name: 'Button 按钮', md: 'button' }, { name: 'Tabs 选项卡', md: 'tabs' }, - { name: 'Radio 单选框', md: 'radio' } + { name: 'Radio 单选框', md: 'radio' }, + { name: 'Link 文字链接', md: 'link' } ] } @@ -29,7 +30,8 @@ const config = { list: [ { name: 'Button', md: 'button' }, { name: 'Tabs', md: 'tabs' }, - { name: 'Radio', md: 'radio' } + { name: 'Radio', md: 'radio' }, + { name: 'Link', md: 'link' } ] } ] diff --git a/components/docs-src/src/docs/en/link.md b/components/docs-src/src/docs/en/link.md new file mode 100644 index 000000000..af0e6acd7 --- /dev/null +++ b/components/docs-src/src/docs/en/link.md @@ -0,0 +1,56 @@ +## Link + +Used to jump to a new page. + + + +## Import + +```js +import '@omiu/link' +``` + +Or use script tag to ref it. + + +```html + +``` + +## Usage + +```html + + Default + +``` + + +## API + +### Props + +```jsx +{ + type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'; + disabled?: boolean; + underline?: boolean; + href?: string; + target: string; +} +``` + +### defaultProps + +```jsx +{ + underline: true, + disabled: false +} +``` + diff --git a/components/docs-src/src/docs/en/radio.md b/components/docs-src/src/docs/en/radio.md index 253e7b8ee..9df303f0e 100644 --- a/components/docs-src/src/docs/en/radio.md +++ b/components/docs-src/src/docs/en/radio.md @@ -48,3 +48,7 @@ Or use script tag to ref it. name?: string; } ``` + +## Event + +* change diff --git a/components/docs-src/src/docs/en/tabs.md b/components/docs-src/src/docs/en/tabs.md index 64a73dd2f..e710aacaa 100644 --- a/components/docs-src/src/docs/en/tabs.md +++ b/components/docs-src/src/docs/en/tabs.md @@ -54,3 +54,9 @@ Or use script tag to ref it. addable: boolean; } ``` + +### Event + +* change +* remove +* addIconClick diff --git a/components/docs-src/src/docs/zh-cn/link.md b/components/docs-src/src/docs/zh-cn/link.md new file mode 100644 index 000000000..e44942ecd --- /dev/null +++ b/components/docs-src/src/docs/zh-cn/link.md @@ -0,0 +1,55 @@ +## Link 文字链接 + +用于跳转到新的页面。 + + + +## 导入 + +```js +import '@omiu/link' +``` + +或者直接 script 标签引入。 + + +```html + +``` + +## 使用 + +```html + + Default + +``` + + +## API + +### 属性 + +```jsx +{ + type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'; + disabled?: boolean; + underline?: boolean; + href?: string; + target: string; +} +``` + +### 属性默认值 + +```jsx +{ + underline: true, + disabled: false +} +``` diff --git a/components/docs-src/src/docs/zh-cn/radio.md b/components/docs-src/src/docs/zh-cn/radio.md index d8bfb50a3..fc185e362 100644 --- a/components/docs-src/src/docs/zh-cn/radio.md +++ b/components/docs-src/src/docs/zh-cn/radio.md @@ -49,3 +49,7 @@ import '@omiu/radio' name?: string; } ``` + +## 事件 + +* change diff --git a/components/docs-src/src/docs/zh-cn/tabs.md b/components/docs-src/src/docs/zh-cn/tabs.md index 0d103169f..bbb90ea4d 100644 --- a/components/docs-src/src/docs/zh-cn/tabs.md +++ b/components/docs-src/src/docs/zh-cn/tabs.md @@ -54,3 +54,9 @@ import '@omiu/tabs' addable: boolean; } ``` + +### 事件 + +* change +* remove +* addIconClick diff --git a/components/docs/asset-manifest.json b/components/docs/asset-manifest.json index 94930edd9..2ee34c9d4 100644 --- a/components/docs/asset-manifest.json +++ b/components/docs/asset-manifest.json @@ -1,27 +1,31 @@ { "cn.css": "static/css/cn.0726442c.css", "cn.css.map": "static/css/cn.0726442c.css.map", - "cn.js": "static/js/cn.5a79e36c.js", - "cn.js.map": "static/js/cn.5a79e36c.js.map", + "cn.js": "static/js/cn.4e3e7d7c.js", + "cn.js.map": "static/js/cn.4e3e7d7c.js.map", "index.css": "static/css/index.0726442c.css", "index.css.map": "static/css/index.0726442c.css.map", - "index.js": "static/js/index.00ca5bbb.js", - "index.js.map": "static/js/index.00ca5bbb.js.map", - "static/js/0.13eeb66f.chunk.js": "static/js/0.13eeb66f.chunk.js", - "static/js/0.13eeb66f.chunk.js.map": "static/js/0.13eeb66f.chunk.js.map", - "static/js/1.33c193a5.chunk.js": "static/js/1.33c193a5.chunk.js", - "static/js/1.33c193a5.chunk.js.map": "static/js/1.33c193a5.chunk.js.map", - "static/js/2.772150e4.chunk.js": "static/js/2.772150e4.chunk.js", - "static/js/2.772150e4.chunk.js.map": "static/js/2.772150e4.chunk.js.map", - "static/js/3.34382a2c.chunk.js": "static/js/3.34382a2c.chunk.js", - "static/js/3.34382a2c.chunk.js.map": "static/js/3.34382a2c.chunk.js.map", - "static/js/4.9c41210c.chunk.js": "static/js/4.9c41210c.chunk.js", - "static/js/4.9c41210c.chunk.js.map": "static/js/4.9c41210c.chunk.js.map", - "static/js/5.f722827c.chunk.js": "static/js/5.f722827c.chunk.js", - "static/js/5.f722827c.chunk.js.map": "static/js/5.f722827c.chunk.js.map", - "static/js/6.45670996.chunk.js": "static/js/6.45670996.chunk.js", - "static/js/6.45670996.chunk.js.map": "static/js/6.45670996.chunk.js.map", - "static/js/7.32912d9d.chunk.js": "static/js/7.32912d9d.chunk.js", - "static/js/7.32912d9d.chunk.js.map": "static/js/7.32912d9d.chunk.js.map", + "index.js": "static/js/index.10e894a1.js", + "index.js.map": "static/js/index.10e894a1.js.map", + "static/js/0.95041a35.chunk.js": "static/js/0.95041a35.chunk.js", + "static/js/0.95041a35.chunk.js.map": "static/js/0.95041a35.chunk.js.map", + "static/js/1.f987edc1.chunk.js": "static/js/1.f987edc1.chunk.js", + "static/js/1.f987edc1.chunk.js.map": "static/js/1.f987edc1.chunk.js.map", + "static/js/2.b9127839.chunk.js": "static/js/2.b9127839.chunk.js", + "static/js/2.b9127839.chunk.js.map": "static/js/2.b9127839.chunk.js.map", + "static/js/3.b254f421.chunk.js": "static/js/3.b254f421.chunk.js", + "static/js/3.b254f421.chunk.js.map": "static/js/3.b254f421.chunk.js.map", + "static/js/4.e453c730.chunk.js": "static/js/4.e453c730.chunk.js", + "static/js/4.e453c730.chunk.js.map": "static/js/4.e453c730.chunk.js.map", + "static/js/5.27178524.chunk.js": "static/js/5.27178524.chunk.js", + "static/js/5.27178524.chunk.js.map": "static/js/5.27178524.chunk.js.map", + "static/js/6.f16710ba.chunk.js": "static/js/6.f16710ba.chunk.js", + "static/js/6.f16710ba.chunk.js.map": "static/js/6.f16710ba.chunk.js.map", + "static/js/7.444bd37f.chunk.js": "static/js/7.444bd37f.chunk.js", + "static/js/7.444bd37f.chunk.js.map": "static/js/7.444bd37f.chunk.js.map", + "static/js/8.e9d5cd23.chunk.js": "static/js/8.e9d5cd23.chunk.js", + "static/js/8.e9d5cd23.chunk.js.map": "static/js/8.e9d5cd23.chunk.js.map", + "static/js/9.e4b040ab.chunk.js": "static/js/9.e4b040ab.chunk.js", + "static/js/9.e4b040ab.chunk.js.map": "static/js/9.e4b040ab.chunk.js.map", "static/media/omi-logo2019.svg": "static/media/omi-logo2019.923166c3.svg" } \ No newline at end of file diff --git a/components/docs/cn.html b/components/docs/cn.html index 11a1f9a57..a8c70598d 100644 --- a/components/docs/cn.html +++ b/components/docs/cn.html @@ -1 +1 @@ -OMIU - Cross-Frameworks UI Framework
\ No newline at end of file +OMIU - Cross-Frameworks UI Framework
\ No newline at end of file diff --git a/components/docs/index.html b/components/docs/index.html index 87a3255a1..51553ebc1 100644 --- a/components/docs/index.html +++ b/components/docs/index.html @@ -1 +1 @@ -OMIU - Cross-Frameworks UI Framework
\ No newline at end of file +OMIU - Cross-Frameworks UI Framework
\ No newline at end of file diff --git a/components/docs/service-worker.js b/components/docs/service-worker.js index 2c59e8a74..6b48dd140 100644 --- a/components/docs/service-worker.js +++ b/components/docs/service-worker.js @@ -1 +1 @@ -"use strict";var precacheConfig=[["./cn.html","61615282754f7d21c49d8e6d6ce47bd0"],["./index.html","e5c1e8a7f08b2468fc9205210b7e2a06"],["./static/css/cn.0726442c.css","10d0b9d602b3b657c55a1385c1844c28"],["./static/css/index.0726442c.css","2767bdf2b32295812e42d9d1a0293da3"],["./static/js/0.13eeb66f.chunk.js","a55675df3303c5e113d93b19a79b44ca"],["./static/js/1.33c193a5.chunk.js","97efa988bf7c61685d50540bd93cc4a3"],["./static/js/2.772150e4.chunk.js","531f8dd434cf9a4a4be7e92ce51e0fdb"],["./static/js/3.34382a2c.chunk.js","40aa4e165b20c0a1dc69f341ea21e1ae"],["./static/js/4.9c41210c.chunk.js","62f172dbf3acdc558f1d16b84e9cc290"],["./static/js/5.f722827c.chunk.js","4ef8cc32f00e8d6c11b04b4f7cc3be19"],["./static/js/6.45670996.chunk.js","905df829a45f2bf8f6e1391c61e1dfde"],["./static/js/7.32912d9d.chunk.js","cef33c57fa739733b728c2ae528ded5d"],["./static/js/cn.5a79e36c.js","6a053473e7734a3050e2519b7bf2e683"],["./static/js/index.00ca5bbb.js","c013ccbc1ac10f401093b3889d96d2e8"],["./static/media/omi-logo2019.923166c3.svg","923166c362dce831a15c447b19a622f9"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(t){return t.redirected?("body"in t?Promise.resolve(t.body):t.blob()).then(function(e){return new Response(e,{headers:t.headers,status:t.status,statusText:t.statusText})}):Promise.resolve(t)},createCacheKey=function(e,t,n,c){var a=new URL(e);return c&&a.pathname.match(c)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,n){var t=new URL(e);return t.hash="",t.search=t.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(t){return n.every(function(e){return!e.test(t[0])})}).map(function(e){return e.join("=")}).join("&"),t.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],c=new URL(t,self.location),a=createCacheKey(c,hashParamName,n,/\.\w{8}\./);return[c.toString(),a]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(c){return setOfCachedUrls(c).then(function(n){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(t){if(!n.has(t)){var e=new Request(t,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+t+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return c.put(t,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var n=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(t){return t.keys().then(function(e){return Promise.all(e.map(function(e){if(!n.has(e.url))return t.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(t){if("GET"===t.request.method){var e,n=stripIgnoredUrlParameters(t.request.url,ignoreUrlParametersMatching),c="index.html";(e=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,c),e=urlsToCacheKeys.has(n));var a="./index.html";!e&&"navigate"===t.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],t.request.url)&&(n=new URL(a,self.location).toString(),e=urlsToCacheKeys.has(n)),e&&t.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',t.request.url,e),fetch(t.request)}))}}); \ No newline at end of file +"use strict";var precacheConfig=[["./cn.html","219197dbd4cd25c4311b0ae98c47e06e"],["./index.html","2a9a47bb099141417f63f065980e3cd3"],["./static/css/cn.0726442c.css","10d0b9d602b3b657c55a1385c1844c28"],["./static/css/index.0726442c.css","2767bdf2b32295812e42d9d1a0293da3"],["./static/js/0.95041a35.chunk.js","f2ef9d81d0847280f2d65e36cea12000"],["./static/js/1.f987edc1.chunk.js","aeedd56e9562a8ea047ad49692b6073a"],["./static/js/2.b9127839.chunk.js","2696a477ad0b2bc0a5669dcc9b548970"],["./static/js/3.b254f421.chunk.js","9b6899eafd12897c4ab6fc663525261b"],["./static/js/4.e453c730.chunk.js","ca4d81fc8b885e636651e3165141b0b2"],["./static/js/5.27178524.chunk.js","efd7b634962ac57821d9d59151f22fb5"],["./static/js/6.f16710ba.chunk.js","5bdc8d6fce8c88fd2b5b450d337803ea"],["./static/js/7.444bd37f.chunk.js","963e10354473e3c32f4a44425ebe7693"],["./static/js/8.e9d5cd23.chunk.js","0d74b29e1d2d5d9af13656fec712a142"],["./static/js/9.e4b040ab.chunk.js","e6ff9c000b853e973ec19ea76ee9c00c"],["./static/js/cn.4e3e7d7c.js","38ce2ee8ac334289fa493987d473b3c5"],["./static/js/index.10e894a1.js","85e55bff709bf81cb455b5a92b4e4cd4"],["./static/media/omi-logo2019.923166c3.svg","923166c362dce831a15c447b19a622f9"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(t){return t.redirected?("body"in t?Promise.resolve(t.body):t.blob()).then(function(e){return new Response(e,{headers:t.headers,status:t.status,statusText:t.statusText})}):Promise.resolve(t)},createCacheKey=function(e,t,n,a){var c=new URL(e);return a&&c.pathname.match(a)||(c.search+=(c.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),c.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,n){var t=new URL(e);return t.hash="",t.search=t.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(t){return n.every(function(e){return!e.test(t[0])})}).map(function(e){return e.join("=")}).join("&"),t.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],a=new URL(t,self.location),c=createCacheKey(a,hashParamName,n,/\.\w{8}\./);return[a.toString(),c]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(a){return setOfCachedUrls(a).then(function(n){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(t){if(!n.has(t)){var e=new Request(t,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+t+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return a.put(t,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var n=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(t){return t.keys().then(function(e){return Promise.all(e.map(function(e){if(!n.has(e.url))return t.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(t){if("GET"===t.request.method){var e,n=stripIgnoredUrlParameters(t.request.url,ignoreUrlParametersMatching),a="index.html";(e=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,a),e=urlsToCacheKeys.has(n));var c="./index.html";!e&&"navigate"===t.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],t.request.url)&&(n=new URL(c,self.location).toString(),e=urlsToCacheKeys.has(n)),e&&t.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',t.request.url,e),fetch(t.request)}))}}); \ No newline at end of file diff --git a/components/docs/static/js/0.13eeb66f.chunk.js.map b/components/docs/static/js/0.13eeb66f.chunk.js.map deleted file mode 100644 index efc8de151..000000000 --- a/components/docs/static/js/0.13eeb66f.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../static/js/0.13eeb66f.chunk.js","docs/zh-cn/tabs.md"],"names":["webpackJsonp","47","module","exports"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/0.13eeb66f.chunk.js","sourcesContent":["webpackJsonp([0],{\n\n/***/ 47:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## Tabs 选项卡 \\n\\n用于同一个区域切换多个显示面板,充分利用空间。\\n\\n\\n\\n## 导入\\n\\n```js\\nimport '@omiu/tabs'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n\\n```\\n\\n## 使用\\n\\n```html\\n \\n\\t\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n list?: any[];\\n activeIndex: number;\\n type?: 'card' | 'border-card';\\n position?: 'left' | 'right' | 'top' | 'bottom';\\n closable?: boolean;\\n addable?: boolean;\\n}\\n```\\n\\n### 属性默认值\\n\\n```jsx\\n{\\n position: string;\\n closable: boolean;\\n addable: boolean;\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/0.13eeb66f.chunk.js","module.exports = \"## Tabs 选项卡 \\n\\n用于同一个区域切换多个显示面板,充分利用空间。\\n\\n\\n\\n## 导入\\n\\n```js\\nimport '@omiu/tabs'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n\\n```\\n\\n## 使用\\n\\n```html\\n \\n\\t\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n list?: any[];\\n activeIndex: number;\\n type?: 'card' | 'border-card';\\n position?: 'left' | 'right' | 'top' | 'bottom';\\n closable?: boolean;\\n addable?: boolean;\\n}\\n```\\n\\n### 属性默认值\\n\\n```jsx\\n{\\n position: string;\\n closable: boolean;\\n addable: boolean;\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/tabs.md\n// module id = 47\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/0.13eeb66f.chunk.js b/components/docs/static/js/0.95041a35.chunk.js similarity index 86% rename from components/docs/static/js/0.13eeb66f.chunk.js rename to components/docs/static/js/0.95041a35.chunk.js index 1a50677e6..93abccf53 100644 --- a/components/docs/static/js/0.13eeb66f.chunk.js +++ b/components/docs/static/js/0.95041a35.chunk.js @@ -1,2 +1,2 @@ -webpackJsonp([0],{47:function(n,e){n.exports="## Tabs \u9009\u9879\u5361 \n\n\u7528\u4e8e\u540c\u4e00\u4e2a\u533a\u57df\u5207\u6362\u591a\u4e2a\u663e\u793a\u9762\u677f\uff0c\u5145\u5206\u5229\u7528\u7a7a\u95f4\u3002\n\n\n\n## \u5bfc\u5165\n\n```js\nimport '@omiu/tabs'\n```\n\n\u6216\u8005\u76f4\u63a5 script \u6807\u7b7e\u5f15\u5165\u3002\n\n\n```html\n\\n```\\n\\n## 使用\\n\\n```html\\n \\n\\t\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n list?: any[];\\n activeIndex: number;\\n type?: 'card' | 'border-card';\\n position?: 'left' | 'right' | 'top' | 'bottom';\\n closable?: boolean;\\n addable?: boolean;\\n}\\n```\\n\\n### 属性默认值\\n\\n```jsx\\n{\\n position: string;\\n closable: boolean;\\n addable: boolean;\\n}\\n```\\n\\n### 事件\\n\\n* change\\n* remove\\n* addIconClick\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/0.95041a35.chunk.js","module.exports = \"## Tabs 选项卡 \\n\\n用于同一个区域切换多个显示面板,充分利用空间。\\n\\n\\n\\n## 导入\\n\\n```js\\nimport '@omiu/tabs'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n\\n```\\n\\n## 使用\\n\\n```html\\n \\n\\t\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n list?: any[];\\n activeIndex: number;\\n type?: 'card' | 'border-card';\\n position?: 'left' | 'right' | 'top' | 'bottom';\\n closable?: boolean;\\n addable?: boolean;\\n}\\n```\\n\\n### 属性默认值\\n\\n```jsx\\n{\\n position: string;\\n closable: boolean;\\n addable: boolean;\\n}\\n```\\n\\n### 事件\\n\\n* change\\n* remove\\n* addIconClick\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/tabs.md\n// module id = 49\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/1.33c193a5.chunk.js.map b/components/docs/static/js/1.33c193a5.chunk.js.map deleted file mode 100644 index 7712c357e..000000000 --- a/components/docs/static/js/1.33c193a5.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../static/js/1.33c193a5.chunk.js","docs/zh-cn/radio.md"],"names":["webpackJsonp","46","module","exports"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/1.33c193a5.chunk.js","sourcesContent":["webpackJsonp([1],{\n\n/***/ 46:\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\n## Radio 单选框 \\n\\n用于在多个选项中选择一个\\n\\n\\n\\n## 导入\\n\\n```js\\nimport '@omiu/radio'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n\\n```\\n\\n## 使用\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n label?: string;\\n disabled?: boolean;\\n checked?: boolean;\\n value: string;\\n name?: string;\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/1.33c193a5.chunk.js","module.exports = \"\\n## Radio 单选框 \\n\\n用于在多个选项中选择一个\\n\\n\\n\\n## 导入\\n\\n```js\\nimport '@omiu/radio'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n\\n```\\n\\n## 使用\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n label?: string;\\n disabled?: boolean;\\n checked?: boolean;\\n value: string;\\n name?: string;\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/radio.md\n// module id = 46\n// module chunks = 1"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/1.33c193a5.chunk.js b/components/docs/static/js/1.f987edc1.chunk.js similarity index 88% rename from components/docs/static/js/1.33c193a5.chunk.js rename to components/docs/static/js/1.f987edc1.chunk.js index e58811ce2..eb2d98664 100644 --- a/components/docs/static/js/1.33c193a5.chunk.js +++ b/components/docs/static/js/1.f987edc1.chunk.js @@ -1,2 +1,2 @@ -webpackJsonp([1],{46:function(n,e){n.exports='\n## Radio \u5355\u9009\u6846 \n\n\u7528\u4e8e\u5728\u591a\u4e2a\u9009\u9879\u4e2d\u9009\u62e9\u4e00\u4e2a\n\n\n\n## \u5bfc\u5165\n\n```js\nimport \'@omiu/radio\'\n```\n\n\u6216\u8005\u76f4\u63a5 script \u6807\u7b7e\u5f15\u5165\u3002\n\n\n```html\n\\n```\\n\\n## 使用\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n label?: string;\\n disabled?: boolean;\\n checked?: boolean;\\n value: string;\\n name?: string;\\n}\\n```\\n\\n## 事件\\n\\n* change\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/1.f987edc1.chunk.js","module.exports = \"\\n## Radio 单选框 \\n\\n用于在多个选项中选择一个\\n\\n\\n\\n## 导入\\n\\n```js\\nimport '@omiu/radio'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n\\n```\\n\\n## 使用\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n label?: string;\\n disabled?: boolean;\\n checked?: boolean;\\n value: string;\\n name?: string;\\n}\\n```\\n\\n## 事件\\n\\n* change\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/radio.md\n// module id = 48\n// module chunks = 1"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/2.b9127839.chunk.js b/components/docs/static/js/2.b9127839.chunk.js new file mode 100644 index 000000000..78964e83b --- /dev/null +++ b/components/docs/static/js/2.b9127839.chunk.js @@ -0,0 +1,2 @@ +webpackJsonp([2],{47:function(n,e){n.exports='## Link \u6587\u5b57\u94fe\u63a5 \n\n\u7528\u4e8e\u8df3\u8f6c\u5230\u65b0\u7684\u9875\u9762\u3002\n\n\n\n## \u5bfc\u5165\n\n```js\nimport \'@omiu/link\'\n```\n\n\u6216\u8005\u76f4\u63a5 script \u6807\u7b7e\u5f15\u5165\u3002\n\n\n```html\n\\n```\\n\\n## 使用\\n\\n```html\\n\\n Default\\n\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n disabled?: boolean;\\n underline?: boolean;\\n href?: string;\\n target: string;\\n}\\n```\\n\\n### 属性默认值\\n\\n```jsx\\n{\\n underline: true,\\n disabled: false\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/2.b9127839.chunk.js","module.exports = \"## Link 文字链接 \\n\\n用于跳转到新的页面。\\n\\n\\n\\n## 导入\\n\\n```js\\nimport '@omiu/link'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n\\n```\\n\\n## 使用\\n\\n```html\\n\\n Default\\n\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n disabled?: boolean;\\n underline?: boolean;\\n href?: string;\\n target: string;\\n}\\n```\\n\\n### 属性默认值\\n\\n```jsx\\n{\\n underline: true,\\n disabled: false\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/link.md\n// module id = 47\n// module chunks = 2"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/2.772150e4.chunk.js b/components/docs/static/js/3.b254f421.chunk.js similarity index 97% rename from components/docs/static/js/2.772150e4.chunk.js rename to components/docs/static/js/3.b254f421.chunk.js index 6276e7768..1f6ef4a1b 100644 --- a/components/docs/static/js/2.772150e4.chunk.js +++ b/components/docs/static/js/3.b254f421.chunk.js @@ -1,2 +1,2 @@ -webpackJsonp([2],{45:function(n,e){n.exports="## Omiu \u662f\u4ec0\u4e48\uff1f\n\nOmiu \u662f\u57fa\u4e8e [Omi](https://github.com/Tencent/omi) \u5f00\u53d1\u7684\u8de8\u6846\u67b6 UI \u7ec4\u4ef6\u5e93\uff0c\u8f93\u51fa\u6807\u51c6 Web Components \u7684 Custom Elements\uff0c\u4efb\u610f\u7ec4\u4ef6\u53ef\u4ee5\u540c\u65f6\u5728 React\u3001Vue\u3001Preact\u3001Omi \u6216\u8005\u539f\u751f JS \u7b49\u4efb\u610f\u6846\u67b6\u6216\u65e0\u6846\u67b6\u4e2d\u4f7f\u7528\uff0c\u975e\u5e38\u65b9\u4fbf\u3002\u603b\u4f53\u6765\u770b\uff0cOmiu \u6709\u8fd9\u4e9b\u7279\u6027:\n\n* \u8de8\u6846\u67b6\u4f7f\u7528\n* \u9ad8\u54c1\u8d28\u7684 UI \u4ea4\u4e92\u7ec6\u8282\n* \u96c6\u6210 MUI \u6d77\u91cf ICON \n* \u79fb\u52a8\u7aef\u548c PC \u5171\u7528\u4e00\u5957\u7ec4\u4ef6\n* \u8fd0\u884c\u65f6\u7684\u4e3b\u9898\u5207\u6362\u652f\u6301(\u989c\u8272\u3001\u5b57\u4f53\u548c\u5706\u89d2)\n* \u7ec4\u4ef6\u76f4\u63a5\u89e3\u8026\uff0c\u72ec\u7acb\u6253\u78e8\uff0c\u72ec\u7acb\u53d1\u5e03\uff0c\u72ec\u7acb\u5f15\u7528\n* \u6269\u5c55\u4e86 HTML \u80fd\u529b\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u5b57\u7b26\u4e32 `'0'` \u6216\u8005\u5b57\u7b26\u4e32 `'false'` \u4f20\u9012 false \u7ed9\u5143\u7d20\n\n## \u4f7f\u7528\u6307\u5357\n\n### \u901a\u8fc7 script\n\n```html\n\\n\\n\\nI am button\\n```\\n\\n### 通过 npm\\n\\n``` bash\\nnpm install @omiu/button\\n```\\n\\n然后导入(自动全局注册):\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n然后在任意框架中使用,比如 Omi, React, Vue or Angular:\\n\\n``` html\\nI am button\\n```\\n\\n也可以原生 JS 使用:\\n\\n```js\\nvar button = document.createElement('o-button')\\nbutton.innerHTML = 'I am omiu button'\\ndocument.body.append(button)\\nbutton.addEventListener('click', function () {\\n console.log('Clicked!')\\n})\\n\\n//or\\n//document.body.innerHTML = 'I am omiu button'\\n```\\n\\n## 更改主题\\n\\n```js\\nconst setTheme = Omiu.setTheme\\n\\nsetTheme('primary', '#07c160')\\nsetTheme('danger', '#f5222d')\\nsetTheme('surface', '#ffffff')\\nsetTheme('on-primary', '#ffffff')\\nsetTheme('on-danger', '#ffffff')\\nsetTheme('on-surface', '#000000')\\nsetTheme('background', '#ffffff')\\nsetTheme('small-radius', '4px')\\nsetTheme('medium-radius', '4px')\\nsetTheme('large-radius', '0px')\\nsetTheme('font-family', '-apple-system-font,\\\"Helvetica Neue\\\",sans-serif')\\n```\\n\\n或者\\n\\n```js\\nOmiu.setThemePrimary('green')\\nOmiu.setThemeError('red')\\n```\\n\\n\\n\\n## HTML 扩展 \\n\\n当默认值为 true,需要传递 false 给 element 的时候,以前是历史难题,Omi 完美解决了这一点,你可以通过字符串 `'0'` 或者 字符串 `'false'` 来设置。\\n\\n```js\\ndefine('my-element', class extends WeElement {\\n static defaultProps = {\\n show: true\\n }\\n\\n static propTypes = {\\n show: Boolean\\n }\\n\\n render(props) {\\n ...\\n ...\\n }\\n})\\n```\\n\\nUse:\\n\\n```html\\n\\n```\\n\\nor\\n\\n```html\\n\\n```\\n\\n## React 中使用 omiu\\n\\n```jsx\\n/** @jsx nativeEvents */\\nimport nativeEvents from 'jsx-native-events'\\nimport { useState } from 'react'\\nimport '@omiu/icon-button'\\n\\nexport default function SomeComponent(props) {\\n const [result, setSwitch] = useState(false)\\n\\n return (\\n
\\n

The switch is {result ? 'on' : 'off'}

\\n setSwitch(e.detail.isOn)}>\\n \\n
\\n )\\n}\\n```\\n\\n非常感谢 calebdwilliams 的 [jsx-native-events](https://github.com/calebdwilliams/jsx-native-events#readme)。\\n\\n## Vue 中使用 Omiu\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## 贡献\\n\\n### 一些命令\\n\\nBuild 组件:\\n\\n```bash\\nnpm run build \\n```\\n\\nBuild 例子:\\n\\n```bash\\nnpm start\\n```\\n\\n发布:\\n\\n```bash\\nnpm publish --access public\\n```\\n\\n## 相关链接\\n\\n* [material icon 搜索](https://material-ui.com/zh/components/material-icons/) \\n\\n把大写转成中划线就是对应的 omiu 组件。比如 `@material-ui/icons/AccessAlarm`,对应的就是\\n\\n```js\\nimport '@omiu/icon/access-alarm'\\n```\\n\\n在 HTML 里就可以使用:\\n\\n```html\\n\\n```\\n\\n是不是很方便!\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/2.772150e4.chunk.js","module.exports = \"## Omiu 是什么?\\n\\nOmiu 是基于 [Omi](https://github.com/Tencent/omi) 开发的跨框架 UI 组件库,输出标准 Web Components 的 Custom Elements,任意组件可以同时在 React、Vue、Preact、Omi 或者原生 JS 等任意框架或无框架中使用,非常方便。总体来看,Omiu 有这些特性:\\n\\n* 跨框架使用\\n* 高品质的 UI 交互细节\\n* 集成 MUI 海量 ICON \\n* 移动端和 PC 共用一套组件\\n* 运行时的主题切换支持(颜色、字体和圆角)\\n* 组件直接解耦,独立打磨,独立发布,独立引用\\n* 扩展了 HTML 能力,你可以通过字符串 `'0'` 或者字符串 `'false'` 传递 false 给元素\\n\\n## 使用指南\\n\\n### 通过 script\\n\\n```html\\n\\n\\n\\nI am button\\n```\\n\\n### 通过 npm\\n\\n``` bash\\nnpm install @omiu/button\\n```\\n\\n然后导入(自动全局注册):\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n然后在任意框架中使用,比如 Omi, React, Vue or Angular:\\n\\n``` html\\nI am button\\n```\\n\\n也可以原生 JS 使用:\\n\\n```js\\nvar button = document.createElement('o-button')\\nbutton.innerHTML = 'I am omiu button'\\ndocument.body.append(button)\\nbutton.addEventListener('click', function () {\\n console.log('Clicked!')\\n})\\n\\n//or\\n//document.body.innerHTML = 'I am omiu button'\\n```\\n\\n## 更改主题\\n\\n```js\\nconst setTheme = Omiu.setTheme\\n\\nsetTheme('primary', '#07c160')\\nsetTheme('danger', '#f5222d')\\nsetTheme('surface', '#ffffff')\\nsetTheme('on-primary', '#ffffff')\\nsetTheme('on-danger', '#ffffff')\\nsetTheme('on-surface', '#000000')\\nsetTheme('background', '#ffffff')\\nsetTheme('small-radius', '4px')\\nsetTheme('medium-radius', '4px')\\nsetTheme('large-radius', '0px')\\nsetTheme('font-family', '-apple-system-font,\\\"Helvetica Neue\\\",sans-serif')\\n```\\n\\n或者\\n\\n```js\\nOmiu.setThemePrimary('green')\\nOmiu.setThemeError('red')\\n```\\n\\n\\n\\n## HTML 扩展 \\n\\n当默认值为 true,需要传递 false 给 element 的时候,以前是历史难题,Omi 完美解决了这一点,你可以通过字符串 `'0'` 或者 字符串 `'false'` 来设置。\\n\\n```js\\ndefine('my-element', class extends WeElement {\\n static defaultProps = {\\n show: true\\n }\\n\\n static propTypes = {\\n show: Boolean\\n }\\n\\n render(props) {\\n ...\\n ...\\n }\\n})\\n```\\n\\nUse:\\n\\n```html\\n\\n```\\n\\nor\\n\\n```html\\n\\n```\\n\\n## React 中使用 omiu\\n\\n```jsx\\n/** @jsx nativeEvents */\\nimport nativeEvents from 'jsx-native-events'\\nimport { useState } from 'react'\\nimport '@omiu/icon-button'\\n\\nexport default function SomeComponent(props) {\\n const [result, setSwitch] = useState(false)\\n\\n return (\\n
\\n

The switch is {result ? 'on' : 'off'}

\\n setSwitch(e.detail.isOn)}>\\n \\n
\\n )\\n}\\n```\\n\\n非常感谢 calebdwilliams 的 [jsx-native-events](https://github.com/calebdwilliams/jsx-native-events#readme)。\\n\\n## Vue 中使用 Omiu\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## 贡献\\n\\n### 一些命令\\n\\nBuild 组件:\\n\\n```bash\\nnpm run build \\n```\\n\\nBuild 例子:\\n\\n```bash\\nnpm start\\n```\\n\\n发布:\\n\\n```bash\\nnpm publish --access public\\n```\\n\\n## 相关链接\\n\\n* [material icon 搜索](https://material-ui.com/zh/components/material-icons/) \\n\\n把大写转成中划线就是对应的 omiu 组件。比如 `@material-ui/icons/AccessAlarm`,对应的就是\\n\\n```js\\nimport '@omiu/icon/access-alarm'\\n```\\n\\n在 HTML 里就可以使用:\\n\\n```html\\n\\n```\\n\\n是不是很方便!\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/introduction.md\n// module id = 45\n// module chunks = 2"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../static/js/3.b254f421.chunk.js","docs/zh-cn/introduction.md"],"names":["webpackJsonp","46","module","exports"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/3.b254f421.chunk.js","sourcesContent":["webpackJsonp([3],{\n\n/***/ 46:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## Omiu 是什么?\\n\\nOmiu 是基于 [Omi](https://github.com/Tencent/omi) 开发的跨框架 UI 组件库,输出标准 Web Components 的 Custom Elements,任意组件可以同时在 React、Vue、Preact、Omi 或者原生 JS 等任意框架或无框架中使用,非常方便。总体来看,Omiu 有这些特性:\\n\\n* 跨框架使用\\n* 高品质的 UI 交互细节\\n* 集成 MUI 海量 ICON \\n* 移动端和 PC 共用一套组件\\n* 运行时的主题切换支持(颜色、字体和圆角)\\n* 组件直接解耦,独立打磨,独立发布,独立引用\\n* 扩展了 HTML 能力,你可以通过字符串 `'0'` 或者字符串 `'false'` 传递 false 给元素\\n\\n## 使用指南\\n\\n### 通过 script\\n\\n```html\\n\\n\\n\\nI am button\\n```\\n\\n### 通过 npm\\n\\n``` bash\\nnpm install @omiu/button\\n```\\n\\n然后导入(自动全局注册):\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n然后在任意框架中使用,比如 Omi, React, Vue or Angular:\\n\\n``` html\\nI am button\\n```\\n\\n也可以原生 JS 使用:\\n\\n```js\\nvar button = document.createElement('o-button')\\nbutton.innerHTML = 'I am omiu button'\\ndocument.body.append(button)\\nbutton.addEventListener('click', function () {\\n console.log('Clicked!')\\n})\\n\\n//or\\n//document.body.innerHTML = 'I am omiu button'\\n```\\n\\n## 更改主题\\n\\n```js\\nconst setTheme = Omiu.setTheme\\n\\nsetTheme('primary', '#07c160')\\nsetTheme('danger', '#f5222d')\\nsetTheme('surface', '#ffffff')\\nsetTheme('on-primary', '#ffffff')\\nsetTheme('on-danger', '#ffffff')\\nsetTheme('on-surface', '#000000')\\nsetTheme('background', '#ffffff')\\nsetTheme('small-radius', '4px')\\nsetTheme('medium-radius', '4px')\\nsetTheme('large-radius', '0px')\\nsetTheme('font-family', '-apple-system-font,\\\"Helvetica Neue\\\",sans-serif')\\n```\\n\\n或者\\n\\n```js\\nOmiu.setThemePrimary('green')\\nOmiu.setThemeError('red')\\n```\\n\\n\\n\\n## HTML 扩展 \\n\\n当默认值为 true,需要传递 false 给 element 的时候,以前是历史难题,Omi 完美解决了这一点,你可以通过字符串 `'0'` 或者 字符串 `'false'` 来设置。\\n\\n```js\\ndefine('my-element', class extends WeElement {\\n static defaultProps = {\\n show: true\\n }\\n\\n static propTypes = {\\n show: Boolean\\n }\\n\\n render(props) {\\n ...\\n ...\\n }\\n})\\n```\\n\\nUse:\\n\\n```html\\n\\n```\\n\\nor\\n\\n```html\\n\\n```\\n\\n## React 中使用 omiu\\n\\n```jsx\\n/** @jsx nativeEvents */\\nimport nativeEvents from 'jsx-native-events'\\nimport { useState } from 'react'\\nimport '@omiu/icon-button'\\n\\nexport default function SomeComponent(props) {\\n const [result, setSwitch] = useState(false)\\n\\n return (\\n
\\n

The switch is {result ? 'on' : 'off'}

\\n setSwitch(e.detail.isOn)}>\\n \\n
\\n )\\n}\\n```\\n\\n非常感谢 calebdwilliams 的 [jsx-native-events](https://github.com/calebdwilliams/jsx-native-events#readme)。\\n\\n## Vue 中使用 Omiu\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## 贡献\\n\\n### 一些命令\\n\\nBuild 组件:\\n\\n```bash\\nnpm run build \\n```\\n\\nBuild 例子:\\n\\n```bash\\nnpm start\\n```\\n\\n发布:\\n\\n```bash\\nnpm publish --access public\\n```\\n\\n## 相关链接\\n\\n* [material icon 搜索](https://material-ui.com/zh/components/material-icons/) \\n\\n把大写转成中划线就是对应的 omiu 组件。比如 `@material-ui/icons/AccessAlarm`,对应的就是\\n\\n```js\\nimport '@omiu/icon/access-alarm'\\n```\\n\\n在 HTML 里就可以使用:\\n\\n```html\\n\\n```\\n\\n是不是很方便!\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/3.b254f421.chunk.js","module.exports = \"## Omiu 是什么?\\n\\nOmiu 是基于 [Omi](https://github.com/Tencent/omi) 开发的跨框架 UI 组件库,输出标准 Web Components 的 Custom Elements,任意组件可以同时在 React、Vue、Preact、Omi 或者原生 JS 等任意框架或无框架中使用,非常方便。总体来看,Omiu 有这些特性:\\n\\n* 跨框架使用\\n* 高品质的 UI 交互细节\\n* 集成 MUI 海量 ICON \\n* 移动端和 PC 共用一套组件\\n* 运行时的主题切换支持(颜色、字体和圆角)\\n* 组件直接解耦,独立打磨,独立发布,独立引用\\n* 扩展了 HTML 能力,你可以通过字符串 `'0'` 或者字符串 `'false'` 传递 false 给元素\\n\\n## 使用指南\\n\\n### 通过 script\\n\\n```html\\n\\n\\n\\nI am button\\n```\\n\\n### 通过 npm\\n\\n``` bash\\nnpm install @omiu/button\\n```\\n\\n然后导入(自动全局注册):\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n然后在任意框架中使用,比如 Omi, React, Vue or Angular:\\n\\n``` html\\nI am button\\n```\\n\\n也可以原生 JS 使用:\\n\\n```js\\nvar button = document.createElement('o-button')\\nbutton.innerHTML = 'I am omiu button'\\ndocument.body.append(button)\\nbutton.addEventListener('click', function () {\\n console.log('Clicked!')\\n})\\n\\n//or\\n//document.body.innerHTML = 'I am omiu button'\\n```\\n\\n## 更改主题\\n\\n```js\\nconst setTheme = Omiu.setTheme\\n\\nsetTheme('primary', '#07c160')\\nsetTheme('danger', '#f5222d')\\nsetTheme('surface', '#ffffff')\\nsetTheme('on-primary', '#ffffff')\\nsetTheme('on-danger', '#ffffff')\\nsetTheme('on-surface', '#000000')\\nsetTheme('background', '#ffffff')\\nsetTheme('small-radius', '4px')\\nsetTheme('medium-radius', '4px')\\nsetTheme('large-radius', '0px')\\nsetTheme('font-family', '-apple-system-font,\\\"Helvetica Neue\\\",sans-serif')\\n```\\n\\n或者\\n\\n```js\\nOmiu.setThemePrimary('green')\\nOmiu.setThemeError('red')\\n```\\n\\n\\n\\n## HTML 扩展 \\n\\n当默认值为 true,需要传递 false 给 element 的时候,以前是历史难题,Omi 完美解决了这一点,你可以通过字符串 `'0'` 或者 字符串 `'false'` 来设置。\\n\\n```js\\ndefine('my-element', class extends WeElement {\\n static defaultProps = {\\n show: true\\n }\\n\\n static propTypes = {\\n show: Boolean\\n }\\n\\n render(props) {\\n ...\\n ...\\n }\\n})\\n```\\n\\nUse:\\n\\n```html\\n\\n```\\n\\nor\\n\\n```html\\n\\n```\\n\\n## React 中使用 omiu\\n\\n```jsx\\n/** @jsx nativeEvents */\\nimport nativeEvents from 'jsx-native-events'\\nimport { useState } from 'react'\\nimport '@omiu/icon-button'\\n\\nexport default function SomeComponent(props) {\\n const [result, setSwitch] = useState(false)\\n\\n return (\\n
\\n

The switch is {result ? 'on' : 'off'}

\\n setSwitch(e.detail.isOn)}>\\n \\n
\\n )\\n}\\n```\\n\\n非常感谢 calebdwilliams 的 [jsx-native-events](https://github.com/calebdwilliams/jsx-native-events#readme)。\\n\\n## Vue 中使用 Omiu\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## 贡献\\n\\n### 一些命令\\n\\nBuild 组件:\\n\\n```bash\\nnpm run build \\n```\\n\\nBuild 例子:\\n\\n```bash\\nnpm start\\n```\\n\\n发布:\\n\\n```bash\\nnpm publish --access public\\n```\\n\\n## 相关链接\\n\\n* [material icon 搜索](https://material-ui.com/zh/components/material-icons/) \\n\\n把大写转成中划线就是对应的 omiu 组件。比如 `@material-ui/icons/AccessAlarm`,对应的就是\\n\\n```js\\nimport '@omiu/icon/access-alarm'\\n```\\n\\n在 HTML 里就可以使用:\\n\\n```html\\n\\n```\\n\\n是不是很方便!\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/introduction.md\n// module id = 46\n// module chunks = 3"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/4.9c41210c.chunk.js.map b/components/docs/static/js/4.9c41210c.chunk.js.map deleted file mode 100644 index 8c431da9d..000000000 --- a/components/docs/static/js/4.9c41210c.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../static/js/4.9c41210c.chunk.js","docs/en/tabs.md"],"names":["webpackJsonp","43","module","exports"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/4.9c41210c.chunk.js","sourcesContent":["webpackJsonp([4],{\n\n/***/ 43:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## Tabs \\n\\nIt is used to switch multiple display panels in the same area to make full use of space.\\n\\n\\n\\n## Import\\n\\n```js\\nimport '@omiu/tabs'\\n```\\n\\nOr use script tag to ref it.\\n\\n\\n```html\\n\\n```\\n\\n## Usage\\n\\n```html\\n \\n\\t\\n```\\n\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n list?: any[];\\n activeIndex: number;\\n type?: 'card' | 'border-card';\\n position?: 'left' | 'right' | 'top' | 'bottom';\\n closable?: boolean;\\n addable?: boolean;\\n}\\n```\\n\\n### defaultProps\\n\\n```jsx\\n{\\n position: string;\\n closable: boolean;\\n addable: boolean;\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/4.9c41210c.chunk.js","module.exports = \"## Tabs \\n\\nIt is used to switch multiple display panels in the same area to make full use of space.\\n\\n\\n\\n## Import\\n\\n```js\\nimport '@omiu/tabs'\\n```\\n\\nOr use script tag to ref it.\\n\\n\\n```html\\n\\n```\\n\\n## Usage\\n\\n```html\\n \\n\\t\\n```\\n\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n list?: any[];\\n activeIndex: number;\\n type?: 'card' | 'border-card';\\n position?: 'left' | 'right' | 'top' | 'bottom';\\n closable?: boolean;\\n addable?: boolean;\\n}\\n```\\n\\n### defaultProps\\n\\n```jsx\\n{\\n position: string;\\n closable: boolean;\\n addable: boolean;\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/tabs.md\n// module id = 43\n// module chunks = 4"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/3.34382a2c.chunk.js b/components/docs/static/js/4.e453c730.chunk.js similarity index 93% rename from components/docs/static/js/3.34382a2c.chunk.js rename to components/docs/static/js/4.e453c730.chunk.js index 5ab20366d..98cd16197 100644 --- a/components/docs/static/js/3.34382a2c.chunk.js +++ b/components/docs/static/js/4.e453c730.chunk.js @@ -1,2 +1,2 @@ -webpackJsonp([3],{44:function(n,o){n.exports="## Button \u6309\u94ae \n\n\u70b9\u51fb\u6216\u89e6\u6478\u89e6\u53d1\u4e00\u4e2a\u64cd\u4f5c\u7684\u5143\u7d20\u3002\u54cd\u5e94\u7528\u6237\u70b9\u51fb\u64cd\u4f5c\uff0c\u89e6\u53d1\u5c01\u88c5\u7684\u903b\u8f91\u3002\n\n\n\n## \u5bfc\u5165\n\n```js\nimport '@omiu/button'\n```\n\n\u6216\u8005\u76f4\u63a5 script \u6807\u7b7e\u5f15\u5165\u3002\n\n\n```html\n\\n```\\n\\n## 使用\\n\\n```html\\nPrimary Button\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### 属性默认值\\n\\n```jsx\\n{\\n plain: boolean;\\n round: boolean;\\n circle: boolean;\\n loading: boolean;\\n disabled: boolean;\\n autofocus: boolean;\\n nativeType: string;\\n block: boolean;\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/3.34382a2c.chunk.js","module.exports = \"## Button 按钮 \\n\\n点击或触摸触发一个操作的元素。响应用户点击操作,触发封装的逻辑。\\n\\n\\n\\n## 导入\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n\\n```\\n\\n## 使用\\n\\n```html\\nPrimary Button\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### 属性默认值\\n\\n```jsx\\n{\\n plain: boolean;\\n round: boolean;\\n circle: boolean;\\n loading: boolean;\\n disabled: boolean;\\n autofocus: boolean;\\n nativeType: string;\\n block: boolean;\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/button.md\n// module id = 44\n// module chunks = 3"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../static/js/4.e453c730.chunk.js","docs/zh-cn/button.md"],"names":["webpackJsonp","45","module","exports"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/4.e453c730.chunk.js","sourcesContent":["webpackJsonp([4],{\n\n/***/ 45:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## Button 按钮 \\n\\n点击或触摸触发一个操作的元素。响应用户点击操作,触发封装的逻辑。\\n\\n\\n\\n## 导入\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n\\n```\\n\\n## 使用\\n\\n```html\\nPrimary Button\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### 属性默认值\\n\\n```jsx\\n{\\n plain: boolean;\\n round: boolean;\\n circle: boolean;\\n loading: boolean;\\n disabled: boolean;\\n autofocus: boolean;\\n nativeType: string;\\n block: boolean;\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/4.e453c730.chunk.js","module.exports = \"## Button 按钮 \\n\\n点击或触摸触发一个操作的元素。响应用户点击操作,触发封装的逻辑。\\n\\n\\n\\n## 导入\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\n或者直接 script 标签引入。\\n\\n\\n```html\\n\\n```\\n\\n## 使用\\n\\n```html\\nPrimary Button\\n```\\n\\n\\n## API\\n\\n### 属性\\n\\n```jsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### 属性默认值\\n\\n```jsx\\n{\\n plain: boolean;\\n round: boolean;\\n circle: boolean;\\n loading: boolean;\\n disabled: boolean;\\n autofocus: boolean;\\n nativeType: string;\\n block: boolean;\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/zh-cn/button.md\n// module id = 45\n// module chunks = 4"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/4.9c41210c.chunk.js b/components/docs/static/js/5.27178524.chunk.js similarity index 86% rename from components/docs/static/js/4.9c41210c.chunk.js rename to components/docs/static/js/5.27178524.chunk.js index 3aaf97ab7..8595002cf 100644 --- a/components/docs/static/js/4.9c41210c.chunk.js +++ b/components/docs/static/js/5.27178524.chunk.js @@ -1,2 +1,2 @@ -webpackJsonp([4],{43:function(n,e){n.exports="## Tabs \n\nIt is used to switch multiple display panels in the same area to make full use of space.\n\n\n\n## Import\n\n```js\nimport '@omiu/tabs'\n```\n\nOr use script tag to ref it.\n\n\n```html\n\\n```\\n\\n## Usage\\n\\n```html\\n \\n\\t\\n```\\n\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n list?: any[];\\n activeIndex: number;\\n type?: 'card' | 'border-card';\\n position?: 'left' | 'right' | 'top' | 'bottom';\\n closable?: boolean;\\n addable?: boolean;\\n}\\n```\\n\\n### defaultProps\\n\\n```jsx\\n{\\n position: string;\\n closable: boolean;\\n addable: boolean;\\n}\\n```\\n\\n### Event\\n\\n* change\\n* remove\\n* addIconClick\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/5.27178524.chunk.js","module.exports = \"## Tabs \\n\\nIt is used to switch multiple display panels in the same area to make full use of space.\\n\\n\\n\\n## Import\\n\\n```js\\nimport '@omiu/tabs'\\n```\\n\\nOr use script tag to ref it.\\n\\n\\n```html\\n\\n```\\n\\n## Usage\\n\\n```html\\n \\n\\t\\n```\\n\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n list?: any[];\\n activeIndex: number;\\n type?: 'card' | 'border-card';\\n position?: 'left' | 'right' | 'top' | 'bottom';\\n closable?: boolean;\\n addable?: boolean;\\n}\\n```\\n\\n### defaultProps\\n\\n```jsx\\n{\\n position: string;\\n closable: boolean;\\n addable: boolean;\\n}\\n```\\n\\n### Event\\n\\n* change\\n* remove\\n* addIconClick\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/tabs.md\n// module id = 44\n// module chunks = 5"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/5.f722827c.chunk.js.map b/components/docs/static/js/5.f722827c.chunk.js.map deleted file mode 100644 index aa995943a..000000000 --- a/components/docs/static/js/5.f722827c.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../static/js/5.f722827c.chunk.js","docs/en/radio.md"],"names":["webpackJsonp","42","module","exports"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/5.f722827c.chunk.js","sourcesContent":["webpackJsonp([5],{\n\n/***/ 42:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## Radio \\n\\nUsed to select one of several options.\\n\\n\\n\\n## Import\\n\\n```js\\nimport '@omiu/radio'\\n```\\n\\nOr use script tag to ref it.\\n\\n\\n```html\\n\\n```\\n\\n## Usage\\n\\n```html\\nMan\\nWomen\\n\\n```\\n\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n label?: string;\\n disabled?: boolean;\\n checked?: boolean;\\n value: string;\\n name?: string;\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/5.f722827c.chunk.js","module.exports = \"## Radio \\n\\nUsed to select one of several options.\\n\\n\\n\\n## Import\\n\\n```js\\nimport '@omiu/radio'\\n```\\n\\nOr use script tag to ref it.\\n\\n\\n```html\\n\\n```\\n\\n## Usage\\n\\n```html\\nMan\\nWomen\\n\\n```\\n\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n label?: string;\\n disabled?: boolean;\\n checked?: boolean;\\n value: string;\\n name?: string;\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/radio.md\n// module id = 42\n// module chunks = 5"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/5.f722827c.chunk.js b/components/docs/static/js/6.f16710ba.chunk.js similarity index 87% rename from components/docs/static/js/5.f722827c.chunk.js rename to components/docs/static/js/6.f16710ba.chunk.js index f71b98ac1..7fc47287f 100644 --- a/components/docs/static/js/5.f722827c.chunk.js +++ b/components/docs/static/js/6.f16710ba.chunk.js @@ -1,2 +1,2 @@ -webpackJsonp([5],{42:function(n,e){n.exports='## Radio \n\nUsed to select one of several options.\n\n\n\n## Import\n\n```js\nimport \'@omiu/radio\'\n```\n\nOr use script tag to ref it.\n\n\n```html\n\\n```\\n\\n## Usage\\n\\n```html\\nMan\\nWomen\\n\\n```\\n\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n label?: string;\\n disabled?: boolean;\\n checked?: boolean;\\n value: string;\\n name?: string;\\n}\\n```\\n\\n## Event\\n\\n* change\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/6.f16710ba.chunk.js","module.exports = \"## Radio \\n\\nUsed to select one of several options.\\n\\n\\n\\n## Import\\n\\n```js\\nimport '@omiu/radio'\\n```\\n\\nOr use script tag to ref it.\\n\\n\\n```html\\n\\n```\\n\\n## Usage\\n\\n```html\\nMan\\nWomen\\n\\n```\\n\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n label?: string;\\n disabled?: boolean;\\n checked?: boolean;\\n value: string;\\n name?: string;\\n}\\n```\\n\\n## Event\\n\\n* change\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/radio.md\n// module id = 43\n// module chunks = 6"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/7.444bd37f.chunk.js b/components/docs/static/js/7.444bd37f.chunk.js new file mode 100644 index 000000000..7dbba4f26 --- /dev/null +++ b/components/docs/static/js/7.444bd37f.chunk.js @@ -0,0 +1,2 @@ +webpackJsonp([7],{42:function(n,e){n.exports='## Link \n\nUsed to jump to a new page.\n\n\n\n## Import\n\n```js\nimport \'@omiu/link\'\n```\n\nOr use script tag to ref it.\n\n\n```html\n\\n```\\n\\n## Usage\\n\\n```html\\n\\n Default\\n\\n```\\n\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n disabled?: boolean;\\n underline?: boolean;\\n href?: string;\\n target: string;\\n}\\n```\\n\\n### defaultProps\\n\\n```jsx\\n{\\n underline: true,\\n disabled: false\\n}\\n```\\n\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/7.444bd37f.chunk.js","module.exports = \"## Link \\n\\nUsed to jump to a new page.\\n\\n\\n\\n## Import\\n\\n```js\\nimport '@omiu/link'\\n```\\n\\nOr use script tag to ref it.\\n\\n\\n```html\\n\\n```\\n\\n## Usage\\n\\n```html\\n\\n Default\\n\\n```\\n\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n disabled?: boolean;\\n underline?: boolean;\\n href?: string;\\n target: string;\\n}\\n```\\n\\n### defaultProps\\n\\n```jsx\\n{\\n underline: true,\\n disabled: false\\n}\\n```\\n\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/link.md\n// module id = 42\n// module chunks = 7"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/6.45670996.chunk.js b/components/docs/static/js/8.e9d5cd23.chunk.js similarity index 97% rename from components/docs/static/js/6.45670996.chunk.js rename to components/docs/static/js/8.e9d5cd23.chunk.js index d89af6670..31392bdd7 100644 --- a/components/docs/static/js/6.45670996.chunk.js +++ b/components/docs/static/js/8.e9d5cd23.chunk.js @@ -1,2 +1,2 @@ -webpackJsonp([6],{41:function(n,e){n.exports="## What's Omiu ?\n\nOmiu is a cross framework UI component library developed based on [OMI](https://github.com/tencent/omi), which outputs custom elements of standard web components. Any component can be used in any framework or frameless environment such as react, Vue, preact, OMI or native JS at the same time, which is very convenient. Overall, omiu has these characteristics:\n\n* Cross frameworks \n* High quality UI interaction details\n* Integrated all the MUI Icon\n* Mobile terminal and PC share one set of components\n* Theme switching support at runtime (color, font, and fillets)\n* Components directly decoupled, independently polished, independently released, independently quoted\n* Extended HTML capabilities. You can pass false to an element through the string `'0'` or the string `'false'`\n\n## Usage\n\n### Install by script\n\n```html\n\\n\\n\\nI am button\\n```\\n\\n### Install by npm\\n\\n``` bash\\nnpm install @omiu/button\\n```\\n\\nImport to use it:\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nThen use it in any framework, such as Omi, react, Vue or angular:\\n\\n``` html\\nI am button\\n```\\n\\nYou can also use native JS:\\n\\n```js\\nvar button = document.createElement('o-button')\\nbutton.innerHTML = 'I am omiu button'\\ndocument.body.append(button)\\nbutton.addEventListener('click', function () {\\n console.log('Clicked!')\\n})\\n\\n//or\\n//document.body.innerHTML = 'I am omiu button'\\n```\\n\\n## Change Theme\\n\\n```js\\nconst setTheme = Omiu.setTheme\\n\\nsetTheme('primary', '#07c160')\\nsetTheme('danger', '#f5222d')\\nsetTheme('surface', '#ffffff')\\nsetTheme('on-primary', '#ffffff')\\nsetTheme('on-danger', '#ffffff')\\nsetTheme('on-surface', '#000000')\\nsetTheme('background', '#ffffff')\\nsetTheme('small-radius', '4px')\\nsetTheme('medium-radius', '4px')\\nsetTheme('large-radius', '0px')\\nsetTheme('font-family', '-apple-system-font,\\\"Helvetica Neue\\\",sans-serif')\\n```\\n\\nor\\n\\n```js\\nOmiu.setThemePrimary('green')\\nOmiu.setThemeError('red')\\n```\\n\\n\\n\\n## HTML Extension \\n\\nWhen the default value is true and you need to pass false to the element, it used to be a historical problem. OMI has solved this problem perfectly. You can set it through the string `'0'` or the string `'false'`.\\n\\n```js\\ndefine('my-element', class extends WeElement {\\n static defaultProps = {\\n show: true\\n }\\n\\n static propTypes = {\\n show: Boolean\\n }\\n\\n render(props) {\\n ...\\n ...\\n }\\n})\\n```\\n\\nUse:\\n\\n```html\\n\\n```\\n\\nor\\n\\n```html\\n\\n```\\n\\n## Using omiu in react\\n\\n```jsx\\n/** @jsx nativeEvents */\\nimport nativeEvents from 'jsx-native-events'\\nimport { useState } from 'react'\\nimport '@omiu/icon-button'\\n\\nexport default function SomeComponent(props) {\\n const [result, setSwitch] = useState(false)\\n\\n return (\\n
\\n

The switch is {result ? 'on' : 'off'}

\\n setSwitch(e.detail.isOn)}>\\n \\n
\\n )\\n}\\n```\\n\\nMany thanks to calebdwilliams's [jsx-native-events](https://github.com/calebdwilliams/jsx-native-events#readme)。\\n\\n## Using omiu in Vue\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## Contribution\\n\\nBuild:\\n\\n```bash\\nnpm run build\\n```\\n\\nBuild Demo:\\n\\n```bash\\nnpm start \\n```\\n\\nPublic to npm:\\n\\n```bash\\nnpm publish --access public\\n```\\n\\n## Related links\\n\\n* [material icon search](https://material-ui.com/zh/components/material-icons/) \\n\\nConverting upper case to middle dash is the corresponding omiu component. Such as `@material-ui/icons/AccessAlarm`, the omiu element is:\\n\\n```js\\nimport '@omiu/icon/access-alarm'\\n```\\n\\nUsing in html:\\n\\n```html\\n\\n```\\n\\nSo Easy!\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/6.45670996.chunk.js","module.exports = \"## What's Omiu ?\\n\\nOmiu is a cross framework UI component library developed based on [OMI](https://github.com/tencent/omi), which outputs custom elements of standard web components. Any component can be used in any framework or frameless environment such as react, Vue, preact, OMI or native JS at the same time, which is very convenient. Overall, omiu has these characteristics:\\n\\n* Cross frameworks \\n* High quality UI interaction details\\n* Integrated all the MUI Icon\\n* Mobile terminal and PC share one set of components\\n* Theme switching support at runtime (color, font, and fillets)\\n* Components directly decoupled, independently polished, independently released, independently quoted\\n* Extended HTML capabilities. You can pass false to an element through the string `'0'` or the string `'false'`\\n\\n## Usage\\n\\n### Install by script\\n\\n```html\\n\\n\\n\\nI am button\\n```\\n\\n### Install by npm\\n\\n``` bash\\nnpm install @omiu/button\\n```\\n\\nImport to use it:\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nThen use it in any framework, such as Omi, react, Vue or angular:\\n\\n``` html\\nI am button\\n```\\n\\nYou can also use native JS:\\n\\n```js\\nvar button = document.createElement('o-button')\\nbutton.innerHTML = 'I am omiu button'\\ndocument.body.append(button)\\nbutton.addEventListener('click', function () {\\n console.log('Clicked!')\\n})\\n\\n//or\\n//document.body.innerHTML = 'I am omiu button'\\n```\\n\\n## Change Theme\\n\\n```js\\nconst setTheme = Omiu.setTheme\\n\\nsetTheme('primary', '#07c160')\\nsetTheme('danger', '#f5222d')\\nsetTheme('surface', '#ffffff')\\nsetTheme('on-primary', '#ffffff')\\nsetTheme('on-danger', '#ffffff')\\nsetTheme('on-surface', '#000000')\\nsetTheme('background', '#ffffff')\\nsetTheme('small-radius', '4px')\\nsetTheme('medium-radius', '4px')\\nsetTheme('large-radius', '0px')\\nsetTheme('font-family', '-apple-system-font,\\\"Helvetica Neue\\\",sans-serif')\\n```\\n\\nor\\n\\n```js\\nOmiu.setThemePrimary('green')\\nOmiu.setThemeError('red')\\n```\\n\\n\\n\\n## HTML Extension \\n\\nWhen the default value is true and you need to pass false to the element, it used to be a historical problem. OMI has solved this problem perfectly. You can set it through the string `'0'` or the string `'false'`.\\n\\n```js\\ndefine('my-element', class extends WeElement {\\n static defaultProps = {\\n show: true\\n }\\n\\n static propTypes = {\\n show: Boolean\\n }\\n\\n render(props) {\\n ...\\n ...\\n }\\n})\\n```\\n\\nUse:\\n\\n```html\\n\\n```\\n\\nor\\n\\n```html\\n\\n```\\n\\n## Using omiu in react\\n\\n```jsx\\n/** @jsx nativeEvents */\\nimport nativeEvents from 'jsx-native-events'\\nimport { useState } from 'react'\\nimport '@omiu/icon-button'\\n\\nexport default function SomeComponent(props) {\\n const [result, setSwitch] = useState(false)\\n\\n return (\\n
\\n

The switch is {result ? 'on' : 'off'}

\\n setSwitch(e.detail.isOn)}>\\n \\n
\\n )\\n}\\n```\\n\\nMany thanks to calebdwilliams's [jsx-native-events](https://github.com/calebdwilliams/jsx-native-events#readme)。\\n\\n## Using omiu in Vue\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## Contribution\\n\\nBuild:\\n\\n```bash\\nnpm run build\\n```\\n\\nBuild Demo:\\n\\n```bash\\nnpm start \\n```\\n\\nPublic to npm:\\n\\n```bash\\nnpm publish --access public\\n```\\n\\n## Related links\\n\\n* [material icon search](https://material-ui.com/zh/components/material-icons/) \\n\\nConverting upper case to middle dash is the corresponding omiu component. Such as `@material-ui/icons/AccessAlarm`, the omiu element is:\\n\\n```js\\nimport '@omiu/icon/access-alarm'\\n```\\n\\nUsing in html:\\n\\n```html\\n\\n```\\n\\nSo Easy!\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/introduction.md\n// module id = 41\n// module chunks = 6"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../static/js/8.e9d5cd23.chunk.js","docs/en/introduction.md"],"names":["webpackJsonp","41","module","exports"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/8.e9d5cd23.chunk.js","sourcesContent":["webpackJsonp([8],{\n\n/***/ 41:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## What's Omiu ?\\n\\nOmiu is a cross framework UI component library developed based on [OMI](https://github.com/tencent/omi), which outputs custom elements of standard web components. Any component can be used in any framework or frameless environment such as react, Vue, preact, OMI or native JS at the same time, which is very convenient. Overall, omiu has these characteristics:\\n\\n* Cross frameworks \\n* High quality UI interaction details\\n* Integrated all the MUI Icon\\n* Mobile terminal and PC share one set of components\\n* Theme switching support at runtime (color, font, and fillets)\\n* Components directly decoupled, independently polished, independently released, independently quoted\\n* Extended HTML capabilities. You can pass false to an element through the string `'0'` or the string `'false'`\\n\\n## Usage\\n\\n### Install by script\\n\\n```html\\n\\n\\n\\nI am button\\n```\\n\\n### Install by npm\\n\\n``` bash\\nnpm install @omiu/button\\n```\\n\\nImport to use it:\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nThen use it in any framework, such as Omi, react, Vue or angular:\\n\\n``` html\\nI am button\\n```\\n\\nYou can also use native JS:\\n\\n```js\\nvar button = document.createElement('o-button')\\nbutton.innerHTML = 'I am omiu button'\\ndocument.body.append(button)\\nbutton.addEventListener('click', function () {\\n console.log('Clicked!')\\n})\\n\\n//or\\n//document.body.innerHTML = 'I am omiu button'\\n```\\n\\n## Change Theme\\n\\n```js\\nconst setTheme = Omiu.setTheme\\n\\nsetTheme('primary', '#07c160')\\nsetTheme('danger', '#f5222d')\\nsetTheme('surface', '#ffffff')\\nsetTheme('on-primary', '#ffffff')\\nsetTheme('on-danger', '#ffffff')\\nsetTheme('on-surface', '#000000')\\nsetTheme('background', '#ffffff')\\nsetTheme('small-radius', '4px')\\nsetTheme('medium-radius', '4px')\\nsetTheme('large-radius', '0px')\\nsetTheme('font-family', '-apple-system-font,\\\"Helvetica Neue\\\",sans-serif')\\n```\\n\\nor\\n\\n```js\\nOmiu.setThemePrimary('green')\\nOmiu.setThemeError('red')\\n```\\n\\n\\n\\n## HTML Extension \\n\\nWhen the default value is true and you need to pass false to the element, it used to be a historical problem. OMI has solved this problem perfectly. You can set it through the string `'0'` or the string `'false'`.\\n\\n```js\\ndefine('my-element', class extends WeElement {\\n static defaultProps = {\\n show: true\\n }\\n\\n static propTypes = {\\n show: Boolean\\n }\\n\\n render(props) {\\n ...\\n ...\\n }\\n})\\n```\\n\\nUse:\\n\\n```html\\n\\n```\\n\\nor\\n\\n```html\\n\\n```\\n\\n## Using omiu in react\\n\\n```jsx\\n/** @jsx nativeEvents */\\nimport nativeEvents from 'jsx-native-events'\\nimport { useState } from 'react'\\nimport '@omiu/icon-button'\\n\\nexport default function SomeComponent(props) {\\n const [result, setSwitch] = useState(false)\\n\\n return (\\n
\\n

The switch is {result ? 'on' : 'off'}

\\n setSwitch(e.detail.isOn)}>\\n \\n
\\n )\\n}\\n```\\n\\nMany thanks to calebdwilliams's [jsx-native-events](https://github.com/calebdwilliams/jsx-native-events#readme)。\\n\\n## Using omiu in Vue\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## Contribution\\n\\nBuild:\\n\\n```bash\\nnpm run build\\n```\\n\\nBuild Demo:\\n\\n```bash\\nnpm start \\n```\\n\\nPublic to npm:\\n\\n```bash\\nnpm publish --access public\\n```\\n\\n## Related links\\n\\n* [material icon search](https://material-ui.com/zh/components/material-icons/) \\n\\nConverting upper case to middle dash is the corresponding omiu component. Such as `@material-ui/icons/AccessAlarm`, the omiu element is:\\n\\n```js\\nimport '@omiu/icon/access-alarm'\\n```\\n\\nUsing in html:\\n\\n```html\\n\\n```\\n\\nSo Easy!\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/8.e9d5cd23.chunk.js","module.exports = \"## What's Omiu ?\\n\\nOmiu is a cross framework UI component library developed based on [OMI](https://github.com/tencent/omi), which outputs custom elements of standard web components. Any component can be used in any framework or frameless environment such as react, Vue, preact, OMI or native JS at the same time, which is very convenient. Overall, omiu has these characteristics:\\n\\n* Cross frameworks \\n* High quality UI interaction details\\n* Integrated all the MUI Icon\\n* Mobile terminal and PC share one set of components\\n* Theme switching support at runtime (color, font, and fillets)\\n* Components directly decoupled, independently polished, independently released, independently quoted\\n* Extended HTML capabilities. You can pass false to an element through the string `'0'` or the string `'false'`\\n\\n## Usage\\n\\n### Install by script\\n\\n```html\\n\\n\\n\\nI am button\\n```\\n\\n### Install by npm\\n\\n``` bash\\nnpm install @omiu/button\\n```\\n\\nImport to use it:\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nThen use it in any framework, such as Omi, react, Vue or angular:\\n\\n``` html\\nI am button\\n```\\n\\nYou can also use native JS:\\n\\n```js\\nvar button = document.createElement('o-button')\\nbutton.innerHTML = 'I am omiu button'\\ndocument.body.append(button)\\nbutton.addEventListener('click', function () {\\n console.log('Clicked!')\\n})\\n\\n//or\\n//document.body.innerHTML = 'I am omiu button'\\n```\\n\\n## Change Theme\\n\\n```js\\nconst setTheme = Omiu.setTheme\\n\\nsetTheme('primary', '#07c160')\\nsetTheme('danger', '#f5222d')\\nsetTheme('surface', '#ffffff')\\nsetTheme('on-primary', '#ffffff')\\nsetTheme('on-danger', '#ffffff')\\nsetTheme('on-surface', '#000000')\\nsetTheme('background', '#ffffff')\\nsetTheme('small-radius', '4px')\\nsetTheme('medium-radius', '4px')\\nsetTheme('large-radius', '0px')\\nsetTheme('font-family', '-apple-system-font,\\\"Helvetica Neue\\\",sans-serif')\\n```\\n\\nor\\n\\n```js\\nOmiu.setThemePrimary('green')\\nOmiu.setThemeError('red')\\n```\\n\\n\\n\\n## HTML Extension \\n\\nWhen the default value is true and you need to pass false to the element, it used to be a historical problem. OMI has solved this problem perfectly. You can set it through the string `'0'` or the string `'false'`.\\n\\n```js\\ndefine('my-element', class extends WeElement {\\n static defaultProps = {\\n show: true\\n }\\n\\n static propTypes = {\\n show: Boolean\\n }\\n\\n render(props) {\\n ...\\n ...\\n }\\n})\\n```\\n\\nUse:\\n\\n```html\\n\\n```\\n\\nor\\n\\n```html\\n\\n```\\n\\n## Using omiu in react\\n\\n```jsx\\n/** @jsx nativeEvents */\\nimport nativeEvents from 'jsx-native-events'\\nimport { useState } from 'react'\\nimport '@omiu/icon-button'\\n\\nexport default function SomeComponent(props) {\\n const [result, setSwitch] = useState(false)\\n\\n return (\\n
\\n

The switch is {result ? 'on' : 'off'}

\\n setSwitch(e.detail.isOn)}>\\n \\n
\\n )\\n}\\n```\\n\\nMany thanks to calebdwilliams's [jsx-native-events](https://github.com/calebdwilliams/jsx-native-events#readme)。\\n\\n## Using omiu in Vue\\n\\n```html\\n\\n\\n\\n```\\n\\n\\n## Contribution\\n\\nBuild:\\n\\n```bash\\nnpm run build\\n```\\n\\nBuild Demo:\\n\\n```bash\\nnpm start \\n```\\n\\nPublic to npm:\\n\\n```bash\\nnpm publish --access public\\n```\\n\\n## Related links\\n\\n* [material icon search](https://material-ui.com/zh/components/material-icons/) \\n\\nConverting upper case to middle dash is the corresponding omiu component. Such as `@material-ui/icons/AccessAlarm`, the omiu element is:\\n\\n```js\\nimport '@omiu/icon/access-alarm'\\n```\\n\\nUsing in html:\\n\\n```html\\n\\n```\\n\\nSo Easy!\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/introduction.md\n// module id = 41\n// module chunks = 8"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/7.32912d9d.chunk.js b/components/docs/static/js/9.e4b040ab.chunk.js similarity index 92% rename from components/docs/static/js/7.32912d9d.chunk.js rename to components/docs/static/js/9.e4b040ab.chunk.js index 71f7e0f06..efdc7ac4b 100644 --- a/components/docs/static/js/7.32912d9d.chunk.js +++ b/components/docs/static/js/9.e4b040ab.chunk.js @@ -1,2 +1,2 @@ -webpackJsonp([7],{40:function(n,o){n.exports="## Button \n\nClick or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.\n\n\n\n## Import\n\n```js\nimport '@omiu/button'\n```\n\nOr use script tag to ref it.\n\n```html\n\\n```\\n\\n## Usage\\n\\n```html\\nPrimary Button\\n```\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### defaultProps\\n\\n```jsx\\n{\\n plain: boolean;\\n round: boolean;\\n circle: boolean;\\n loading: boolean;\\n disabled: boolean;\\n autofocus: boolean;\\n nativeType: string;\\n block: boolean;\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/7.32912d9d.chunk.js","module.exports = \"## Button \\n\\nClick or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.\\n\\n\\n\\n## Import\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nOr use script tag to ref it.\\n\\n```html\\n\\n```\\n\\n## Usage\\n\\n```html\\nPrimary Button\\n```\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### defaultProps\\n\\n```jsx\\n{\\n plain: boolean;\\n round: boolean;\\n circle: boolean;\\n loading: boolean;\\n disabled: boolean;\\n autofocus: boolean;\\n nativeType: string;\\n block: boolean;\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/button.md\n// module id = 40\n// module chunks = 7"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../static/js/9.e4b040ab.chunk.js","docs/en/button.md"],"names":["webpackJsonp","40","module","exports"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU","file":"static/js/9.e4b040ab.chunk.js","sourcesContent":["webpackJsonp([9],{\n\n/***/ 40:\n/***/ (function(module, exports) {\n\nmodule.exports = \"## Button \\n\\nClick or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.\\n\\n\\n\\n## Import\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nOr use script tag to ref it.\\n\\n```html\\n\\n```\\n\\n## Usage\\n\\n```html\\nPrimary Button\\n```\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### defaultProps\\n\\n```jsx\\n{\\n plain: boolean;\\n round: boolean;\\n circle: boolean;\\n loading: boolean;\\n disabled: boolean;\\n autofocus: boolean;\\n nativeType: string;\\n block: boolean;\\n}\\n```\\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/9.e4b040ab.chunk.js","module.exports = \"## Button \\n\\nClick or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.\\n\\n\\n\\n## Import\\n\\n```js\\nimport '@omiu/button'\\n```\\n\\nOr use script tag to ref it.\\n\\n```html\\n\\n```\\n\\n## Usage\\n\\n```html\\nPrimary Button\\n```\\n\\n## API\\n\\n### Props\\n\\n```jsx\\n{\\n size?: 'medium' | 'small' | 'mini';\\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';\\n plain?: boolean;\\n round?: boolean;\\n circle?: boolean;\\n loading?: boolean;\\n disabled?: boolean;\\n icon?: string;\\n autofocus?: boolean;\\n nativeType?: 'button' | 'submit' | 'reset';\\n block?: boolean;\\n}\\n```\\n\\n### defaultProps\\n\\n```jsx\\n{\\n plain: boolean;\\n round: boolean;\\n circle: boolean;\\n loading: boolean;\\n disabled: boolean;\\n autofocus: boolean;\\n nativeType: string;\\n block: boolean;\\n}\\n```\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs/en/button.md\n// module id = 40\n// module chunks = 9"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/cn.4e3e7d7c.js b/components/docs/static/js/cn.4e3e7d7c.js new file mode 100644 index 000000000..fcddaee85 --- /dev/null +++ b/components/docs/static/js/cn.4e3e7d7c.js @@ -0,0 +1,2 @@ +!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,r,i){for(var a,s,u=0,c=[];u2;)Ie.push(arguments[a]);for(t&&null!=t.children&&(Ie.length||Ie.push(t.children),delete t.children);Ie.length;)if((r=Ie.pop())&&void 0!==r.pop)for(a=r.length;a--;)Ie.push(r[a]);else"boolean"===typeof r&&(r=null),(i="function"!==typeof e)&&(null==r?r="":"number"===typeof r?r=String(r):"string"!==typeof r&&(i=!1)),i&&n?s[s.length-1]+=r:0===s.length?s=[r]:s.push(r),n=i;var u=new o;return u.nodeName=e,u.children=s,u.attributes=null==t?void 0:t,u.key=null==t?void 0:t.key,void 0!==Ue.vnode&&Ue.vnode(u),u}function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function s(e,t){for(var n,r,o=a(e),i=1;i2?[].slice.call(arguments,2):e.children)}function b(e){1==Qe.push(e)&&(Ue.debounceRendering||Ge)(v)}function v(){for(var e;e=Qe.pop();)X(e)}function g(e,t,n){if("string"===typeof t||"number"===typeof t)return void 0!==e.splitText;if("string"===typeof t.nodeName){var r=qe[t.nodeName];return r?n||e._componentConstructor===r:!e._componentConstructor&&_(e,t.nodeName)}return n||e._componentConstructor===t.nodeName}function _(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function w(e){var t=u({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function A(e,t){var n=t?Ue.doc.createElementNS("http://www.w3.org/2000/svg",e):Ue.doc.createElement(e);return n.normalizedNodeName=e,n}function x(e){for(var t=e.replace(/\/\*(.|\s)*?\*\//g," ").replace(/\s+/g," "),n={},r=t.match(/ ?(.*?) ?{([^}]*)}/)||[o,i,t],o=r[0],i=r[1],a=r[2],s=a.split(";").map(function(e){return e.split(":").map(function(e){return e&&e.trim()})}),u=s,u=Array.isArray(u),u=0,u=u||u[Symbol.iterator]();;){var c;if(u){if(u>=u.length)break;c=u[u++]}else{if(u=u.next(),u.done)break;c=u.value}var l=c,f=l[0],p=l[1];n[function(e){return e.replace(/\W+\w/g,function(e){return e.slice(-1).toUpperCase()})}(f)]=p}return n}function O(e){var t=e.parentNode;t&&t.removeChild(e)}function E(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)c(n,null),c(r,e);else if("class"!==t||o)if("style"===t)if(Ue.isWeb){if(r&&"string"!==typeof r&&"string"!==typeof n||(e.style.cssText=r||""),r&&"object"===("undefined"===typeof r?"undefined":Be(r))){if("string"!==typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"===typeof r[i]&&!1===We.test(i)?r[i]+"px":r[i]}}else{var a=n,s=r;"string"===typeof n&&(a=x(n)),"string"==typeof r&&(s=x(r));var u={},l=!1;if(a){for(var f in a)"object"!=("undefined"===typeof s?"undefined":Be(s))||f in s||(u[f]="",l=!0);for(var p in s)s[p]!==a[p]&&(u[p]=s[p],l=!0);l&&e.setStyles(u)}else e.setStyles(s)}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var d=t!==(t=t.replace(/Capture$/,"")),h=t.toLowerCase();t=(h in e?h:t).slice(2),r?n||(e.addEventListener(t,j,d),"tap"==t&&(e.addEventListener("touchstart",k,d),e.addEventListener("touchend",T,d))):(e.removeEventListener(t,j,d),"tap"==t&&(e.removeEventListener("touchstart",k,d),e.removeEventListener("touchend",T,d))),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)S(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var y=o&&t!==(t=t.replace(/^xlink:?/,""));null==r||!1===r?y?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!==typeof r&&(y?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function S(e,t,n){try{e[t]=n}catch(e){}}function j(e){return this._listeners[e.type](Ue.event&&Ue.event(e)||e)}function k(e){this.___touchX=e.touches[0].pageX,this.___touchY=e.touches[0].pageY,this.___scrollTop=document.body.scrollTop}function T(e){Math.abs(e.changedTouches[0].pageX-this.___touchX)<30&&Math.abs(e.changedTouches[0].pageY-this.___touchY)<30&&Math.abs(document.body.scrollTop-this.___scrollTop)<30&&this.dispatchEvent(new CustomEvent("tap",{detail:e}))}function C(e){for(var t=0,n=Ue.styleCache.length;t-1;)if(t===e[n])return!0;return!1}function ce(e,t){return"#"===t?e:t.split("-")[1]}function le(e,t,n,r,o){if(t="string"===typeof t?document.querySelector(t):t,n)if(n.data)fe(n);else{Ue.isMultiStore=!0;for(var i in n)n[i].data&&fe(n[i],i)}if(r)for(;t.firstChild;)t.removeChild(t.firstChild);return o&&(o="string"===typeof o?document.querySelector(o):o),$(o,e,n,!1,t,!1)}function fe(e,t){e.instances=[],e.updateSelfInstances=[],de(e,t),K(e.data,function(t,n,r,o){var i={};i[be(o+"-"+t)]=!0,e.update(i)})}function pe(e,t,n){return fe(n),t="string"===typeof t?document.querySelector(t):t,$(t,e,n)}function de(e,t){e.update=function(n){Object.keys(n).length>0&&(this.instances.forEach(function(r){he(r,t),t?r._updatePath&&r._updatePath[t]&&ye(n,r._updatePath[t])&&(r.use&&f(e.data,("function"===typeof r.use?r.use():r.use)[t],r.using,t),r.update()):r._updatePath&&ye(n,r._updatePath)&&(r.use&&(r.using=f(e.data,"function"===typeof r.use?r.use():r.use)),r.update())}),this.updateSelfInstances.forEach(function(r){he(r,t),t?r._updateSelfPath&&r._updateSelfPath[t]&&ye(n,r._updateSelfPath[t])&&(r.useSelf&&f(e.data,("function"===typeof r.useSelf?r.useSelf():r.useSelf)[t],r.usingSelf,t),r.updateSelf()):r._updateSelfPath&&ye(n,r._updateSelfPath)&&(r.usingSelf=f(e.data,"function"===typeof r.useSelf?r.useSelf():r.useSelf),r.updateSelf())}),this.onChange&&this.onChange(n))}}function he(e,t){if(e.compute)for(var n in e.compute)e.computed[n]=e.compute[n].call(t?e.store:e.store.data)}function ye(e,t){for(var n in e){if(t[n])return!0;for(var r in t)if(me(n,r))return!0}return!1}function me(e,t){if(0===e.indexOf(t)){var n=e.substr(t.length,1);if("["===n||"."===n)return!0}return!1}function be(e){var t="";return e.replace("#-","").split("-").forEach(function(e,n){n?isNaN(Number(e))?t+="."+e:t+="["+e+"]":t+=e}),t}function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":Be(t))&&"function"!==typeof t?e:t}function _e(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":Be(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function we(e,t,n){if("WeElement"===t.is)Ue.mapping[e]=t;else{n="string"===typeof n?{css:n}:n||{};var r=function(e){function r(){var t,o,i;ve(this,r);for(var a=arguments.length,s=Array(a),u=0;u0)return{class:Oe.apply(null,n)}}function Se(e){var t=e.base;if(t)for(;t.parentNode;){if(t.parentNode._component)return t.parentNode._component;t=t.parentNode}}function je(e){var t="";for(var n in e){var r=e[n];null!=r&&(t&&(t+=" "),t+=pt[n]||(pt[n]=n.replace(/([A-Z])/g,"-$1").toLowerCase()),t+=": ",t+=r,"number"===typeof r&&!1===IS_NON_DIMENSIONAL.test(n)&&(t+="px"),t+=";")}return t||void 0}function ke(e,t,n,r){n=n||{},t=Object.assign({scopedCSS:!0},t);var o={},i=Te(e,t,n,r,o);return{css:Object.values(o),html:i}}function Te(e,t,n,r,o){if(null==e||"boolean"===typeof e)return"";var i=e.nodeName,a=e.attributes,s=!1,u=t.pretty,c=u&&"string"===typeof u?u:"\t";if("object"!==("undefined"===typeof e?"undefined":Be(e))&&!i)return st(e);var l=ct[i];if(l){s=!0;var f,p=Pe(e),d=new l(p,n);if(d._disable=d.__x=!0,d.props=p,d.store=n,d.install&&d.install(),d.beforeRender&&d.beforeRender(),f=d.render(d.props,d.store),t.scopedCSS){if(d.constructor.css||d.css){var h=d.constructor.css?d.constructor.css:"function"===typeof d.css?d.css():d.css,y="_s"+C(d.constructor);o[y]={id:y,css:P(h,y)},M(f,y)}d.scopedCSSAttr=e.css,I(f,d.scopedCSSAttr)}return Te(f,t,n,!1,o)}var m,b="";if(a){var v=Object.keys(a);t&&!0===t.sortAttributes&&v.sort();for(var g=0;g]/)&&(t&&t.allAttributes||"key"!==_&&"ref"!==_))){if("className"===_){if(a.class)continue;_="class"}else r&&_.match(/^xlink:?./)&&(_=_.toLowerCase().replace(/^xlink:?/,"xlink:"));"style"===_&&w&&"object"===("undefined"===typeof w?"undefined":Be(w))&&(w=je(w));var A=t.attributeHook&&t.attributeHook(_,w,n,t,s);if(A||""===A)b+=A;else if("dangerouslySetInnerHTML"===_)m=w&&w.__html;else if((w||0===w||""===w)&&"function"!==typeof w){if((!0===w||""===w)&&(w=_,!t||!t.xml)){b+=" "+_;continue}b+=" "+_+'="'+st(w)+'"'}}}}if(u){var x=b.replace(/^\n\s*/," ");x===b||~x.indexOf("\n")?u&&~b.indexOf("\n")&&(b+="\n"):b=x}if(b="<"+i+b+">",String(i).match(/[\s\n\\\/='"\0<>]/))throw b;var O=String(i).match(lt);O&&(b=b.replace(/>$/," />"));var E=[];if(m)u&&ft(m)&&(m="\n"+c+ut(m,c)),b+=m;else if(e.children){for(var S=u&&~b.indexOf("\n"),g=0;g";return O||(u&&~b.indexOf("\n")&&(b+="\n"),b+=""),b}function Ce(e,t){for(var n in t)e[n]=t[n];return e}function Pe(e){var t=Ce({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function Ne(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.obaa=t.html=t.merge=t.tag=t.renderToString=t.getHost=t.extractClass=t.classNames=t.defineElement=t.rpx=t.define=t.WeElement=t.options=t.rerender=t.render=t.Component=t.createRef=t.cloneElement=t.createElement=t.h=t.htm=void 0;var Be="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me=n(10);Object.defineProperty(t,"htm",{enumerable:!0,get:function(){return r(Me).default}});var Re=r(Me),Ue={scopedStyle:!0,mapping:{},isWeb:!0,staticStyleMapping:{},doc:"object"===("undefined"===typeof document?"undefined":Be(document))?document:null,root:function(){return"object"===("undefined"===typeof e?"undefined":Be(e))&&e&&e.Math===Math&&e.Array===Array?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof e?e:function(){return this}()}(),styleCache:[],isMultiStore:!1},Ie=[],Le=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable;if("undefined"!==typeof Element&&!Element.prototype.addEventListener){var Fe=function(e){e||(e=window.event);for(var t=0,n=0,r=ze[e.type];n8&&(He=!0)}var Ge=He?Promise.resolve().then.bind(Promise.resolve()):setTimeout,We=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Qe=[],qe=Ue.mapping,Xe=0,Ze=[],Je=0,Ye=!1,Ke=!1,et={},tt=0,nt=function(){function e(t,n){Y(this,e),this.props=s({},this.constructor.defaultProps,t),this.elementId=tt++,this._preCss=null,this.store=n,this.computed={}}return e.prototype.update=function(e,t,n){this._willUpdate||(this._willUpdate=!0,n&&(this._renderCallbacks=this._renderCallbacks||[]).push(n),X(this,2),Ue.componentChange&&Ue.componentChange(this,this.base),this._willUpdate=!1)},e.prototype.updateSelf=function(){this._willUpdateSelf||(this._willUpdateSelf=!0,X(this,2,null,null,!0),this._willUpdateSelf=!1)},e.prototype.fire=function(e,t){var n=this;Object.keys(this.props).every(function(r){return"on"+e.toLowerCase()!==r.toLowerCase()||(n.props[r]({detail:t}),!1)})},e.prototype.render=function(){},e}();nt.is="WeElement";var rt=["concat","copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift","size"].join(","),ot=["concat","copyWithin","entries","every","fill","filter","find","findIndex","forEach","includes","indexOf","join","keys","lastIndexOf","map","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","toLocaleString","toString","unshift","values","size"];K.add=function(e,t){te(e,t,e.$_o_.$_p_,e.$_o_.$_r_)},K.set=function(e,t,n){void 0===e[t]&&te(e,t,e.$_o_.$_p_,e.$_o_.$_r_),e[t]=n},Array.prototype.size=function(e){this.length=e};var it=["use","useSelf"],at={}.hasOwnProperty,st=function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},ut=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"\t"))},ct=Ue.mapping,lt=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,ft=function(e,t,n){return String(e).length>(t||40)||!n&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},pt={};i.f=y;var dt=Re.default.bind(i),ht=nt,yt=we;Ue.root.Omi={h:i,createElement:i,cloneElement:m,createRef:Ne,Component:nt,render:le,rerender:v,options:Ue,WeElement:ht,define:we,rpx:Ae,defineElement:yt,classNames:Oe,extractClass:Ee,getHost:Se,renderToString:ke,tag:xe,merge:pe,html:dt,htm:Re.default,obaa:K},Ue.root.omi=Ue.root.Omi,Ue.root.Omi.version="omio-2.8.0";var mt={h:i,createElement:i,cloneElement:m,createRef:Ne,Component:nt,render:le,rerender:v,options:Ue,WeElement:ht,define:we,rpx:Ae,defineElement:yt,classNames:Oe,extractClass:Ee,getHost:Se,renderToString:ke,tag:xe,merge:pe,html:dt,htm:Re.default,obaa:K};t.default=mt,t.h=i,t.createElement=i,t.cloneElement=m,t.createRef=Ne,t.Component=nt,t.render=le,t.rerender=v,t.options=Ue,t.WeElement=ht,t.define=we,t.rpx=Ae,t.defineElement=yt,t.classNames=Oe,t.extractClass=Ee,t.getHost=Se,t.renderToString=ke,t.tag=xe,t.merge=pe,t.html=dt,t.obaa=K}).call(t,n(2))},function(e,t,n){"use strict";function r(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"===typeof btoa){var i=o(r);return[n].concat(r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function o(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"===typeof e&&(e=[[null,e,""]]);for(var r={},o=0;oc){for(var t=0,n=a.length-u;t-1?t:e}function d(e,t){t=t||{};var n=t.body;if(e instanceof d){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function y(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function m(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var b={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(b.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=function(e){return e&&DataView.prototype.isPrototypeOf(e)},_=ArrayBuffer.isView||function(e){return e&&v.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},b.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},f.call(d.prototype),f.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];m.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=d,e.Response=m,e.fetch=function(e,t){return new Promise(function(n,r){var o=new d(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new m(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&b.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:void 0)},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;c1?t:t[0]};var r=function e(t,n,r,o){for(var i=1;i=5&&((o||!e&&5===r)&&(a.push(o,r,n),r=6),e&&(a.push(e,r,n),r=6)),o=""},u=0;u"===t?(r=1,o=""):o=t+o[0]:i?t===i?i="":o+=t:'"'===t||"'"===t?i=t:">"===t?(s(),r=1):r&&("="===t?(r=5,n=o,o=""):"/"===t&&(r<5||">"===e[u][c+1])?(s(),3===r&&(a=a[0]),r=a,(a=a[0]).push(r,2),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),r=2):o+=t),3===r&&"!--"===o&&(r=4,a=a[0])}return s(),a},i="function"==typeof Map,a=i?new Map:{},s=i?function(e){var t=a.get(e);return t||a.set(e,t=o(e)),t}:function(e){for(var t="",n=0;n0)return!1;return!0}},{key:"render",value:function(){if(this.demo)return Omi.h("div",null,this.show&&Omi.h("iframe",{style:"height:"+(window.innerHeight-59)+"px",src:this.demo}),!this.show&&Omi.h("div",{class:"switch code",onClick:this.onShow},Omi.h("img",{src:n(33)})),this.show&&Omi.h("div",{class:"switch close",onClick:this.onClose},Omi.h("img",{src:n(34)})))}}]),t}(s.WeElement))},function(e,t,n){var r=n(32);e.exports="string"===typeof r?r:r.toString()},function(e,t,n){t=e.exports=n(1)(void 0),t.push([e.i,"iframe{\n width: 750px;\n height: 100%;\n top: 60px;\n right: 0;\n position: fixed;\n border: none;\n z-index: 9999;\n border-left: 2px solid #24292E;\n}\n\n.switch{\n width: 40px;\n height: 40px;\n background-color: #AA0000;\n border-radius: 50%;\n position: fixed;\n right: 50px;\n bottom: 50px;\n cursor: pointer;\n text-align: center;\n z-index: 10000;\n}\n\n.switch img{\n width: 30px;\n height: 30px;\n margin-top:5px;\n}\n\n.switch.close img{\n margin-top:10px;\n width: 20px;\n height: 20px;\n}\n\n\n@media only screen and (max-width: 800px) {\n iframe{\n width: 100%;\n }\n}\n",""])},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0&&(n[t[r].replace(":","")]=e)}),n}function i(e,t){c[e]={callback:t,reg:u(e)}}function a(e){e=e.replace(/#.*$/,"");var t,n=e.split(/[?&]/).slice(1),r={};for(t=0;t-1)&&(y=x,a=a.slice(0,A))}a&&(r.push(a),a="",f=!1);var O="+"===w||"*"===w,E="?"===w||"*"===w,S=g||_,j=y||s;r.push({name:m||o++,prefix:y,delimiter:j,optional:E,repeat:O,pattern:S?c(S):"[^"+u(j===s?j:j+s)+"]+?"})}}return(a||iHello!`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */function h(nodeName,attributes){var children=[],lastSimple,child,simple,i;for(i=arguments.length;i-->2;){stack.push(arguments[i]);}if(attributes&&attributes.children!=null){if(!stack.length)stack.push(attributes.children);delete attributes.children;}while(stack.length){if((child=stack.pop())&&child.pop!==undefined){for(i=child.length;i--;){stack.push(child[i]);}}else{if(typeof child==='boolean')child=null;if(simple=typeof nodeName!=='function'){if(child==null)child='';else if(typeof child==='number')child=String(child);else if(typeof child!=='string')simple=false;}if(simple&&lastSimple){children[children.length-1]+=child;}else if(children.length===0){children=[child];}else{children.push(child);}lastSimple=simple;}}var p=new VNode();p.nodeName=nodeName;p.children=children;p.attributes=attributes==null?undefined:attributes;p.key=attributes==null?undefined:attributes.key;// if a \"vnode hook\" is defined, pass every created VNode to it\nif(options.vnode!==undefined)options.vnode(p);return p;}/* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError('Object.assign cannot be called with null or undefined');}return Object(val);}function assign(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s8){usePromise=true;}}}var defer=usePromise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function isArray(obj){return Object.prototype.toString.call(obj)==='[object Array]';}function getUse(data,paths,out,name){var obj=[];paths.forEach(function(path,index){var isPath=typeof path==='string';if(isPath){obj[index]=getTargetByPath(data,path);}else{var key=Object.keys(path)[0];var value=path[key];if(typeof value==='string'){obj[index]=getTargetByPath(data,value);}else{var tempPath=value[0];if(typeof tempPath==='string'){var tempVal=getTargetByPath(data,tempPath);obj[index]=value[1]?value[1](tempVal):tempVal;}else{var args=[];tempPath.forEach(function(path){args.push(getTargetByPath(data,path));});obj[index]=value[1].apply(null,args);}}obj[key]=obj[index];}});out&&(out[name]=obj);return obj;}function getTargetByPath(origin,path){var arr=path.replace(/]/g,'').replace(/\\[/g,'.').split('.');var current=origin;for(var i=0,len=arr.length;i2?[].slice.call(arguments,2):vnode.children);}// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL$1=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;/** Managed queue of dirty components to be re-rendered */var items=[];function enqueueRender(component){if(items.push(component)==1){(options.debounceRendering||defer)(rerender);}}/** Rerender all enqueued dirty components */function rerender(){var p;while(p=items.pop()){renderComponent(p);}}var mapping=options.mapping;/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */function isSameNodeType(node,vnode,hydrating){if(typeof vnode==='string'||typeof vnode==='number'){return node.splitText!==undefined;}if(typeof vnode.nodeName==='string'){var ctor=mapping[vnode.nodeName];if(ctor){return hydrating||node._componentConstructor===ctor;}return!node._componentConstructor&&isNamedNode(node,vnode.nodeName);}return hydrating||node._componentConstructor===vnode.nodeName;}/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */function isNamedNode(node,nodeName){return node.normalizedNodeName===nodeName||node.nodeName.toLowerCase()===nodeName.toLowerCase();}/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */function getNodeProps(vnode){var props=extend({},vnode.attributes);props.children=vnode.children;var defaultProps=vnode.nodeName.defaultProps;if(defaultProps!==undefined){for(var i in defaultProps){if(props[i]===undefined){props[i]=defaultProps[i];}}}return props;}/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */function createNode(nodeName,isSvg){var node=isSvg?options.doc.createElementNS('http://www.w3.org/2000/svg',nodeName):options.doc.createElement(nodeName);node.normalizedNodeName=nodeName;return node;}function parseCSSText(cssText){var cssTxt=cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g,' ').replace(/\\s+/g,' ');var style={},_ref=cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt],a=_ref[0],b=_ref[1],rule=_ref[2];var cssToJs=function cssToJs(s){return s.replace(/\\W+\\w/g,function(match){return match.slice(-1).toUpperCase();});};var properties=rule.split(';').map(function(o){return o.split(':').map(function(x){return x&&x.trim();});});for(var i=properties,i=Array.isArray(i),i=0,i=i?i:i[Symbol.iterator]();;){var _ref3;if(i){if(i>=i.length)break;_ref3=i[i++];}else{i=i.next();if(i.done)break;_ref3=i.value;}var _ref2=_ref3;var property=_ref2[0];var value=_ref2[1];style[cssToJs(property)]=value;}return style;}/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */function removeNode(node){var parentNode=node.parentNode;if(parentNode)parentNode.removeChild(node);}/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */function setAccessor(node,name,old,value,isSvg){if(name==='className')name='class';if(name==='key'){// ignore\n}else if(name==='ref'){applyRef(old,null);applyRef(value,node);}else if(name==='class'&&!isSvg){node.className=value||'';}else if(name==='style'){if(options.isWeb){if(!value||typeof value==='string'||typeof old==='string'){node.style.cssText=value||'';}if(value&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'){if(typeof old!=='string'){for(var i in old){if(!(i in value))node.style[i]='';}}for(var i in value){node.style[i]=typeof value[i]==='number'&&IS_NON_DIMENSIONAL$1.test(i)===false?value[i]+'px':value[i];}}}else{var oldJson=old,currentJson=value;if(typeof old==='string'){oldJson=parseCSSText(old);}if(typeof value=='string'){currentJson=parseCSSText(value);}var result={},changed=false;if(oldJson){for(var key in oldJson){if((typeof currentJson==='undefined'?'undefined':_typeof(currentJson))=='object'&&!(key in currentJson)){result[key]='';changed=true;}}for(var ckey in currentJson){if(currentJson[ckey]!==oldJson[ckey]){result[ckey]=currentJson[ckey];changed=true;}}if(changed){node.setStyles(result);}}else{node.setStyles(currentJson);}}}else if(name==='dangerouslySetInnerHTML'){if(value)node.innerHTML=value.__html||'';}else if(name[0]=='o'&&name[1]=='n'){var useCapture=name!==(name=name.replace(/Capture$/,''));var nameLower=name.toLowerCase();name=(nameLower in node?nameLower:name).slice(2);if(value){if(!old){node.addEventListener(name,eventProxy,useCapture);if(name=='tap'){node.addEventListener('touchstart',touchStart,useCapture);node.addEventListener('touchend',touchEnd,useCapture);}}}else{node.removeEventListener(name,eventProxy,useCapture);if(name=='tap'){node.removeEventListener('touchstart',touchStart,useCapture);node.removeEventListener('touchend',touchEnd,useCapture);}}(node._listeners||(node._listeners={}))[name]=value;}else if(name!=='list'&&name!=='type'&&!isSvg&&name in node){setProperty(node,name,value==null?'':value);if(value==null||value===false)node.removeAttribute(name);}else{var ns=isSvg&&name!==(name=name.replace(/^xlink:?/,''));if(value==null||value===false){if(ns)node.removeAttributeNS('http://www.w3.org/1999/xlink',name.toLowerCase());else node.removeAttribute(name);}else if(typeof value!=='function'){if(ns)node.setAttributeNS('http://www.w3.org/1999/xlink',name.toLowerCase(),value);else node.setAttribute(name,value);}}}/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */function setProperty(node,name,value){try{node[name]=value;}catch(e){}}/** Proxy an event to hooked event handlers\n *\t@private\n */function eventProxy(e){return this._listeners[e.type](options.event&&options.event(e)||e);}function touchStart(e){this.___touchX=e.touches[0].pageX;this.___touchY=e.touches[0].pageY;this.___scrollTop=document.body.scrollTop;}function touchEnd(e){if(Math.abs(e.changedTouches[0].pageX-this.___touchX)<30&&Math.abs(e.changedTouches[0].pageY-this.___touchY)<30&&Math.abs(document.body.scrollTop-this.___scrollTop)<30){this.dispatchEvent(new CustomEvent('tap',{detail:e}));}}var styleId=0;function getCtorName(ctor){for(var i=0,len=options.styleCache.length;i-1;){if(item===arr[i])return true;}return false;}function getRootName(prop,path){if(path==='#'){return prop;}return path.split('-')[1];}obaa.add=function(obj,prop){watch(obj,prop,obj.$_o_.$_p_,obj.$_o_.$_r_);};obaa.set=function(obj,prop,value){if(obj[prop]===undefined){watch(obj,prop,obj.$_o_.$_p_,obj.$_o_.$_r_);}obj[prop]=value;};Array.prototype.size=function(length){this.length=length;};/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {object} [store]\n *\t@public\n */function render(vnode,parent,store,empty,merge){parent=typeof parent==='string'?document.querySelector(parent):parent;if(store){if(store.data){obsStore(store);}else{options.isMultiStore=true;for(var key in store){if(store[key].data){obsStore(store[key],key);}}}}if(empty){while(parent.firstChild){parent.removeChild(parent.firstChild);}}if(merge){merge=typeof merge==='string'?document.querySelector(merge):merge;}return diff(merge,vnode,store,false,parent,false);}function obsStore(store,storeName){store.instances=[];store.updateSelfInstances=[];extendStoreUpate(store,storeName);obaa(store.data,function(prop,val,old,path){var patchs={};var key=fixPath(path+'-'+prop);patchs[key]=true;store.update(patchs);});}function merge(vnode,merge,store){obsStore(store);merge=typeof merge==='string'?document.querySelector(merge):merge;return diff(merge,vnode,store);}function extendStoreUpate(store,key){store.update=function(patch){if(Object.keys(patch).length>0){this.instances.forEach(function(instance){compute(instance,key);if(key){if(instance._updatePath&&instance._updatePath[key]&&needUpdate(patch,instance._updatePath[key])){if(instance.use){getUse(store.data,(typeof instance.use==='function'?instance.use():instance.use)[key],instance.using,key);}instance.update();}}else{if(instance._updatePath&&needUpdate(patch,instance._updatePath)){if(instance.use){instance.using=getUse(store.data,typeof instance.use==='function'?instance.use():instance.use);}instance.update();}}});this.updateSelfInstances.forEach(function(instance){compute(instance,key);if(key){if(instance._updateSelfPath&&instance._updateSelfPath[key]&&needUpdate(patch,instance._updateSelfPath[key])){if(instance.useSelf){getUse(store.data,(typeof instance.useSelf==='function'?instance.useSelf():instance.useSelf)[key],instance.usingSelf,key);}instance.updateSelf();}}else{if(instance._updateSelfPath&&needUpdate(patch,instance._updateSelfPath)){instance.usingSelf=getUse(store.data,typeof instance.useSelf==='function'?instance.useSelf():instance.useSelf);instance.updateSelf();}}});this.onChange&&this.onChange(patch);}};}function compute(instance,isMultiStore){if(instance.compute){for(var ck in instance.compute){instance.computed[ck]=instance.compute[ck].call(isMultiStore?instance.store:instance.store.data);}}}function needUpdate(diffResult,updatePath){for(var keyA in diffResult){if(updatePath[keyA]){return true;}for(var keyB in updatePath){if(includePath(keyA,keyB)){return true;}}}return false;}function includePath(pathA,pathB){if(pathA.indexOf(pathB)===0){var next=pathA.substr(pathB.length,1);if(next==='['||next==='.'){return true;}}return false;}function fixPath(path){var mpPath='';var arr=path.replace('#-','').split('-');arr.forEach(function(item,index){if(index){if(isNaN(Number(item))){mpPath+='.'+item;}else{mpPath+='['+item+']';}}else{mpPath+=item;}});return mpPath;}function _classCallCheck$1(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");}return call&&((typeof call==='undefined'?'undefined':_typeof(call))===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+(typeof superClass==='undefined'?'undefined':_typeof(superClass)));}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var storeHelpers=['use','useSelf'];function define(name,ctor,config){if(ctor.is==='WeElement'){options.mapping[name]=ctor;}else{if(typeof config==='string'){config={css:config};}else{config=config||{};}var Comp=function(_Component){_inherits(Comp,_Component);function Comp(){var _temp,_this,_ret;_classCallCheck$1(this,Comp);for(var _len=arguments.length,args=Array(_len),key=0;key<_len;key++){args[key]=arguments[key];}return _ret=(_temp=(_this=_possibleConstructorReturn(this,_Component.call.apply(_Component,[this].concat(args))),_this),_this.compute=config.compute,_temp),_possibleConstructorReturn(_this,_ret);}Comp.prototype.render=function render(){return ctor.call(this,this);};return Comp;}(Component);Comp.css=config.css;Comp.propTypes=config.propTypes;Comp.defaultProps=config.defaultProps;var _loop=function _loop(key){if(typeof config[key]==='function'){Comp.prototype[key]=function(){return config[key].apply(this,arguments);};}};for(var key in config){_loop(key);}storeHelpers.forEach(function(func){if(config[func]&&config[func]!=='function'){Comp.prototype[func]=function(){return config[func];};}});options.mapping[name]=Comp;}}function rpx(str){return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g,function(a,b){return window.innerWidth*Number(b)/750+'px';});}function tag(name){return function(target){define(name,target);};}/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */var hasOwn={}.hasOwnProperty;function classNames(){var classes=[];for(var i=0;i0){return{'class':classNames.apply(null,args)};}}function getHost(component){var base=component.base;if(base){while(base.parentNode){if(base.parentNode._component){return base.parentNode._component;}else{base=base.parentNode;}}}}/**\n * preact-render-to-string based on preact-render-to-string\n * by Jason Miller\n * Licensed under the MIT License\n * https://github.com/developit/preact-render-to-string\n *\n * modified by dntzhang\n */var encodeEntities=function encodeEntities(s){return String(s).replace(/&/g,'&').replace(//g,'>').replace(/\"/g,'"');};var indent=function indent(s,char){return String(s).replace(/(\\n+)/g,'$1'+(char||'\\t'));};var mapping$1=options.mapping;var VOID_ELEMENTS=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;var isLargeString=function isLargeString(s,length,ignoreLines){return String(s).length>(length||40)||!ignoreLines&&String(s).indexOf('\\n')!==-1||String(s).indexOf('<')!==-1;};var JS_TO_CSS={};// Convert an Object style to a CSSText string\nfunction styleObjToCss(s){var str='';for(var prop in s){var val=s[prop];if(val!=null){if(str)str+=' ';// str += jsToCss(prop);\nstr+=JS_TO_CSS[prop]||(JS_TO_CSS[prop]=prop.replace(/([A-Z])/g,'-$1').toLowerCase());str+=': ';str+=val;if(typeof val==='number'&&IS_NON_DIMENSIONAL.test(prop)===false){str+='px';}str+=';';}}return str||undefined;}function renderToString(vnode,opts,store,isSvgMode){store=store||{};opts=Object.assign({scopedCSS:true},opts);var css={};var html=_renderToString(vnode,opts,store,isSvgMode,css);return{css:Object.values(css),html:html};}/** The default export is an alias of `render()`. */function _renderToString(vnode,opts,store,isSvgMode,css){if(vnode==null||typeof vnode==='boolean'){return'';}var nodeName=vnode.nodeName,attributes=vnode.attributes,isComponent=false;var pretty=true&&opts.pretty,indentChar=pretty&&typeof pretty==='string'?pretty:'\\t';// #text nodes\nif((typeof vnode==='undefined'?'undefined':_typeof(vnode))!=='object'&&!nodeName){return encodeEntities(vnode);}// components\nvar ctor=mapping$1[nodeName];if(ctor){isComponent=true;var props=getNodeProps$1(vnode),rendered;// class-based components\nvar c=new ctor(props,store);// turn off stateful re-rendering:\nc._disable=c.__x=true;c.props=props;c.store=store;if(c.install)c.install();if(c.beforeRender)c.beforeRender();rendered=c.render(c.props,c.store);if(opts.scopedCSS){if(c.constructor.css||c.css){var cssStr=c.constructor.css?c.constructor.css:typeof c.css==='function'?c.css():c.css;var cssAttr='_s'+getCtorName(c.constructor);css[cssAttr]={id:cssAttr,css:scoper(cssStr,cssAttr)};addScopedAttrStatic(rendered,cssAttr);}c.scopedCSSAttr=vnode.css;scopeHost(rendered,c.scopedCSSAttr);}return _renderToString(rendered,opts,store,false,css);}// render JSX to HTML\nvar s='',html;if(attributes){var attrs=Object.keys(attributes);// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\nif(opts&&opts.sortAttributes===true)attrs.sort();for(var i=0;i]/))continue;if(!(opts&&opts.allAttributes)&&(name==='key'||name==='ref'))continue;if(name==='className'){if(attributes['class'])continue;name='class';}else if(isSvgMode&&name.match(/^xlink:?./)){name=name.toLowerCase().replace(/^xlink:?/,'xlink:');}if(name==='style'&&v&&(typeof v==='undefined'?'undefined':_typeof(v))==='object'){v=styleObjToCss(v);}var hooked=opts.attributeHook&&opts.attributeHook(name,v,store,opts,isComponent);if(hooked||hooked===''){s+=hooked;continue;}if(name==='dangerouslySetInnerHTML'){html=v&&v.__html;}else if((v||v===0||v==='')&&typeof v!=='function'){if(v===true||v===''){v=name;// in non-xml mode, allow boolean attributes\nif(!opts||!opts.xml){s+=' '+name;continue;}}s+=' '+name+'=\"'+encodeEntities(v)+'\"';}}}// account for >1 multiline attribute\nif(pretty){var sub=s.replace(/^\\n\\s*/,' ');if(sub!==s&&!~sub.indexOf('\\n'))s=sub;else if(pretty&&~s.indexOf('\\n'))s+='\\n';}s='<'+nodeName+s+'>';if(String(nodeName).match(/[\\s\\n\\\\/='\"\\0<>]/))throw s;var isVoid=String(nodeName).match(VOID_ELEMENTS);if(isVoid)s=s.replace(/>$/,' />');var pieces=[];if(html){// if multiline, indent.\nif(pretty&&isLargeString(html)){html='\\n'+indentChar+indent(html,indentChar);}s+=html;}else if(vnode.children){var hasLarge=pretty&&~s.indexOf('\\n');for(var i=0;i';}if(!isVoid){if(pretty&&~s.indexOf('\\n'))s+='\\n';s+='';}return s;}function assign$1(obj,props){for(var i in props){obj[i]=props[i];}return obj;}function getNodeProps$1(vnode){var props=assign$1({},vnode.attributes);props.children=vnode.children;var defaultProps=vnode.nodeName.defaultProps;if(defaultProps!==undefined){for(var i in defaultProps){if(props[i]===undefined){props[i]=defaultProps[i];}}}return props;}h.f=Fragment;var html=_htm2.default.bind(h);var WeElement=Component;var defineElement=define;function createRef(){return{};}options.root.Omi={h:h,createElement:h,cloneElement:cloneElement,createRef:createRef,Component:Component,render:render,rerender:rerender,options:options,WeElement:WeElement,define:define,rpx:rpx,defineElement:defineElement,classNames:classNames,extractClass:extractClass,getHost:getHost,renderToString:renderToString,tag:tag,merge:merge,html:html,htm:_htm2.default,obaa:obaa};options.root.omi=options.root.Omi;options.root.Omi.version='omio-2.8.0';var omi={h:h,createElement:h,cloneElement:cloneElement,createRef:createRef,Component:Component,render:render,rerender:rerender,options:options,WeElement:WeElement,define:define,rpx:rpx,defineElement:defineElement,classNames:classNames,extractClass:extractClass,getHost:getHost,renderToString:renderToString,tag:tag,merge:merge,html:html,htm:_htm2.default,obaa:obaa};exports.default=omi;exports.h=h;exports.createElement=h;exports.cloneElement=cloneElement;exports.createRef=createRef;exports.Component=Component;exports.render=render;exports.rerender=rerender;exports.options=options;exports.WeElement=WeElement;exports.define=define;exports.rpx=rpx;exports.defineElement=defineElement;exports.classNames=classNames;exports.extractClass=extractClass;exports.getHost=getHost;exports.renderToString=renderToString;exports.tag=tag;exports.merge=merge;exports.html=html;exports.obaa=obaa;//# sourceMappingURL=omi.esm.js.map\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/// css base code, injected by the css-loader\nmodule.exports=function(useSourceMap){var list=[];// return the list of modules as css string\nlist.toString=function toString(){return this.map(function(item){var content=cssWithMappingToString(item,useSourceMap);if(item[2]){return\"@media \"+item[2]+\"{\"+content+\"}\";}else{return content;}}).join(\"\");};// import a list of modules into the list\nlist.i=function(modules,mediaQuery){if(typeof modules===\"string\")modules=[[null,modules,\"\"]];var alreadyImportedModules={};for(var i=0;icapacity){// Manually shift all values starting at the index back to the\n// beginning of the queue.\nfor(var scan=0,newLength=queue.length-index;scan-1;};}function normalizeName(name){if(typeof name!=='string'){name=String(name);}if(/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)){throw new TypeError('Invalid character in header field name');}return name.toLowerCase();}function normalizeValue(value){if(typeof value!=='string'){value=String(value);}return value;}// Build a destructive iterator for the value list\nfunction iteratorFor(items){var iterator={next:function next(){var value=items.shift();return{done:value===undefined,value:value};}};if(support.iterable){iterator[Symbol.iterator]=function(){return iterator;};}return iterator;}function Headers(headers){this.map={};if(headers instanceof Headers){headers.forEach(function(value,name){this.append(name,value);},this);}else if(Array.isArray(headers)){headers.forEach(function(header){this.append(header[0],header[1]);},this);}else if(headers){Object.getOwnPropertyNames(headers).forEach(function(name){this.append(name,headers[name]);},this);}}Headers.prototype.append=function(name,value){name=normalizeName(name);value=normalizeValue(value);var oldValue=this.map[name];this.map[name]=oldValue?oldValue+','+value:value;};Headers.prototype['delete']=function(name){delete this.map[normalizeName(name)];};Headers.prototype.get=function(name){name=normalizeName(name);return this.has(name)?this.map[name]:null;};Headers.prototype.has=function(name){return this.map.hasOwnProperty(normalizeName(name));};Headers.prototype.set=function(name,value){this.map[normalizeName(name)]=normalizeValue(value);};Headers.prototype.forEach=function(callback,thisArg){for(var name in this.map){if(this.map.hasOwnProperty(name)){callback.call(thisArg,this.map[name],name,this);}}};Headers.prototype.keys=function(){var items=[];this.forEach(function(value,name){items.push(name);});return iteratorFor(items);};Headers.prototype.values=function(){var items=[];this.forEach(function(value){items.push(value);});return iteratorFor(items);};Headers.prototype.entries=function(){var items=[];this.forEach(function(value,name){items.push([name,value]);});return iteratorFor(items);};if(support.iterable){Headers.prototype[Symbol.iterator]=Headers.prototype.entries;}function consumed(body){if(body.bodyUsed){return Promise.reject(new TypeError('Already read'));}body.bodyUsed=true;}function fileReaderReady(reader){return new Promise(function(resolve,reject){reader.onload=function(){resolve(reader.result);};reader.onerror=function(){reject(reader.error);};});}function readBlobAsArrayBuffer(blob){var reader=new FileReader();var promise=fileReaderReady(reader);reader.readAsArrayBuffer(blob);return promise;}function readBlobAsText(blob){var reader=new FileReader();var promise=fileReaderReady(reader);reader.readAsText(blob);return promise;}function readArrayBufferAsText(buf){var view=new Uint8Array(buf);var chars=new Array(view.length);for(var i=0;i-1?upcased:method;}function Request(input,options){options=options||{};var body=options.body;if(input instanceof Request){if(input.bodyUsed){throw new TypeError('Already read');}this.url=input.url;this.credentials=input.credentials;if(!options.headers){this.headers=new Headers(input.headers);}this.method=input.method;this.mode=input.mode;if(!body&&input._bodyInit!=null){body=input._bodyInit;input.bodyUsed=true;}}else{this.url=String(input);}this.credentials=options.credentials||this.credentials||'omit';if(options.headers||!this.headers){this.headers=new Headers(options.headers);}this.method=normalizeMethod(options.method||this.method||'GET');this.mode=options.mode||this.mode||null;this.referrer=null;if((this.method==='GET'||this.method==='HEAD')&&body){throw new TypeError('Body not allowed for GET or HEAD requests');}this._initBody(body);}Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit});};function decode(body){var form=new FormData();body.trim().split('&').forEach(function(bytes){if(bytes){var split=bytes.split('=');var name=split.shift().replace(/\\+/g,' ');var value=split.join('=').replace(/\\+/g,' ');form.append(decodeURIComponent(name),decodeURIComponent(value));}});return form;}function parseHeaders(rawHeaders){var headers=new Headers();rawHeaders.split(/\\r?\\n/).forEach(function(line){var parts=line.split(':');var key=parts.shift().trim();if(key){var value=parts.join(':').trim();headers.append(key,value);}});return headers;}Body.call(Request.prototype);function Response(bodyInit,options){if(!options){options={};}this.type='default';this.status='status'in options?options.status:200;this.ok=this.status>=200&&this.status<300;this.statusText='statusText'in options?options.statusText:'OK';this.headers=new Headers(options.headers);this.url=options.url||'';this._initBody(bodyInit);}Body.call(Response.prototype);Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url});};Response.error=function(){var response=new Response(null,{status:0,statusText:''});response.type='error';return response;};var redirectStatuses=[301,302,303,307,308];Response.redirect=function(url,status){if(redirectStatuses.indexOf(status)===-1){throw new RangeError('Invalid status code');}return new Response(null,{status:status,headers:{location:url}});};self.Headers=Headers;self.Request=Request;self.Response=Response;self.fetch=function(input,init){return new Promise(function(resolve,reject){var request=new Request(input,init);var xhr=new XMLHttpRequest();xhr.onload=function(){var options={status:xhr.status,statusText:xhr.statusText,headers:parseHeaders(xhr.getAllResponseHeaders()||'')};options.url='responseURL'in xhr?xhr.responseURL:options.headers.get('X-Request-URL');var body='response'in xhr?xhr.response:xhr.responseText;resolve(new Response(body,options));};xhr.onerror=function(){reject(new TypeError('Network request failed'));};xhr.ontimeout=function(){reject(new TypeError('Network request failed'));};xhr.open(request.method,request.url,true);if(request.credentials==='include'){xhr.withCredentials=true;}if('responseType'in xhr&&support.blob){xhr.responseType='blob';}request.headers.forEach(function(value,name){xhr.setRequestHeader(name,value);});xhr.send(typeof request._bodyInit==='undefined'?null:request._bodyInit);});};self.fetch.polyfill=true;})(typeof self!=='undefined'?self:undefined);\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*//* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError('Object.assign cannot be called with null or undefined');}return Object(val);}function shouldUseNative(){try{if(!Object.assign){return false;}// Detect buggy property enumeration order in older V8 versions.\n// https://bugs.chromium.org/p/v8/issues/detail?id=4118\nvar test1=new String('abc');// eslint-disable-line no-new-wrappers\ntest1[5]='de';if(Object.getOwnPropertyNames(test1)[0]==='5'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056\nvar test2={};for(var i=0;i<10;i++){test2['_'+String.fromCharCode(i)]=i;}var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n];});if(order2.join('')!=='0123456789'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056\nvar test3={};'abcdefghijklmnopqrst'.split('').forEach(function(letter){test3[letter]=letter;});if(Object.keys(Object.assign({},test3)).join('')!=='abcdefghijklmnopqrst'){return false;}return true;}catch(err){// We don't expect any of the above to throw, but better to be safe.\nreturn false;}}module.exports=shouldUseNative()?Object.assign:function(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s1?r:r[0];};var n=function n(t,r,u,e){for(var p=1;p=5&&((e||!n&&5===u)&&(s.push(e,u,r),u=6),n&&(s.push(n,u,r),u=6)),e=\"\";},a=0;a\"===t?(u=1,e=\"\"):e=t+e[0]:p?t===p?p=\"\":e+=t:'\"'===t||\"'\"===t?p=t:\">\"===t?(h(),u=1):u&&(\"=\"===t?(u=5,r=e,e=\"\"):\"/\"===t&&(u<5||\">\"===n[a][f+1])?(h(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,2),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(h(),u=2):e+=t),3===u&&\"!--\"===e&&(u=4,s=s[0]);}}return h(),s;},r=\"function\"==typeof Map,u=r?new Map():{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r;}:function(n){for(var r=\"\",e=0;e {\n// let newP = document.createElement('div')\n// newP.className = '_code-ctn'\n// let pre = code.parentNode\n// let ctn = pre.parentNode\n// if (pre.nodeName === 'PRE') {\n// ctn.insertBefore(newP, pre)\n// let hl = document.createElement('div')\n// hl.className = '_hl'\n// newP.appendChild(hl)\n// newP.appendChild(pre)\n// let nums = codeHlNumArr[index]\n// let max = Math.max.apply(null, nums)\n// let inner = ''\n// for (let i = 0; i <= max; i++) {\n// if (nums.indexOf(i) == -1) {\n// inner += '
'\n// } else {\n// inner += '
'\n// }\n// }\n// hl.innerHTML = inner\n// }\n// })\n//fix line-highlight\nwindow.dispatchEvent(new Event('resize'));}},{key:'_arrToNumber',value:function _arrToNumber(numArr){var arr=[];numArr.forEach(function(item){if(item.indexOf('-')!==-1){var tempArr=item.split('-');var begin=Number(tempArr[0]);var end=Number(tempArr[1]);for(var i=begin;i0)return false;}return true;}},{key:'render',value:function render(){if(!this.demo)return;return Omi.h('div',null,this.show&&Omi.h('iframe',{style:'height:'+(window.innerHeight-59)+'px',src:this.demo}),!this.show&&Omi.h('div',{'class':'switch code',onClick:this.onShow},Omi.h('img',{src:__webpack_require__(33)})),this.show&&Omi.h('div',{'class':'switch close',onClick:this.onClose},Omi.h('img',{src:__webpack_require__(34)})));}}]);return _class2;}(_omi.WeElement));\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\n var result = __webpack_require__(32);\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(1)(undefined);\n// imports\n\n\n// module\nexports.push([module.i, \"iframe{\\n width: 750px;\\n height: 100%;\\n top: 60px;\\n right: 0;\\n position: fixed;\\n border: none;\\n z-index: 9999;\\n border-left: 2px solid #24292E;\\n}\\n\\n.switch{\\n width: 40px;\\n height: 40px;\\n background-color: #AA0000;\\n border-radius: 50%;\\n position: fixed;\\n right: 50px;\\n bottom: 50px;\\n cursor: pointer;\\n text-align: center;\\n z-index: 10000;\\n}\\n\\n.switch img{\\n width: 30px;\\n height: 30px;\\n margin-top:5px;\\n}\\n\\n.switch.close img{\\n margin-top:10px;\\n width: 20px;\\n height: 20px;\\n}\\n\\n\\n@media only screen and (max-width: 800px) {\\n iframe{\\n width: 100%;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC\"\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==\"\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(exports,\"__esModule\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){params[pathArr[index].replace(':','')]=item;}});return params;}function route(path,callback){mapping[path]={callback:callback,reg:p2r(path)};}function getGlobal(){if((typeof global==='undefined'?'undefined':_typeof(global))!=='object'||!global||global.Math!==Math||global.Array!==Array){return self||window||global||function(){return this;}();}return global;}function getUrlParams(url){url=url.replace(/#.*$/,'');var queryArray=url.split(/[?&]/).slice(1);var i,args={};for(i=0;i [\"test\", \"\\d+\", undefined, \"?\"]\n// \"(\\\\d+)\" => [undefined, undefined, \"\\d+\", undefined]\n'(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'].join('|'),'g');/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */function parse(str,options){var tokens=[];var key=0;var index=0;var path='';var defaultDelimiter=options&&options.delimiter||DEFAULT_DELIMITER;var whitelist=options&&options.whitelist||undefined;var pathEscaped=false;var res;while((res=PATH_REGEXP.exec(str))!==null){var m=res[0];var escaped=res[1];var offset=res.index;path+=str.slice(index,offset);index=offset+m.length;// Ignore already escaped sequences.\nif(escaped){path+=escaped[1];pathEscaped=true;continue;}var prev='';var name=res[2];var capture=res[3];var group=res[4];var modifier=res[5];if(!pathEscaped&&path.length){var k=path.length-1;var c=path[k];var matches=whitelist?whitelist.indexOf(c)>-1:true;if(matches){prev=c;path=path.slice(0,k);}}// Push the current path onto the tokens.\nif(path){tokens.push(path);path='';pathEscaped=false;}var repeat=modifier==='+'||modifier==='*';var optional=modifier==='?'||modifier==='*';var pattern=capture||group;var delimiter=prev||defaultDelimiter;tokens.push({name:name||key++,prefix:prev,delimiter:delimiter,optional:optional,repeat:repeat,pattern:pattern?escapeGroup(pattern):'[^'+escapeString(delimiter===defaultDelimiter?delimiter:delimiter+defaultDelimiter)+']+?'});}// Push any remaining characters.\nif(path||indexHello!`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */\nfunction h(nodeName, attributes) {\n var children = [],\n lastSimple,\n child,\n simple,\n i;\n for (i = arguments.length; i-- > 2;) {\n stack.push(arguments[i]);\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children);\n delete attributes.children;\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--;) {\n stack.push(child[i]);\n }\n } else {\n if (typeof child === 'boolean') child = null;\n\n if (simple = typeof nodeName !== 'function') {\n if (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child;\n } else if (children.length === 0) {\n children = [child];\n } else {\n children.push(child);\n }\n\n lastSimple = simple;\n }\n }\n\n var p = new VNode();\n p.nodeName = nodeName;\n p.children = children;\n p.attributes = attributes == null ? undefined : attributes;\n p.key = attributes == null ? undefined : attributes.key;\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p);\n\n return p;\n}\n\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction assign(target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n}\n\nif (typeof Element !== 'undefined' && !Element.prototype.addEventListener) {\n var runListeners = function runListeners(oEvent) {\n if (!oEvent) {\n oEvent = window.event;\n }\n for (var iLstId = 0, iElId = 0, oEvtListeners = oListeners[oEvent.type]; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n for (iLstId; iLstId < oEvtListeners.aEvts[iElId].length; iLstId++) {\n oEvtListeners.aEvts[iElId][iLstId].call(this, oEvent);\n }\n break;\n }\n }\n };\n\n var oListeners = {};\n\n Element.prototype.addEventListener = function (sEventType, fListener /*, useCapture (will be ignored!) */) {\n if (oListeners.hasOwnProperty(sEventType)) {\n var oEvtListeners = oListeners[sEventType];\n for (var nElIdx = -1, iElId = 0; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n nElIdx = iElId;break;\n }\n }\n if (nElIdx === -1) {\n oEvtListeners.aEls.push(this);\n oEvtListeners.aEvts.push([fListener]);\n this[\"on\" + sEventType] = runListeners;\n } else {\n var aElListeners = oEvtListeners.aEvts[nElIdx];\n if (this[\"on\" + sEventType] !== runListeners) {\n aElListeners.splice(0);\n this[\"on\" + sEventType] = runListeners;\n }\n for (var iLstId = 0; iLstId < aElListeners.length; iLstId++) {\n if (aElListeners[iLstId] === fListener) {\n return;\n }\n }\n aElListeners.push(fListener);\n }\n } else {\n oListeners[sEventType] = { aEls: [this], aEvts: [[fListener]] };\n this[\"on\" + sEventType] = runListeners;\n }\n };\n Element.prototype.removeEventListener = function (sEventType, fListener /*, useCapture (will be ignored!) */) {\n if (!oListeners.hasOwnProperty(sEventType)) {\n return;\n }\n var oEvtListeners = oListeners[sEventType];\n for (var nElIdx = -1, iElId = 0; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n nElIdx = iElId;break;\n }\n }\n if (nElIdx === -1) {\n return;\n }\n for (var iLstId = 0, aElListeners = oEvtListeners.aEvts[nElIdx]; iLstId < aElListeners.length; iLstId++) {\n if (aElListeners[iLstId] === fListener) {\n aElListeners.splice(iLstId, 1);\n }\n }\n };\n}\n\nif (typeof Object.create !== 'function') {\n Object.create = function (proto, propertiesObject) {\n if (typeof proto !== 'object' && typeof proto !== 'function') {\n throw new TypeError('Object prototype may only be an Object: ' + proto);\n } else if (proto === null) {\n throw new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n }\n\n // if (typeof propertiesObject != 'undefined') {\n // throw new Error(\"This browser's implementation of Object.create is a shim and doesn't support a second argument.\");\n // }\n\n function F() {}\n F.prototype = proto;\n\n return new F();\n };\n}\n\nif (!String.prototype.trim) {\n String.prototype.trim = function () {\n return this.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n };\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {Object} obj\t\tObject onto which properties should be copied.\n * @param {Object} props\tObject from which to copy properties.\n * @returns obj\n * @private\n */\nfunction extend(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nfunction applyRef(ref, value) {\n if (ref) {\n if (typeof ref == 'function') ref(value);else ref.current = value;\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n *\n * @param {Function} callback\n */\n\nvar usePromise = typeof Promise == 'function';\n\n// for native\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\n if (global.__config__.platform === 'android') {\n usePromise = true;\n } else {\n var systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\n if (systemVersion > 8) {\n usePromise = true;\n }\n }\n}\n\nvar defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\nfunction isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n}\n\nfunction getUse(data, paths, out, name) {\n var obj = [];\n paths.forEach(function (path, index) {\n var isPath = typeof path === 'string';\n if (isPath) {\n obj[index] = getTargetByPath(data, path);\n } else {\n var key = Object.keys(path)[0];\n var value = path[key];\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value);\n } else {\n var tempPath = value[0];\n if (typeof tempPath === 'string') {\n var tempVal = getTargetByPath(data, tempPath);\n obj[index] = value[1] ? value[1](tempVal) : tempVal;\n } else {\n var args = [];\n tempPath.forEach(function (path) {\n args.push(getTargetByPath(data, path));\n });\n obj[index] = value[1].apply(null, args);\n }\n }\n obj[key] = obj[index];\n }\n });\n out && (out[name] = obj);\n return obj;\n}\n\nfunction getTargetByPath(origin, path) {\n var arr = path.replace(/]/g, '').replace(/\\[/g, '.').split('.');\n var current = origin;\n for (var i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]];\n }\n return current;\n}\n\nfunction getPath(obj, out, name) {\n\n var result = {};\n obj.forEach(function (item) {\n if (typeof item === 'string') {\n result[item] = true;\n } else {\n var tempPath = item[Object.keys(item)[0]];\n if (typeof tempPath === 'string') {\n result[tempPath] = true;\n } else {\n if (typeof tempPath[0] === 'string') {\n result[tempPath[0]] = true;\n } else {\n tempPath[0].forEach(function (path) {\n return result[path] = true;\n });\n }\n }\n }\n });\n out && (out[name] = result);\n return result;\n}\n\nfunction removeItem(item, arr) {\n for (var i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n break;\n }\n }\n}\n\nfunction Fragment(props) {\n return props.children;\n}\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nfunction cloneElement(vnode, props) {\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL$1 = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\n/** Managed queue of dirty components to be re-rendered */\n\nvar items = [];\n\nfunction enqueueRender(component) {\n if (items.push(component) == 1) {\n(options.debounceRendering || defer)(rerender);\n }\n}\n\n/** Rerender all enqueued dirty components */\nfunction rerender() {\n var p;\n while (p = items.pop()) {\n renderComponent(p);\n }\n}\n\nvar mapping = options.mapping;\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nfunction isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined;\n }\n if (typeof vnode.nodeName === 'string') {\n var ctor = mapping[vnode.nodeName];\n if (ctor) {\n return hydrating || node._componentConstructor === ctor;\n }\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n }\n return hydrating || node._componentConstructor === vnode.nodeName;\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nfunction isNamedNode(node, nodeName) {\n return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nfunction getNodeProps(vnode) {\n var props = extend({}, vnode.attributes);\n props.children = vnode.children;\n\n var defaultProps = vnode.nodeName.defaultProps;\n if (defaultProps !== undefined) {\n for (var i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i];\n }\n }\n }\n\n return props;\n}\n\n/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */\nfunction createNode(nodeName, isSvg) {\n var node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\n node.normalizedNodeName = nodeName;\n return node;\n}\n\nfunction parseCSSText(cssText) {\n var cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, ' ').replace(/\\s+/g, ' ');\n var style = {},\n _ref = cssTxt.match(/ ?(.*?) ?{([^}]*)}/) || [a, b, cssTxt],\n a = _ref[0],\n b = _ref[1],\n rule = _ref[2];\n\n var cssToJs = function cssToJs(s) {\n return s.replace(/\\W+\\w/g, function (match) {\n return match.slice(-1).toUpperCase();\n });\n };\n var properties = rule.split(';').map(function (o) {\n return o.split(':').map(function (x) {\n return x && x.trim();\n });\n });\n for (var i = properties, i = Array.isArray(i), i = 0, i = i ? i : i[Symbol.iterator]();;) {\n var _ref3;\n\n if (i) {\n if (i >= i.length) break;\n _ref3 = i[i++];\n } else {\n i = i.next();\n if (i.done) break;\n _ref3 = i.value;\n }\n\n var _ref2 = _ref3;\n var property = _ref2[0];\n var value = _ref2[1];\n style[cssToJs(property)] = value;\n }return style;\n}\n\n/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */\nfunction removeNode(node) {\n var parentNode = node.parentNode;\n if (parentNode) parentNode.removeChild(node);\n}\n\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */\nfunction setAccessor(node, name, old, value, isSvg) {\n if (name === 'className') name = 'class';\n\n if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null);\n applyRef(value, node);\n } else if (name === 'class' && !isSvg) {\n node.className = value || '';\n } else if (name === 'style') {\n if (options.isWeb) {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || '';\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (var i in old) {\n if (!(i in value)) node.style[i] = '';\n }\n }\n for (var i in value) {\n node.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL$1.test(i) === false ? value[i] + 'px' : value[i];\n }\n }\n } else {\n var oldJson = old,\n currentJson = value;\n if (typeof old === 'string') {\n oldJson = parseCSSText(old);\n }\n if (typeof value == 'string') {\n currentJson = parseCSSText(value);\n }\n\n var result = {},\n changed = false;\n\n if (oldJson) {\n for (var key in oldJson) {\n if (typeof currentJson == 'object' && !(key in currentJson)) {\n result[key] = '';\n changed = true;\n }\n }\n\n for (var ckey in currentJson) {\n if (currentJson[ckey] !== oldJson[ckey]) {\n result[ckey] = currentJson[ckey];\n changed = true;\n }\n }\n\n if (changed) {\n node.setStyles(result);\n }\n } else {\n node.setStyles(currentJson);\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || '';\n } else if (name[0] == 'o' && name[1] == 'n') {\n var useCapture = name !== (name = name.replace(/Capture$/, ''));\n var nameLower = name.toLowerCase();\n name = (nameLower in node ? nameLower : name).slice(2);\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture);\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture);\n node.addEventListener('touchend', touchEnd, useCapture);\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture);\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture);\n node.removeEventListener('touchend', touchEnd, useCapture);\n }\n }\n(node._listeners || (node._listeners = {}))[name] = value;\n } else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n setProperty(node, name, value == null ? '' : value);\n if (value == null || value === false) node.removeAttribute(name);\n } else {\n var ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n if (value == null || value === false) {\n if (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n } else if (typeof value !== 'function') {\n if (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n }\n }\n}\n\n/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */\nfunction setProperty(node, name, value) {\n try {\n node[name] = value;\n } catch (e) {}\n}\n\n/** Proxy an event to hooked event handlers\n *\t@private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type](options.event && options.event(e) || e);\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX;\n this.___touchY = e.touches[0].pageY;\n this.___scrollTop = document.body.scrollTop;\n}\n\nfunction touchEnd(e) {\n if (Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 && Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 && Math.abs(document.body.scrollTop - this.___scrollTop) < 30) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }));\n }\n}\n\nvar styleId = 0;\n\nfunction getCtorName(ctor) {\n for (var i = 0, len = options.styleCache.length; i < len; i++) {\n var item = options.styleCache[i];\n\n if (item.ctor === ctor) {\n return item.attrName;\n }\n }\n\n var attrName = 's' + styleId;\n options.styleCache.push({ ctor: ctor, attrName: attrName });\n styleId++;\n\n return attrName;\n}\n\n// many thanks to https://github.com/thomaspark/scoper/\nfunction scoper(css, prefix) {\n prefix = '[' + prefix.toLowerCase() + ']';\n // https://www.w3.org/TR/css-syntax-3/#lexical\n css = css.replace(/\\/\\*[^*]*\\*+([^/][^*]*\\*+)*\\//g, '');\n // eslint-disable-next-line\n var re = new RegExp('([^\\r\\n,{}:]+)(:[^\\r\\n,{}]+)?(,(?=[^{}]*{)|\\s*{)', 'g');\n /**\n * Example:\n *\n * .classname::pesudo { color:red }\n *\n * g1 is normal selector `.classname`\n * g2 is pesudo class or pesudo element\n * g3 is the suffix\n */\n css = css.replace(re, function (g0, g1, g2, g3) {\n if (typeof g2 === 'undefined') {\n g2 = '';\n }\n\n /* eslint-ignore-next-line */\n if (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\n return g1 + g2 + g3;\n }\n\n var appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\n //let prependClass = prefix + ' ' + g1.trim() + g2;\n\n return appendClass + g3;\n //return appendClass + ',' + prependClass + g3;\n });\n\n return css;\n}\n\nfunction addStyle(cssText, id) {\n id = id.toLowerCase();\n var ele = document.getElementById(id);\n var head = document.getElementsByTagName('head')[0];\n if (ele && ele.parentNode === head) {\n head.removeChild(ele);\n }\n\n var someThingStyles = document.createElement('style');\n head.appendChild(someThingStyles);\n someThingStyles.setAttribute('type', 'text/css');\n someThingStyles.setAttribute('id', id);\n if (window.ActiveXObject) {\n someThingStyles.styleSheet.cssText = cssText;\n } else {\n someThingStyles.textContent = cssText;\n }\n}\n\nfunction addStyleWithoutId(cssText) {\n var head = document.getElementsByTagName('head')[0];\n var someThingStyles = document.createElement('style');\n head.appendChild(someThingStyles);\n someThingStyles.setAttribute('type', 'text/css');\n\n if (window.ActiveXObject) {\n someThingStyles.styleSheet.cssText = cssText;\n } else {\n someThingStyles.textContent = cssText;\n }\n}\n\nfunction addScopedAttrStatic(vdom, attr) {\n if (options.scopedStyle) {\n scopeVdom(attr, vdom);\n }\n}\n\nfunction addStyleToHead(style, attr) {\n if (options.scopedStyle) {\n if (!options.staticStyleMapping[attr]) {\n addStyle(scoper(style, attr), attr);\n options.staticStyleMapping[attr] = true;\n }\n } else if (!options.staticStyleMapping[attr]) {\n addStyleWithoutId(style);\n options.staticStyleMapping[attr] = true;\n }\n}\n\nfunction scopeVdom(attr, vdom) {\n if (typeof vdom === 'object') {\n vdom.attributes = vdom.attributes || {};\n vdom.attributes[attr] = '';\n vdom.css = vdom.css || {};\n vdom.css[attr] = '';\n vdom.children.forEach(function (child) {\n return scopeVdom(attr, child);\n });\n }\n}\n\nfunction scopeHost(vdom, css) {\n if (typeof vdom === 'object' && css) {\n vdom.attributes = vdom.attributes || {};\n for (var key in css) {\n vdom.attributes[key] = '';\n }\n }\n}\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nvar mounts = [];\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar hydrating = false;\n\n/** Invoke queued componentDidMount lifecycle methods */\nfunction flushMounts() {\n var c;\n while (c = mounts.pop()) {\n if (options.afterMount) options.afterMount(c);\n if (c.installed) c.installed();\n if (c.constructor.css || c.css) {\n addStyleToHead(c.constructor.css ? c.constructor.css : typeof c.css === 'function' ? c.css() : c.css, '_s' + getCtorName(c.constructor));\n }\n }\n}\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nfunction diff(dom, vnode, store, mountAll, parent, componentRoot, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !('__omiattr_' in dom);\n }\n var ret;\n\n if (isArray(vnode)) {\n vnode = {\n nodeName: 'span',\n children: vnode\n };\n } else if (vnode && vnode.nodeName === Fragment) {\n vnode.nodeName = 'span';\n }\n\n ret = idiff(dom, vnode, store, mountAll, componentRoot, updateSelf);\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (! --diffLevel) {\n hydrating = false;\n // invoke queued componentDidMount lifecycle methods\n if (!componentRoot) flushMounts();\n }\n\n return ret;\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, store, mountAll, componentRoot, updateSelf) {\n var out = dom,\n prevSvgMode = isSvgMode;\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n // If the VNode represents a Component, perform a component diff:\n var vnodeName = vnode.nodeName;\n if (options.mapping[vnodeName]) {\n vnode.nodeName = options.mapping[vnodeName];\n return buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf);\n }\n if (typeof vnodeName == 'function') {\n return buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf);\n }\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode;\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode);\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n recollectNodeTree(dom, true);\n }\n }\n\n //ie8 error\n try {\n out['__omiattr_'] = true;\n } catch (e) {}\n\n return out;\n }\n\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName);\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode);\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) {\n out.appendChild(dom.firstChild);\n } // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true);\n }\n }\n\n var fc = out.firstChild,\n props = out['__omiattr_'],\n vchildren = vnode.children;\n\n if (props == null) {\n props = out['__omiattr_'] = {};\n for (var a = out.attributes, i = a.length; i--;) {\n props[a[i].name] = a[i].value;\n }\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0];\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if (vchildren && vchildren.length || fc != null) {\n innerDiffNode(out, vchildren, store, mountAll, hydrating || props.dangerouslySetInnerHTML != null, updateSelf);\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props);\n\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode;\n\n return out;\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Object} store\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\n *\t@param {Boolean} mountAll\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, store, mountAll, isHydrating, updateSelf) {\n var originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child;\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (var i = 0; i < len; i++) {\n var _child = originalChildren[i],\n props = _child['__omiattr_'],\n key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n if (key != null) {\n keyedLen++;\n keyed[key] = _child;\n } else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n children[childrenLen++] = _child;\n }\n }\n }\n\n if (vlen !== 0) {\n for (var i = 0; i < vlen; i++) {\n vchild = vchildren[i];\n child = null;\n\n // attempt to find a node based on key matching\n var key = vchild.key;\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key];\n keyed[key] = undefined;\n keyedLen--;\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n child = c;\n children[j] = undefined;\n if (j === childrenLen - 1) childrenLen--;\n if (j === min) min++;\n break;\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, store, mountAll, null, updateSelf);\n\n f = originalChildren[i];\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child);\n } else if (child === f.nextSibling) {\n removeNode(f);\n } else {\n dom.insertBefore(child, f);\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (var i in keyed) {\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n }\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nfunction recollectNodeTree(node, unmountOnly) {\n var component = node._component;\n if (component) {\n // if node is owned by a Component, unmount that component (ends up recursing back here)\n unmountComponent(component);\n } else {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node['__omiattr_'] != null) applyRef(node['__omiattr_'].ref, null);\n\n if (unmountOnly === false || node['__omiattr_'] == null) {\n removeNode(node);\n }\n\n removeChildren(node);\n }\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nfunction removeChildren(node) {\n node = node.lastChild;\n while (node) {\n var next = node.previousSibling;\n recollectNodeTree(node, true);\n node = next;\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old) {\n var name;\n\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n }\n }\n}\n\n/** Retains a pool of Components for re-use, keyed on component name.\n *\tNote: since component names are not unique or even necessarily available, these are primarily a form of sharding.\n *\t@private\n */\nvar components = {};\n\n/** Reclaim a component for later re-use by the recycler. */\nfunction collectComponent(component) {\n var name = component.constructor.name;(components[name] || (components[name] = [])).push(component);\n}\n\n/** Create a component. Normalizes differences between PFC's and classful Components. */\nfunction createComponent(Ctor, props, store, vnode) {\n var list = components[Ctor.name],\n inst;\n\n if (Ctor.prototype && Ctor.prototype.render) {\n inst = new Ctor(props, store);\n Component.call(inst, props, store);\n } else {\n inst = new Component(props, store);\n inst.constructor = Ctor;\n inst.render = doRender;\n }\n vnode && (inst.scopedCssAttr = vnode.css);\n\n if (inst.store) {\n if (inst.use) {\n var use = typeof inst.use === 'function' ? inst.use() : inst.use;\n\n if (options.isMultiStore) {\n var _updatePath = {};\n var using = {};\n for (var storeName in use) {\n _updatePath[storeName] = {};\n using[storeName] = {};\n getPath(use[storeName], _updatePath, storeName);\n getUse(inst.store[storeName].data, use[storeName], using, storeName);\n inst.store[storeName].instances.push(inst);\n }\n inst.using = using;\n inst._updatePath = _updatePath;\n } else {\n inst._updatePath = getPath(use);\n inst.using = getUse(inst.store.data, use);\n inst.store.instances.push(inst);\n }\n }\n\n if (inst.useSelf) {\n var _use = typeof inst.useSelf === 'function' ? inst.useSelf() : inst.useSelf;\n\n if (options.isMultiStore) {\n var _updatePath2 = {};\n var _using = {};\n for (var _storeName in _use) {\n getPath(_use[_storeName], _updatePath2, _storeName);\n getUse(inst.store[_storeName].data, _use[_storeName], _using, _storeName);\n inst.store[_storeName].updateSelfInstances.push(inst);\n }\n inst.usingSelf = _using;\n inst._updateSelfPath = _updatePath2;\n } else {\n inst._updateSelfPath = getPath(_use);\n inst.usingSelf = getUse(inst.store.data, _use);\n inst.store.updateSelfInstances.push(inst);\n }\n }\n\n if (inst.compute) {\n for (var key in inst.compute) {\n inst.computed[key] = inst.compute[key].call(options.isMultiStore ? inst.store : inst.store.data);\n }\n }\n }\n\n if (list) {\n for (var i = list.length; i--;) {\n if (list[i].constructor === Ctor) {\n inst.nextBase = list[i].nextBase;\n list.splice(i, 1);\n break;\n }\n }\n }\n return inst;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, store) {\n return this.constructor(props, store);\n}\n\n/** Set a component's `props` (generally derived from JSX attributes).\n *\t@param {Object} props\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\n */\nfunction setComponentProps(component, props, opts, store, mountAll) {\n if (component._disable) return;\n component._disable = true;\n\n if (component.__ref = props.ref) delete props.ref;\n if (component.__key = props.key) delete props.key;\n\n if (!component.base || mountAll) {\n if (component.beforeInstall) component.beforeInstall();\n if (component.install) component.install();\n }\n\n if (!component.prevProps) component.prevProps = component.props;\n component.props = props;\n\n component._disable = false;\n\n if (opts !== 0) {\n if (opts === 1 || options.syncComponentUpdates !== false || !component.base) {\n renderComponent(component, 1, mountAll);\n } else {\n enqueueRender(component);\n }\n }\n\n applyRef(component.__ref, component);\n}\n\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\n *\t@param {Component} component\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\n *\t@private\n */\nfunction renderComponent(component, opts, mountAll, isChild, updateSelf) {\n if (component._disable) return;\n\n var props = component.props,\n store = component.store,\n previousProps = component.prevProps || props,\n isUpdate = component.base,\n nextBase = component.nextBase,\n initialBase = isUpdate || nextBase,\n initialChildComponent = component._component,\n skip = false,\n rendered,\n inst,\n cbase;\n\n // if updating\n if (isUpdate) {\n component.props = previousProps;\n\n var receiveResult = true;\n if (component.receiveProps) {\n receiveResult = component.receiveProps(props, previousProps);\n }\n if (receiveResult !== false) {\n skip = false;\n if (component.beforeUpdate) {\n component.beforeUpdate(props, store);\n }\n } else {\n skip = true;\n }\n component.props = props;\n }\n\n component.prevProps = component.nextBase = null;\n\n if (!skip) {\n component.beforeRender && component.beforeRender();\n rendered = component.render(props, store);\n\n //don't rerender\n if (component.constructor.css || component.css) {\n addScopedAttrStatic(rendered, '_s' + getCtorName(component.constructor));\n }\n\n scopeHost(rendered, component.scopedCssAttr);\n\n var childComponent = rendered && rendered.nodeName,\n toUnmount,\n base,\n ctor = options.mapping[childComponent];\n\n if (ctor) {\n // set up high order component link\n\n var childProps = getNodeProps(rendered);\n inst = initialChildComponent;\n\n if (inst && inst.constructor === ctor && childProps.key == inst.__key) {\n setComponentProps(inst, childProps, 1, store, false);\n } else {\n toUnmount = inst;\n\n component._component = inst = createComponent(ctor, childProps, store);\n inst.nextBase = inst.nextBase || nextBase;\n inst._parentComponent = component;\n setComponentProps(inst, childProps, 0, store, false);\n renderComponent(inst, 1, mountAll, true);\n }\n\n base = inst.base;\n } else {\n cbase = initialBase;\n\n // destroy high order component link\n toUnmount = initialChildComponent;\n if (toUnmount) {\n cbase = component._component = null;\n }\n\n if (initialBase || opts === 1) {\n if (cbase) cbase._component = null;\n base = diff(cbase, rendered, store, mountAll || !isUpdate, initialBase && initialBase.parentNode, true, updateSelf);\n }\n }\n\n if (initialBase && base !== initialBase && inst !== initialChildComponent) {\n var baseParent = initialBase.parentNode;\n if (baseParent && base !== baseParent) {\n baseParent.replaceChild(base, initialBase);\n\n if (!toUnmount) {\n initialBase._component = null;\n recollectNodeTree(initialBase, false);\n }\n }\n }\n\n if (toUnmount) {\n unmountComponent(toUnmount);\n }\n\n component.base = base;\n if (base && !isChild) {\n var componentRef = component,\n t = component;\n while (t = t._parentComponent) {\n(componentRef = t).base = base;\n }\n base._component = componentRef;\n base._componentConstructor = componentRef.constructor;\n }\n }\n\n if (!isUpdate || mountAll) {\n mounts.unshift(component);\n } else if (!skip) {\n // Ensure that pending componentDidMount() hooks of child components\n // are called before the componentDidUpdate() hook in the parent.\n // Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\n // flushMounts();\n\n if (component.afterUpdate) {\n //deprecated\n component.afterUpdate(previousProps, store);\n }\n if (component.updated) {\n component.updated(previousProps, store);\n }\n if (options.afterUpdate) options.afterUpdate(component);\n }\n\n if (component._renderCallbacks != null) {\n while (component._renderCallbacks.length) {\n component._renderCallbacks.pop().call(component);\n }\n }\n\n if (!diffLevel && !isChild) flushMounts();\n}\n\n/** Apply the Component referenced by a VNode to the DOM.\n *\t@param {Element} dom\tThe DOM node to mutate\n *\t@param {VNode} vnode\tA Component-referencing VNode\n *\t@returns {Element} dom\tThe created/mutated element\n *\t@private\n */\nfunction buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf) {\n var c = dom && dom._component,\n originalComponent = c,\n oldDom = dom,\n isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n isOwner = isDirectOwner,\n props = getNodeProps(vnode);\n while (c && !isOwner && (c = c._parentComponent)) {\n isOwner = c.constructor === vnode.nodeName;\n }\n\n if (c && isOwner && (!mountAll || c._component)) {\n if (!updateSelf) {\n setComponentProps(c, props, 3, store, mountAll);\n }\n dom = c.base;\n } else {\n if (originalComponent && !isDirectOwner) {\n unmountComponent(originalComponent);\n dom = oldDom = null;\n }\n\n c = createComponent(vnode.nodeName, props, store, vnode);\n if (dom && !c.nextBase) {\n c.nextBase = dom;\n // passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\n oldDom = null;\n }\n setComponentProps(c, props, 1, store, mountAll);\n dom = c.base;\n\n if (oldDom && dom !== oldDom) {\n oldDom._component = null;\n recollectNodeTree(oldDom, false);\n }\n }\n\n return dom;\n}\n\n/** Remove a component from the DOM and recycle it.\n *\t@param {Component} component\tThe Component instance to unmount\n *\t@private\n */\nfunction unmountComponent(component) {\n if (options.beforeUnmount) options.beforeUnmount(component);\n\n var base = component.base;\n\n component._disable = true;\n\n if (component.uninstall) component.uninstall();\n\n if (component.store) {\n if (options.isMultiStore) {\n for (var key in component.store) {\n var current = component.store[key];\n current.instances && removeItem(component, current.instances);\n current.updateSelfInstances && removeItem(component, current.updateSelfInstances);\n }\n } else {\n component.store.instances && removeItem(component, component.store.instances);\n component.store.updateSelfInstances && removeItem(component, component.store.updateSelfInstances);\n }\n }\n\n component.base = null;\n\n // recursively tear down & recollect high-order component children:\n var inner = component._component;\n if (inner) {\n unmountComponent(inner);\n } else if (base) {\n if (base['__omiattr_'] != null) applyRef(base['__omiattr_'].ref, null);\n\n component.nextBase = base;\n\n removeNode(base);\n collectComponent(component);\n\n removeChildren(base);\n }\n\n applyRef(component.__ref, null);\n}\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar id = 0;\n\nvar Component = function () {\n function Component(props, store) {\n _classCallCheck(this, Component);\n\n this.props = assign({}, this.constructor.defaultProps, props);\n this.elementId = id++;\n\n this._preCss = null;\n\n this.store = store;\n this.computed = {};\n }\n\n Component.prototype.update = function update(ignoreAttrs, updateSelf, callback) {\n if (this._willUpdate) return;\n this._willUpdate = true;\n if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n renderComponent(this, 2);\n if (options.componentChange) options.componentChange(this, this.base);\n this._willUpdate = false;\n };\n\n Component.prototype.updateSelf = function updateSelf() {\n if (this._willUpdateSelf) return;\n this._willUpdateSelf = true;\n renderComponent(this, 2, null, null, true);\n this._willUpdateSelf = false;\n };\n\n Component.prototype.fire = function fire(type, data) {\n var _this = this;\n\n Object.keys(this.props).every(function (key) {\n if ('on' + type.toLowerCase() === key.toLowerCase()) {\n _this.props[key]({ detail: data });\n return false;\n }\n return true;\n });\n };\n\n Component.prototype.render = function render() {};\n\n return Component;\n}();\n\nComponent.is = 'WeElement';\n\n/*\n * obaa 2.1.0\n * By dntzhang\n * Github: https://github.com/Tencent/omi/tree/master/packages/obaa\n * MIT Licensed.\n */\n\n// $_r_: root\n// $_c_: prop change callback\n// $_p_: path\n\nfunction obaa(target, arr, callback) {\n\n\tvar eventPropArr = [];\n\tif (isArray$1(target)) {\n\t\tif (target.length === 0) {\n\t\t\ttarget.$_o_ = {\n\t\t\t\t$_r_: target,\n\t\t\t\t$_p_: '#'\n\t\t\t};\n\t\t}\n\t\tmock(target, target);\n\t}\n\tif (target && typeof target === 'object' && Object.keys(target).length === 0) {\n\t\ttrack(target);\n\t\ttarget.$_o_.$_r_ = target;\n\t}\n\tfor (var prop in target) {\n\t\tif (target.hasOwnProperty(prop)) {\n\t\t\tif (callback) {\n\t\t\t\tif (isArray$1(arr) && isInArray(arr, prop)) {\n\t\t\t\t\teventPropArr.push(prop);\n\t\t\t\t\twatch(target, prop, null, target);\n\t\t\t\t} else if (isString(arr) && prop == arr) {\n\t\t\t\t\teventPropArr.push(prop);\n\t\t\t\t\twatch(target, prop, null, target);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\teventPropArr.push(prop);\n\t\t\t\twatch(target, prop, null, target);\n\t\t\t}\n\t\t}\n\t}\n\tif (!target.$_c_) {\n\t\ttarget.$_c_ = [];\n\t}\n\tvar propChanged = callback ? callback : arr;\n\ttarget.$_c_.push({\n\t\tall: !callback,\n\t\tpropChanged: propChanged,\n\t\teventPropArr: eventPropArr\n\t});\n}\n\nvar triggerStr = ['concat', 'copyWithin', 'fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift', 'size'].join(',');\n\nvar methods = ['concat', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values', 'size'];\n\nfunction mock(target, root) {\n\tmethods.forEach(function (item) {\n\t\ttarget[item] = function () {\n\t\t\tvar old = Array.prototype.slice.call(this, 0);\n\t\t\tvar result = Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));\n\t\t\tif (new RegExp('\\\\b' + item + '\\\\b').test(triggerStr)) {\n\t\t\t\tfor (var cprop in this) {\n\t\t\t\t\tif (this.hasOwnProperty(cprop) && !isFunction(this[cprop])) {\n\t\t\t\t\t\twatch(this, cprop, this.$_o_.$_p_, root);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//todo\n\t\t\t\tonPropertyChanged('Array-' + item, this, old, this, this.$_o_.$_p_, root);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\ttarget['pure' + item.substring(0, 1).toUpperCase() + item.substring(1)] = function () {\n\t\t\treturn Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));\n\t\t};\n\t});\n}\n\nfunction watch(target, prop, path, root) {\n\tif (prop === '$_o_') return;\n\tif (isFunction(target[prop])) return;\n\tif (!target.$_o_) target.$_o_ = {\n\t\t$_r_: root\n\t};\n\tif (path !== undefined && path !== null) {\n\t\ttarget.$_o_.$_p_ = path;\n\t} else {\n\t\ttarget.$_o_.$_p_ = '#';\n\t}\n\n\tvar currentValue = target.$_o_[prop] = target[prop];\n\tObject.defineProperty(target, prop, {\n\t\tget: function get() {\n\t\t\treturn this.$_o_[prop];\n\t\t},\n\t\tset: function set(value) {\n\t\t\tvar old = this.$_o_[prop];\n\t\t\tthis.$_o_[prop] = value;\n\t\t\tonPropertyChanged(prop, value, old, this, target.$_o_.$_p_, root);\n\t\t},\n\t\tconfigurable: true,\n\t\tenumerable: true\n\t});\n\tif (typeof currentValue == 'object') {\n\t\tif (isArray$1(currentValue)) {\n\t\t\tmock(currentValue, root);\n\t\t\tif (currentValue.length === 0) {\n\t\t\t\ttrack(currentValue, prop, path);\n\t\t\t}\n\t\t}\n\t\tif (currentValue && Object.keys(currentValue).length === 0) {\n\t\t\ttrack(currentValue, prop, path);\n\t\t}\n\t\tfor (var cprop in currentValue) {\n\t\t\tif (currentValue.hasOwnProperty(cprop)) {\n\t\t\t\twatch(currentValue, cprop, target.$_o_.$_p_ + '-' + prop, root);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction track(obj, prop, path) {\n\tif (obj.$_o_) {\n\t\treturn;\n\t}\n\tobj.$_o_ = {};\n\tif (path !== undefined && path !== null) {\n\t\tobj.$_o_.$_p_ = path + '-' + prop;\n\t} else {\n\t\tif (prop !== undefined && prop !== null) {\n\t\t\tobj.$_o_.$_p_ = '#' + '-' + prop;\n\t\t} else {\n\t\t\tobj.$_o_.$_p_ = '#';\n\t\t}\n\t}\n}\n\nfunction onPropertyChanged(prop, value, oldValue, target, path, root) {\n\tif (value !== oldValue && !(nan(value) && nan(oldValue)) && root.$_c_) {\n\t\tvar rootName = getRootName(prop, path);\n\t\tfor (var i = 0, len = root.$_c_.length; i < len; i++) {\n\t\t\tvar handler = root.$_c_[i];\n\t\t\tif (handler.all || isInArray(handler.eventPropArr, rootName) || rootName.indexOf('Array-') === 0) {\n\t\t\t\thandler.propChanged.call(target, prop, value, oldValue, path);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (prop.indexOf('Array-') !== 0 && typeof value === 'object') {\n\t\twatch(target, prop, target.$_o_.$_p_, root);\n\t}\n}\n\nfunction isFunction(obj) {\n\treturn Object.prototype.toString.call(obj) == '[object Function]';\n}\n\nfunction nan(value) {\n\treturn typeof value === \"number\" && isNaN(value);\n}\n\nfunction isArray$1(obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Array]';\n}\n\nfunction isString(obj) {\n\treturn typeof obj === 'string';\n}\n\nfunction isInArray(arr, item) {\n\tfor (var i = arr.length; --i > -1;) {\n\t\tif (item === arr[i]) return true;\n\t}\n\treturn false;\n}\n\nfunction getRootName(prop, path) {\n\tif (path === '#') {\n\t\treturn prop;\n\t}\n\treturn path.split('-')[1];\n}\n\nobaa.add = function (obj, prop) {\n\twatch(obj, prop, obj.$_o_.$_p_, obj.$_o_.$_r_);\n};\n\nobaa.set = function (obj, prop, value) {\n\tif (obj[prop] === undefined) {\n\t\twatch(obj, prop, obj.$_o_.$_p_, obj.$_o_.$_r_);\n\t}\n\tobj[prop] = value;\n};\n\nArray.prototype.size = function (length) {\n\tthis.length = length;\n};\n\n/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {object} [store]\n *\t@public\n */\nfunction render(vnode, parent, store, empty, merge) {\n parent = typeof parent === 'string' ? document.querySelector(parent) : parent;\n\n if (store) {\n if (store.data) {\n obsStore(store);\n } else {\n options.isMultiStore = true;\n for (var key in store) {\n if (store[key].data) {\n obsStore(store[key], key);\n }\n }\n }\n }\n\n if (empty) {\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n }\n\n if (merge) {\n merge = typeof merge === 'string' ? document.querySelector(merge) : merge;\n }\n\n return diff(merge, vnode, store, false, parent, false);\n}\n\nfunction obsStore(store, storeName) {\n\n store.instances = [];\n store.updateSelfInstances = [];\n extendStoreUpate(store, storeName);\n\n obaa(store.data, function (prop, val, old, path) {\n var patchs = {};\n var key = fixPath(path + '-' + prop);\n patchs[key] = true;\n store.update(patchs);\n });\n}\n\nfunction merge(vnode, merge, store) {\n obsStore(store);\n\n merge = typeof merge === 'string' ? document.querySelector(merge) : merge;\n\n return diff(merge, vnode, store);\n}\n\nfunction extendStoreUpate(store, key) {\n store.update = function (patch) {\n if (Object.keys(patch).length > 0) {\n this.instances.forEach(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key])) {\n if (instance.use) {\n getUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key);\n }\n\n instance.update();\n }\n } else {\n if (instance._updatePath && needUpdate(patch, instance._updatePath)) {\n if (instance.use) {\n instance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use);\n }\n instance.update();\n }\n }\n });\n\n this.updateSelfInstances.forEach(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key])) {\n if (instance.useSelf) {\n getUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key);\n }\n\n instance.updateSelf();\n }\n } else {\n if (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n instance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf);\n instance.updateSelf();\n }\n }\n });\n\n this.onChange && this.onChange(patch);\n }\n };\n}\n\nfunction compute(instance, isMultiStore) {\n if (instance.compute) {\n for (var ck in instance.compute) {\n instance.computed[ck] = instance.compute[ck].call(isMultiStore ? instance.store : instance.store.data);\n }\n }\n}\n\nfunction needUpdate(diffResult, updatePath) {\n for (var keyA in diffResult) {\n if (updatePath[keyA]) {\n return true;\n }\n for (var keyB in updatePath) {\n if (includePath(keyA, keyB)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction includePath(pathA, pathB) {\n if (pathA.indexOf(pathB) === 0) {\n var next = pathA.substr(pathB.length, 1);\n if (next === '[' || next === '.') {\n return true;\n }\n }\n return false;\n}\n\nfunction fixPath(path) {\n var mpPath = '';\n var arr = path.replace('#-', '').split('-');\n arr.forEach(function (item, index) {\n if (index) {\n if (isNaN(Number(item))) {\n mpPath += '.' + item;\n } else {\n mpPath += '[' + item + ']';\n }\n } else {\n mpPath += item;\n }\n });\n return mpPath;\n}\n\nfunction _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar storeHelpers = ['use', 'useSelf'];\n\nfunction define(name, ctor, config) {\n\tif (ctor.is === 'WeElement') {\n\t\toptions.mapping[name] = ctor;\n\t} else {\n\n\t\tif (typeof config === 'string') {\n\t\t\tconfig = { css: config };\n\t\t} else {\n\t\t\tconfig = config || {};\n\t\t}\n\n\t\tvar Comp = function (_Component) {\n\t\t\t_inherits(Comp, _Component);\n\n\t\t\tfunction Comp() {\n\t\t\t\tvar _temp, _this, _ret;\n\n\t\t\t\t_classCallCheck$1(this, Comp);\n\n\t\t\t\tfor (var _len = arguments.length, args = Array(_len), key = 0; key < _len; key++) {\n\t\t\t\t\targs[key] = arguments[key];\n\t\t\t\t}\n\n\t\t\t\treturn _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.compute = config.compute, _temp), _possibleConstructorReturn(_this, _ret);\n\t\t\t}\n\n\t\t\tComp.prototype.render = function render() {\n\t\t\t\treturn ctor.call(this, this);\n\t\t\t};\n\n\t\t\treturn Comp;\n\t\t}(Component);\n\n\t\tComp.css = config.css;\n\t\tComp.propTypes = config.propTypes;\n\t\tComp.defaultProps = config.defaultProps;\n\n\t\tvar _loop = function _loop(key) {\n\t\t\tif (typeof config[key] === 'function') {\n\t\t\t\tComp.prototype[key] = function () {\n\t\t\t\t\treturn config[key].apply(this, arguments);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\tfor (var key in config) {\n\t\t\t_loop(key);\n\t\t}\n\n\t\tstoreHelpers.forEach(function (func) {\n\t\t\tif (config[func] && config[func] !== 'function') {\n\t\t\t\tComp.prototype[func] = function () {\n\t\t\t\t\treturn config[func];\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\n\t\toptions.mapping[name] = Comp;\n\t}\n}\n\nfunction rpx(str) {\n return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, function (a, b) {\n return window.innerWidth * Number(b) / 750 + 'px';\n });\n}\n\nfunction tag(name) {\n return function (target) {\n define(name, target);\n };\n}\n\n/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty;\n\nfunction classNames() {\n var classes = [];\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n if (!arg) continue;\n\n var argType = typeof arg;\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg);\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg);\n if (inner) {\n classes.push(inner);\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(' ');\n}\n\nfunction extractClass() {\n var _Array$prototype$slic = Array.prototype.slice.call(arguments, 0),\n props = _Array$prototype$slic[0],\n args = _Array$prototype$slic.slice(1);\n\n if (props) {\n if (props['class']) {\n args.unshift(props['class']);\n delete props['class'];\n } else if (props.className) {\n args.unshift(props.className);\n delete props.className;\n }\n }\n if (args.length > 0) {\n return { 'class': classNames.apply(null, args) };\n }\n}\n\nfunction getHost(component) {\n var base = component.base;\n if (base) {\n while (base.parentNode) {\n if (base.parentNode._component) {\n return base.parentNode._component;\n } else {\n base = base.parentNode;\n }\n }\n }\n}\n\n/**\n * preact-render-to-string based on preact-render-to-string\n * by Jason Miller\n * Licensed under the MIT License\n * https://github.com/developit/preact-render-to-string\n *\n * modified by dntzhang\n */\n\nvar encodeEntities = function encodeEntities(s) {\n return String(s).replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"');\n};\n\nvar indent = function indent(s, char) {\n return String(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n};\n\nvar mapping$1 = options.mapping;\n\nvar VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nvar isLargeString = function isLargeString(s, length, ignoreLines) {\n return String(s).length > (length || 40) || !ignoreLines && String(s).indexOf('\\n') !== -1 || String(s).indexOf('<') !== -1;\n};\n\nvar JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nfunction styleObjToCss(s) {\n var str = '';\n for (var prop in s) {\n var val = s[prop];\n if (val != null) {\n if (str) str += ' ';\n // str += jsToCss(prop);\n str += JS_TO_CSS[prop] || (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n str += ': ';\n str += val;\n if (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n str += 'px';\n }\n str += ';';\n }\n }\n return str || undefined;\n}\n\nfunction renderToString(vnode, opts, store, isSvgMode) {\n store = store || {};\n opts = Object.assign({\n scopedCSS: true\n }, opts);\n var css = {};\n var html = _renderToString(vnode, opts, store, isSvgMode, css);\n return {\n css: Object.values(css),\n html: html\n };\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, opts, store, isSvgMode, css) {\n if (vnode == null || typeof vnode === 'boolean') {\n return '';\n }\n\n var nodeName = vnode.nodeName,\n attributes = vnode.attributes,\n isComponent = false;\n\n var pretty = true && opts.pretty,\n indentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n // #text nodes\n if (typeof vnode !== 'object' && !nodeName) {\n return encodeEntities(vnode);\n }\n\n // components\n var ctor = mapping$1[nodeName];\n if (ctor) {\n isComponent = true;\n\n var props = getNodeProps$1(vnode),\n rendered;\n // class-based components\n var c = new ctor(props, store);\n // turn off stateful re-rendering:\n c._disable = c.__x = true;\n c.props = props;\n c.store = store;\n if (c.install) c.install();\n if (c.beforeRender) c.beforeRender();\n rendered = c.render(c.props, c.store);\n\n if (opts.scopedCSS) {\n\n if (c.constructor.css || c.css) {\n\n var cssStr = c.constructor.css ? c.constructor.css : typeof c.css === 'function' ? c.css() : c.css;\n var cssAttr = '_s' + getCtorName(c.constructor);\n css[cssAttr] = {\n id: cssAttr,\n css: scoper(cssStr, cssAttr)\n };\n addScopedAttrStatic(rendered, cssAttr);\n }\n\n c.scopedCSSAttr = vnode.css;\n scopeHost(rendered, c.scopedCSSAttr);\n }\n\n return _renderToString(rendered, opts, store, false, css);\n }\n\n // render JSX to HTML\n var s = '',\n html;\n\n if (attributes) {\n var attrs = Object.keys(attributes);\n\n // allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n if (opts && opts.sortAttributes === true) attrs.sort();\n\n for (var i = 0; i < attrs.length; i++) {\n var name = attrs[i],\n v = attributes[name];\n if (name === 'children') continue;\n\n if (name.match(/[\\s\\n\\\\/='\"\\0<>]/)) continue;\n\n if (!(opts && opts.allAttributes) && (name === 'key' || name === 'ref')) continue;\n\n if (name === 'className') {\n if (attributes['class']) continue;\n name = 'class';\n } else if (isSvgMode && name.match(/^xlink:?./)) {\n name = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n }\n\n if (name === 'style' && v && typeof v === 'object') {\n v = styleObjToCss(v);\n }\n\n var hooked = opts.attributeHook && opts.attributeHook(name, v, store, opts, isComponent);\n if (hooked || hooked === '') {\n s += hooked;\n continue;\n }\n\n if (name === 'dangerouslySetInnerHTML') {\n html = v && v.__html;\n } else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n if (v === true || v === '') {\n v = name;\n // in non-xml mode, allow boolean attributes\n if (!opts || !opts.xml) {\n s += ' ' + name;\n continue;\n }\n }\n s += ' ' + name + '=\"' + encodeEntities(v) + '\"';\n }\n }\n }\n\n // account for >1 multiline attribute\n if (pretty) {\n var sub = s.replace(/^\\n\\s*/, ' ');\n if (sub !== s && !~sub.indexOf('\\n')) s = sub;else if (pretty && ~s.indexOf('\\n')) s += '\\n';\n }\n\n s = '<' + nodeName + s + '>';\n if (String(nodeName).match(/[\\s\\n\\\\/='\"\\0<>]/)) throw s;\n\n var isVoid = String(nodeName).match(VOID_ELEMENTS);\n if (isVoid) s = s.replace(/>$/, ' />');\n\n var pieces = [];\n if (html) {\n // if multiline, indent.\n if (pretty && isLargeString(html)) {\n html = '\\n' + indentChar + indent(html, indentChar);\n }\n s += html;\n } else if (vnode.children) {\n var hasLarge = pretty && ~s.indexOf('\\n');\n for (var i = 0; i < vnode.children.length; i++) {\n var child = vnode.children[i];\n if (child != null && child !== false) {\n var childSvgMode = nodeName === 'svg' ? true : nodeName === 'foreignObject' ? false : isSvgMode,\n ret = _renderToString(child, opts, store, childSvgMode, css);\n if (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n if (ret) pieces.push(ret);\n }\n }\n if (pretty && hasLarge) {\n for (var i = pieces.length; i--;) {\n pieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n }\n }\n }\n\n if (pieces.length) {\n s += pieces.join('');\n } else if (opts && opts.xml) {\n return s.substring(0, s.length - 1) + ' />';\n }\n\n if (!isVoid) {\n if (pretty && ~s.indexOf('\\n')) s += '\\n';\n s += '';\n }\n\n return s;\n}\n\nfunction assign$1(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\nfunction getNodeProps$1(vnode) {\n var props = assign$1({}, vnode.attributes);\n props.children = vnode.children;\n\n var defaultProps = vnode.nodeName.defaultProps;\n if (defaultProps !== undefined) {\n for (var i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i];\n }\n }\n }\n\n return props;\n}\n\nh.f = Fragment;\n\nvar html = htm.bind(h);\n\nvar WeElement = Component;\nvar defineElement = define;\nfunction createRef() {\n return {};\n}\n\noptions.root.Omi = {\n h: h,\n createElement: h,\n cloneElement: cloneElement,\n createRef: createRef,\n Component: Component,\n render: render,\n rerender: rerender,\n options: options,\n WeElement: WeElement,\n define: define,\n rpx: rpx,\n defineElement: defineElement,\n classNames: classNames,\n extractClass: extractClass,\n getHost: getHost,\n renderToString: renderToString,\n tag: tag,\n merge: merge,\n html: html,\n htm: htm,\n obaa: obaa\n};\noptions.root.omi = options.root.Omi;\noptions.root.Omi.version = 'omio-2.8.0';\n\nvar omi = {\n h: h,\n createElement: h,\n cloneElement: cloneElement,\n createRef: createRef,\n Component: Component,\n render: render,\n rerender: rerender,\n options: options,\n WeElement: WeElement,\n define: define,\n rpx: rpx,\n defineElement: defineElement,\n classNames: classNames,\n extractClass: extractClass,\n getHost: getHost,\n renderToString: renderToString,\n tag: tag,\n merge: merge,\n html: html,\n htm: htm,\n obaa: obaa\n};\n\nexport default omi;\nexport { h, h as createElement, cloneElement, createRef, Component, render, rerender, options, WeElement, define, rpx, defineElement, classNames, extractClass, getHost, renderToString, tag, merge, html, obaa };\n//# sourceMappingURL=omi.esm.js.map\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/omio/dist/omi.esm.js","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/css-loader/lib/css-base.js","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n\n// WEBPACK FOOTER //\n// (webpack)/buildin/global.js","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/core.js","'use strict';\n\nif (typeof Promise === 'undefined') {\n // Rejection tracking prevents a common issue where React gets into an\n // inconsistent state due to an error, but it gets swallowed by a Promise,\n // and the user has no idea what causes React's erratic future behavior.\n require('promise/lib/rejection-tracking').enable();\n window.Promise = require('promise/lib/es6-extensions.js');\n}\n\n// fetch() polyfill for making API calls.\nrequire('whatwg-fetch');\n\n// Object.assign() is commonly used with React.\n// It will use the native implementation if it's present and isn't buggy.\nObject.assign = require('object-assign');\n\n// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.\n// We don't polyfill it in the browser--this is user's responsibility.\nif (process.env.NODE_ENV === 'test') {\n require('raf').polyfill(global);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./config/polyfills.js","'use strict';\n\nvar Promise = require('./core');\n\nvar DEFAULT_WHITELIST = [\n ReferenceError,\n TypeError,\n RangeError\n];\n\nvar enabled = false;\nexports.disable = disable;\nfunction disable() {\n enabled = false;\n Promise._47 = null;\n Promise._71 = null;\n}\n\nexports.enable = enable;\nfunction enable(options) {\n options = options || {};\n if (enabled) disable();\n enabled = true;\n var id = 0;\n var displayId = 0;\n var rejections = {};\n Promise._47 = function (promise) {\n if (\n promise._83 === 2 && // IS REJECTED\n rejections[promise._56]\n ) {\n if (rejections[promise._56].logged) {\n onHandled(promise._56);\n } else {\n clearTimeout(rejections[promise._56].timeout);\n }\n delete rejections[promise._56];\n }\n };\n Promise._71 = function (promise, err) {\n if (promise._75 === 0) { // not yet handled\n promise._56 = id++;\n rejections[promise._56] = {\n displayId: null,\n error: err,\n timeout: setTimeout(\n onUnhandled.bind(null, promise._56),\n // For reference errors and type errors, this almost always\n // means the programmer made a mistake, so log them after just\n // 100ms\n // otherwise, wait 2 seconds to see if they get handled\n matchWhitelist(err, DEFAULT_WHITELIST)\n ? 100\n : 2000\n ),\n logged: false\n };\n }\n };\n function onUnhandled(id) {\n if (\n options.allRejections ||\n matchWhitelist(\n rejections[id].error,\n options.whitelist || DEFAULT_WHITELIST\n )\n ) {\n rejections[id].displayId = displayId++;\n if (options.onUnhandled) {\n rejections[id].logged = true;\n options.onUnhandled(\n rejections[id].displayId,\n rejections[id].error\n );\n } else {\n rejections[id].logged = true;\n logError(\n rejections[id].displayId,\n rejections[id].error\n );\n }\n }\n }\n function onHandled(id) {\n if (rejections[id].logged) {\n if (options.onHandled) {\n options.onHandled(rejections[id].displayId, rejections[id].error);\n } else if (!rejections[id].onUnhandled) {\n console.warn(\n 'Promise Rejection Handled (id: ' + rejections[id].displayId + '):'\n );\n console.warn(\n ' This means you can ignore any previous messages of the form \"Possible Unhandled Promise Rejection\" with id ' +\n rejections[id].displayId + '.'\n );\n }\n }\n }\n}\n\nfunction logError(id, error) {\n console.warn('Possible Unhandled Promise Rejection (id: ' + id + '):');\n var errStr = (error && (error.stack || error)) + '';\n errStr.split('\\n').forEach(function (line) {\n console.warn(' ' + line);\n });\n}\n\nfunction matchWhitelist(error, list) {\n return list.some(function (cls) {\n return error instanceof cls;\n });\n}\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/rejection-tracking.js","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/asap/browser-raw.js","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/es6-extensions.js","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/whatwg-fetch/fetch.js","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/object-assign/index.js","var n=function(t,r,u,e){for(var p=1;p=5&&((e||!n&&5===u)&&(s.push(e,u,r),u=6),n&&(s.push(n,u,r),u=6)),e=\"\"},a=0;a\"===t?(u=1,e=\"\"):e=t+e[0]:p?t===p?p=\"\":e+=t:'\"'===t||\"'\"===t?p=t:\">\"===t?(h(),u=1):u&&(\"=\"===t?(u=5,r=e,e=\"\"):\"/\"===t&&(u<5||\">\"===n[a][f+1])?(h(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,2),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(h(),u=2):e+=t),3===u&&\"!--\"===e&&(u=4,s=s[0])}return h(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/htm/dist/htm.module.js","import { define, WeElement } from 'omi'\n\nimport './my-head'\nimport './my-content'\nimport './my-sidebar'\nimport './my-demo'\n\ndefine('my-frame', class extends WeElement {\n\n installed(){\n this.store.init()\n }\n\n render() {\n return (\n
\n \n
\n \n
\n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-frame.js","import { define, WeElement } from 'omi'\nimport logo from './omi-logo2019.svg'\n\ndefine('my-head', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position'\n ]\n\n toggleMenus = evt => {\n this.store.toogleSidebar()\n evt.stopPropagation()\n }\n\n hideSidebar = evt => {\n this.store.hideSidebar()\n }\n\n render() {\n return (\n
\n
\n \"\"\n
\n\n \n \n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-head/index.js","module.exports = __webpack_public_path__ + \"static/media/omi-logo2019.923166c3.svg\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/omi-logo2019.svg\n// module id = 14\n// module chunks = 10 11","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAqklEQVRoQ+2WQQ6AMAgE4f+Pxg+oSTNbDXR7Z5UZQpvR/GTz/w838LdBG7ABSMAjBAHichvACGHAXANVVRCOtDwzb2E/GnADUv4R5xkQA9wWN3cLbUMmDrYBMdDluLkGfJEtD8N7wXkXWfsREk/Atri5W2gbMnGwDYiBLsfNNdB+jbqB5Wn2U0KM7KO4uVvoI4D4MzaAEcIAG4AAcbkNYIQwwAYgQFze3sAFU6MwMZGH3LoAAAAASUVORK5CYII=\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/menu.png\n// module id = 15\n// module chunks = 10 11","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/_index.css\n// module id = 16\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".head{\\n position:fixed;\\n height:60px;\\n line-height: 60px;\\n border-bottom: 1px solid #eee;\\n width:100%;\\n background-color:#24292e;\\n z-index:100;\\n top: 0;\\n}\\n\\nul,li{\\n display: inline-block;\\n}\\n\\n.logo_box{\\n width:100px;\\n display: inline-block;\\n text-align:center;\\n line-height: 60px;\\n}\\n\\n.menu a,.logo_box a{\\n display: inline-block;\\n height:60px;\\n color: white;\\n}\\n\\n.menu{\\n position: absolute;\\n right:20px;\\n}\\n\\n.menu li{\\n margin-left:15px;\\n}\\n\\n.logo_box a{\\n font-size: 34px;\\n font-weight: bold;\\n color: #00bff3;\\n padding: 0px 15px;\\n line-height: 60px;\\n cursor: pointer;\\n}\\n\\n.menu a:hover{\\n color: white;\\n}\\n\\n.m_menu{\\n position:fixed;\\n display:none;\\n cursor: pointer;\\n}\\n\\n.menu li{\\n display:inline-block;\\n}\\n\\n.logo{\\n width: 40px;\\n height: 40px;\\n margin-left: 10px;\\n margin-top: 10px;\\n cursor: pointer;\\n}\\n\\n@media only screen and (max-width: 800px) {\\n\\n .logo_box{\\n display:inline-block;\\n }\\n\\n .logo{\\n display: none;\\n }\\n\\n .head{\\n text-align:center;\\n }\\n\\n .m_menu{\\n top:0;\\n left:0;\\n display:block;\\n width:50px;\\n height:50px;\\n padding-top: 6px;\\n }\\n\\n .m_menu img{\\n width:30px;\\n }\\n\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-head/_index.css\n// module id = 17\n// module chunks = 10 11","import { define, WeElement } from 'omi'\nimport '../my-footer'\n\ndefine('my-content', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'html'\n ]\n\n install() {\n this.store.myContent = this\n }\n\n installed() {\n this.initCodeStyle()\n }\n\n afterUpdate() {\n this.initCodeStyle()\n }\n\n touchEnd = () => {\n this.store.hideSidebar()\n }\n\n initCodeStyle() {\n let codes = document.querySelectorAll('code')\n\n let codesArr = Array.prototype.slice.call(codes);\n let codeHlNumArr = []\n codesArr.forEach(code => {\n let arr = code.className.match(/{([\\S\\s]*)}/)\n let pre = code.parentNode\n //bug!\n arr && pre.setAttribute('data-line', arr[1])\n if (code.className) {\n pre.className = code.className\n\n const temp = code.className.match(/language-\\w*/g)[0]\n if (temp) {\n code.innerHTML = Prism.highlight(code.innerText, Prism.languages[temp.split('-')[1]], temp.split('-')[1])\n }\n } else {\n let pre = code.parentNode\n code.className = 'language-markup'\n pre.className = 'language-markup'\n code.innerHTML = Prism.highlight(code.innerText, Prism.languages.markup, 'markup')\n }\n // let hllNums = null\n // if (arr) {\n // let numArr = arr[0].replace(/[{|}]/g, '').split(',')\n // hllNums = this._arrToNumber(numArr)\n // }\n //codeHlNumArr.push(hllNums)\n })\n\n // codesArr.forEach((code, index) => {\n // let newP = document.createElement('div')\n // newP.className = '_code-ctn'\n // let pre = code.parentNode\n // let ctn = pre.parentNode\n // if (pre.nodeName === 'PRE') {\n // ctn.insertBefore(newP, pre)\n\n // let hl = document.createElement('div')\n // hl.className = '_hl'\n // newP.appendChild(hl)\n // newP.appendChild(pre)\n // let nums = codeHlNumArr[index]\n\n // let max = Math.max.apply(null, nums)\n\n // let inner = ''\n // for (let i = 0; i <= max; i++) {\n // if (nums.indexOf(i) == -1) {\n // inner += '
'\n // } else {\n // inner += '
'\n // }\n // }\n // hl.innerHTML = inner\n // }\n // })\n //fix line-highlight\n window.dispatchEvent(new Event('resize'));\n }\n\n _arrToNumber(numArr) {\n let arr = []\n numArr.forEach(item => {\n if (item.indexOf('-') !== -1) {\n const tempArr = item.split('-')\n const begin = Number(tempArr[0])\n const end = Number(tempArr[1])\n for (let i = begin; i < end + 1; i++) {\n arr.push(i)\n }\n } else {\n arr.push(Number(item))\n }\n })\n return arr\n }\n\n render() {\n return (\n
\n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-content/index.js","import { define, WeElement } from 'omi'\n\ndefine('my-footer', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position',\n 'menu'\n ]\n\n render() {\n const [\n position,\n menus\n ] = this.using\n const pre = this.store.getPre()\n const next = this.store.getNext()\n\n return (\n
\n {pre &&← {pre.name}}\n {next &&}\n
\n )\n }\n\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-footer/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-footer/_index.css\n// module id = 20\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".ft{\\n position: relative;\\n margin-top: 20px\\n}\\n\\n.pre{\\n position: absolute;\\n left:15px;\\n}\\n\\n.next{\\n position: absolute;\\n right: 15px;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-footer/_index.css\n// module id = 21\n// module chunks = 10 11","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-content/_index.css\n// module id = 22\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".content{\\n position: relative;\\n padding: 70px 30px;\\n max-width: 900px;\\n margin: 0 auto;\\n\\n}\\n\\n@media screen and (max-width: 1500px){\\n .content {\\n margin-left: 290px;\\n }\\n}\\n\\nh3{\\n color:#444444;\\n}\\n\\npre{\\n border: 1px solid #eee;\\n width: 100%;\\n}\\nli{\\n text-indent: 20px;\\n list-style:disc inside ;\\n}\\n\\n@media only screen and (max-width: 800px) {\\n .content{\\n margin-left: 0;\\n border-left: none;\\n padding: 70px 10px 70px 10px;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-content/_index.css\n// module id = 23\n// module chunks = 10 11","import { define, WeElement } from 'omi'\nimport '../my-list'\n\ndefine('my-sidebar', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'menus',\n 'sideBarShow',\n 'lan'\n ]\n\n render() {\n const [menus, sideBarShow, lan] = this.using\n\n return (\n
\n {menus[lan].map((menu, index) => (\n \n ))}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-sidebar/index.js","import { define, WeElement } from 'omi'\n\ndefine('my-list', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position'\n ]\n\n render(props) {\n const [position] = this.using\n\n return (\n
    \n
  • {props.menu.title}
  • \n {props.menu.list &&\n props.menu.list.map((item, subIndex) => {\n const cls = position[0] === props.index && position[1] === subIndex ? { class: 'current' } : null\n return
  • \n \n {item.name}\n \n
  • \n })}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-list/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-list/_index.css\n// module id = 26\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"li.title{\\n font-size: 14px;\\n font-weight: bold;\\n margin-bottom:10px;\\n margin-top:10px;\\n text-indent: 23px;\\n}\\nli{\\n margin-bottom:1px;\\n text-indent: 33px;\\n}\\nli a{\\n display:block;\\n font-size:14px;\\n height:30px;\\n line-height:30px;\\n color: black;\\n background-color:#eee;\\n}\\nli a.current,li a.current:hover{\\n background-color:#24292e;\\n color: white;\\n cursor: default;\\n}\\nli a:hover{\\n background-color:#f0f8ff;\\n}\\n\\n\\nul,li{\\n list-style:none;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-list/_index.css\n// module id = 27\n// module chunks = 10 11","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-sidebar/_index.css\n// module id = 28\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"@media only screen and (max-width: 800px) {\\n .list{\\n transform: translateX(-100%);\\n background-color:white;\\n left:0 !important;\\n -moz-transition: all .6s ease;\\n -o-transition: all .6s ease;\\n -webkit-transition: all .6s ease;\\n transition: all .6s ease;\\n width: 70% !important;\\n z-index: 100000;\\n border-right: none !important;\\n }\\n\\n .list.show {\\n -moz-transform: translateX(0%) translateZ(0);\\n -ms-transform: translateX(0%) translateZ(0);\\n -o-transform: translateX(0%) translateZ(0);\\n -webkit-transform: translateX(0%) translateZ(0);\\n transform: translateX(0%) translateZ(0);\\n }\\n}\\n\\n.list{\\n width: 261px;\\n text-indent: 20px;\\n border-right: 1px solid #eee;\\n overflow-x: hidden;\\n overflow-y: auto;\\n position:fixed;\\n top:60px;\\n background-color: white;\\n height: 100%;\\n border-right: 1px solid #ccc;\\n padding-bottom: 100px;\\n}\\n.version{\\n height:20px;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-sidebar/_index.css\n// module id = 29\n// module chunks = 10 11","import { define, WeElement } from 'omi'\nimport css from './_index.css'\n\ndefine('my-demo', class extends WeElement {\n install() {\n this.store.myDemo = this\n if(this.checkPc())\n this.show = true\n else\n this.show = false\n this.demo = this.store.demo\n }\n\n css() {\n return css\n }\n\n checkPc() {\n let userAgentInfo = navigator.userAgent\n let mp = [\"Android\", \"iPhone\", \"SymbianOS\", \"Windows Phone\", \"iPad\", \"iPod\"]\n for (let i = 0; i < mp.length; i++)\n if (userAgentInfo.indexOf(mp[i]) > 0)\n return false\n return true\n }\n\n onShow = () => {\n this.show = true\n this.update()\n }\n\n onClose = () => {\n this.show = false\n this.update()\n }\n \n render() {\n if(!this.demo) return\n return (\n
\n { this.show && }\n\n {!this.show &&
\n \n
}\n\n {this.show &&
\n \n
}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-demo/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/_index.css\n// module id = 31\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"iframe{\\n width: 750px;\\n height: 100%;\\n top: 60px;\\n right: 0;\\n position: fixed;\\n border: none;\\n z-index: 9999;\\n border-left: 2px solid #24292E;\\n}\\n\\n.switch{\\n width: 40px;\\n height: 40px;\\n background-color: #AA0000;\\n border-radius: 50%;\\n position: fixed;\\n right: 50px;\\n bottom: 50px;\\n cursor: pointer;\\n text-align: center;\\n z-index: 10000;\\n}\\n\\n.switch img{\\n width: 30px;\\n height: 30px;\\n margin-top:5px;\\n}\\n\\n.switch.close img{\\n margin-top:10px;\\n width: 20px;\\n height: 20px;\\n}\\n\\n\\n@media only screen and (max-width: 800px) {\\n iframe{\\n width: 100%;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-demo/_index.css\n// module id = 32\n// module chunks = 10 11","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/code.png\n// module id = 33\n// module chunks = 10 11","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/close.png\n// module id = 34\n// module chunks = 10 11","import config from '../docs/config.js'\nimport 'omi-router'\n\nclass Store {\n constructor(data) {\n this.data = {\n position: [-1, -1],\n menus: config.menus,\n lan: data.lan,\n html: '',\n sideBarShow: false\n }\n let id = 0\n this.map = {}\n this.positionMap = {}\n config.menus[this.data.lan].forEach((menu, index) => {\n menu.list.forEach((item, subIndex) => {\n item.id = id++\n item.position = [index, subIndex]\n this.map[item.id] = item\n item.index = index\n item.subIndex = subIndex\n this.positionMap[index+'-'+subIndex] = item\n })\n })\n this.preIndex = 0\n this.preSubIndex = 0\n }\n\n getNext(){\n const item = this.positionMap[this.data.position.join('-')]\n if(item){\n return this.map[item.id+1]\n }\n }\n\n getPre(){\n const item = this.positionMap[this.data.position.join('-')]\n if(item){\n return this.map[item.id-1]\n }\n }\n\n init() {\n this.remarkable = new Remarkable({ html: true })\n if (location.hash === \"\") {\n this.data.position = [0, 0]\n this.getMarkDown(this.data.menus[this.data.lan][0].list[0].md, this.data.lan, m => {\n this.data.html = this.remarkable.render(m)\n })\n }\n this.initRouter()\n }\n\n toogleSidebar() {\n this.data.sideBarShow = !this.data.sideBarShow\n }\n\n hideSidebar() {\n this.data.sideBarShow = false\n }\n\n initRouter() {\n const menus = this.data.menus[this.data.lan]\n menus.forEach(item => {\n item.list.forEach(subItem => {\n route('/' + subItem.md, evt => {\n menus[this.preIndex].list[this.preSubIndex].selected = false\n this.preIndex = evt.query.index\n this.preSubIndex = evt.query.subIndex\n this.data.position = [Number(evt.query.index), Number(evt.query.subIndex)]\n this.data.sideBarShow = false\n\n this.getMarkDown(subItem.md, this.data.lan, m => {\n this.data.html = this.remarkable.render(m)\n document.body.scrollTop = 0\n document.documentElement.scrollTop = 0\n })\n })\n })\n })\n }\n\n getMarkDown(name, lan, callback) {\n import('../docs/' + lan + '/' + name + '.md').then(m => {\n callback(m)\n })\n }\n}\n\nexport default Store\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/index.js","const config = {\n menus: {\n 'zh-cn': [\n {\n title: 'OMIU',\n list: [\n { name: '简介', md: 'introduction' }\n ]\n },\n {\n title: '基础组件',\n list: [\n { name: 'Button 按钮', md: 'button' },\n { name: 'Tabs 选项卡', md: 'tabs' },\n { name: 'Radio 单选框', md: 'radio' },\n { name: 'Link 文字链接', md: 'link' }\n ]\n }\n\n ],\n en: [\n {\n title: 'OMIU',\n list: [\n { name: 'Introduction', md: 'introduction' }\n ]\n },\n {\n title: 'Base',\n list: [\n { name: 'Button', md: 'button' },\n { name: 'Tabs', md: 'tabs' },\n { name: 'Radio', md: 'radio' },\n { name: 'Link', md: 'link' }\n ]\n }\n ]\n }\n}\n\nexport default config\n\n\n\n// WEBPACK FOOTER //\n// ./src/docs/config.js","/*!\n * omi-router v2.1.0 by dntzhang\n * Router for Omi.\n * Github: https://github.com/Tencent/omi\n * MIT Licensed.\n */\n\nvar p2r = require('path-to-regexp')\nvar mapping = {}\nvar root = getGlobal()\n\nroot.route = route\nroot.route.params = null\nroot.historyLength = 0\n\nroot.route.to = function (path, data) {\n root.route._routeByTo = true\n root.route.data = data\n if (path[0] === '#') {\n location.hash = path\n } else {\n location.hash = '#' + path\n }\n}\n\nwindow.addEventListener('hashchange', change)\n\nfunction change(evt) {\n var byNative = false\n //need to fix a line by omi-link\n if(window.history.length === root.historyLength && !root.route._routeByTo){\n //keep alive mode\n byNative = true\n }\n root.route._routeByTo = false\n root.historyLength = window.history.length\n var prevent = false\n if (evt.type === 'hashchange' && root.route.before) {\n prevent = root.route.before(evt) === false\n }\n if (prevent) return\n var path = window.location.hash.replace('#', '')\n if(path === '') path = '/'\n var notFound = true\n Object.keys(mapping).every(function(key){\n var toArr = path.split('?')[0].match(mapping[key].reg)\n if (toArr) {\n var pathArr = key.match(mapping[key].reg)\n root.route.params = getParams(toArr, pathArr)\n root.route.query = getUrlParams(path)\n mapping[key].callback({\n params: root.route.params,\n query: getUrlParams(path),\n data: root.route.data,\n byNative: byNative\n })\n root.route.data = null\n notFound = false\n return false\n }\n return true\n })\n\n if (notFound) {\n mapping['*'] && mapping['*'].callback({ byNative: byNative })\n }\n\n if (evt.type === 'hashchange' && root.route.after) {\n root.route.after(evt)\n }\n}\n\ndocument.addEventListener('DOMContentLoaded', change)\n\nfunction getParams(toArr, pathArr) {\n var params = {}\n toArr.forEach(function (item, index) {\n if (index > 0) {\n params[pathArr[index].replace(':', '')] = item\n }\n })\n return params\n}\n\n\nexport default function route(path, callback) {\n mapping[path] = {\n callback: callback,\n reg: p2r(path)\n }\n}\n\nfunction getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function () {\n return this\n })()\n )\n }\n return global\n}\n\nfunction getUrlParams(url) {\n url = url.replace(/#.*$/, '')\n var queryArray = url.split(/[?&]/).slice(1)\n var i, args = {}\n for (i = 0; i < queryArray.length; i++) {\n var match = queryArray[i].match(/([^=]+)=([^=]+)/)\n if (match !== null) {\n args[match[1]] = decodeURIComponent(match[2])\n }\n }\n return args\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/omi-router/index.js","/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.match = match\nmodule.exports.regexpToFunction = regexpToFunction\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * Default configs.\n */\nvar DEFAULT_DELIMITER = '/'\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \":test(\\\\d+)?\" => [\"test\", \"\\d+\", undefined, \"?\"]\n // \"(\\\\d+)\" => [undefined, undefined, \"\\d+\", undefined]\n '(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = (options && options.delimiter) || DEFAULT_DELIMITER\n var whitelist = (options && options.whitelist) || undefined\n var pathEscaped = false\n var res\n\n while ((res = PATH_REGEXP.exec(str)) !== null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n pathEscaped = true\n continue\n }\n\n var prev = ''\n var name = res[2]\n var capture = res[3]\n var group = res[4]\n var modifier = res[5]\n\n if (!pathEscaped && path.length) {\n var k = path.length - 1\n var c = path[k]\n var matches = whitelist ? whitelist.indexOf(c) > -1 : true\n\n if (matches) {\n prev = c\n path = path.slice(0, k)\n }\n }\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n pathEscaped = false\n }\n\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var pattern = capture || group\n var delimiter = prev || defaultDelimiter\n\n tokens.push({\n name: name || key++,\n prefix: prev,\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n pattern: pattern\n ? escapeGroup(pattern)\n : '[^' + escapeString(delimiter === defaultDelimiter ? delimiter : (delimiter + defaultDelimiter)) + ']+?'\n })\n }\n\n // Push any remaining characters.\n if (path || index < str.length) {\n tokens.push(path + str.substr(index))\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Create path match function from `path-to-regexp` spec.\n */\nfunction match (str, options) {\n var keys = []\n var re = pathToRegexp(str, keys, options)\n return regexpToFunction(re, keys)\n}\n\n/**\n * Create a path match function from `path-to-regexp` output.\n */\nfunction regexpToFunction (re, keys) {\n return function (pathname, options) {\n var m = re.exec(pathname)\n if (!m) return false\n\n var path = m[0]\n var index = m.index\n var params = {}\n var decode = (options && options.decode) || decodeURIComponent\n\n for (var i = 1; i < m.length; i++) {\n if (m[i] === undefined) continue\n\n var key = keys[i - 1]\n\n if (key.repeat) {\n params[key.name] = m[i].split(key.delimiter).map(function (value) {\n return decode(value, key)\n })\n } else {\n params[key.name] = decode(m[i], key)\n }\n }\n\n return { path: path, index: index, params: params }\n }\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))\n }\n }\n\n return function (data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n var validate = options ? options.validate !== false : true\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$/()])/g, '\\\\$1')\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {Array=} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n if (!keys) return path\n\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n pattern: null\n })\n }\n }\n\n return path\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n return new RegExp('(?:' + parts.join('|') + ')', flags(options))\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n options = options || {}\n\n var strict = options.strict\n var start = options.start !== false\n var end = options.end !== false\n var delimiter = options.delimiter || DEFAULT_DELIMITER\n var endsWith = [].concat(options.endsWith || []).map(escapeString).concat('$').join('|')\n var route = start ? '^' : ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var capture = token.repeat\n ? '(?:' + token.pattern + ')(?:' + escapeString(token.delimiter) + '(?:' + token.pattern + '))*'\n : token.pattern\n\n if (keys) keys.push(token)\n\n if (token.optional) {\n if (!token.prefix) {\n route += '(' + capture + ')?'\n } else {\n route += '(?:' + escapeString(token.prefix) + '(' + capture + '))?'\n }\n } else {\n route += escapeString(token.prefix) + '(' + capture + ')'\n }\n }\n }\n\n if (end) {\n if (!strict) route += '(?:' + escapeString(delimiter) + ')?'\n\n route += endsWith === '$' ? '$' : '(?=' + endsWith + ')'\n } else {\n var endToken = tokens[tokens.length - 1]\n var isEndDelimited = typeof endToken === 'string'\n ? endToken[endToken.length - 1] === delimiter\n : endToken === undefined\n\n if (!strict) route += '(?:' + escapeString(delimiter) + '(?=' + endsWith + '))?'\n if (!isEndDelimited) route += '(?=' + escapeString(delimiter) + '|' + endsWith + ')'\n }\n\n return new RegExp(route, flags(options))\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (path instanceof RegExp) {\n return regexpToRegexp(path, keys)\n }\n\n if (Array.isArray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), keys, options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), keys, options)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/path-to-regexp/index.js","var map = {\n\t\"./en/button.md\": [\n\t\t40,\n\t\t9\n\t],\n\t\"./en/introduction.md\": [\n\t\t41,\n\t\t8\n\t],\n\t\"./en/link.md\": [\n\t\t42,\n\t\t7\n\t],\n\t\"./en/radio.md\": [\n\t\t43,\n\t\t6\n\t],\n\t\"./en/tabs.md\": [\n\t\t44,\n\t\t5\n\t],\n\t\"./zh-cn/button.md\": [\n\t\t45,\n\t\t4\n\t],\n\t\"./zh-cn/introduction.md\": [\n\t\t46,\n\t\t3\n\t],\n\t\"./zh-cn/link.md\": [\n\t\t47,\n\t\t2\n\t],\n\t\"./zh-cn/radio.md\": [\n\t\t48,\n\t\t1\n\t],\n\t\"./zh-cn/tabs.md\": [\n\t\t49,\n\t\t0\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tvar ids = map[req];\n\tif(!ids)\n\t\treturn Promise.reject(new Error(\"Cannot find module '\" + req + \"'.\"));\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__(ids[0]);\n\t});\n};\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 39;\nmodule.exports = webpackAsyncContext;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs lazy ^\\.\\/.*\\.md$\n// module id = 39\n// module chunks = 10 11","import { render } from 'omi'\nimport './assets/index.css'\nimport './elements/my-frame.js'\nimport Store from './store'\n\nrender(, '#root', new Store({ lan: 'zh-cn' }))\n\n\n\n// WEBPACK FOOTER //\n// ./src/cn.js"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/cn.5a79e36c.js b/components/docs/static/js/cn.5a79e36c.js deleted file mode 100644 index d4d1aa0bd..000000000 --- a/components/docs/static/js/cn.5a79e36c.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,r,i){for(var a,s,u=0,c=[];u2;)Ie.push(arguments[a]);for(t&&null!=t.children&&(Ie.length||Ie.push(t.children),delete t.children);Ie.length;)if((r=Ie.pop())&&void 0!==r.pop)for(a=r.length;a--;)Ie.push(r[a]);else"boolean"===typeof r&&(r=null),(i="function"!==typeof e)&&(null==r?r="":"number"===typeof r?r=String(r):"string"!==typeof r&&(i=!1)),i&&n?s[s.length-1]+=r:0===s.length?s=[r]:s.push(r),n=i;var u=new o;return u.nodeName=e,u.children=s,u.attributes=null==t?void 0:t,u.key=null==t?void 0:t.key,void 0!==Ue.vnode&&Ue.vnode(u),u}function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function s(e,t){for(var n,r,o=a(e),i=1;i2?[].slice.call(arguments,2):e.children)}function b(e){1==Qe.push(e)&&(Ue.debounceRendering||Ge)(v)}function v(){for(var e;e=Qe.pop();)X(e)}function g(e,t,n){if("string"===typeof t||"number"===typeof t)return void 0!==e.splitText;if("string"===typeof t.nodeName){var r=qe[t.nodeName];return r?n||e._componentConstructor===r:!e._componentConstructor&&_(e,t.nodeName)}return n||e._componentConstructor===t.nodeName}function _(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function w(e){var t=u({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function A(e,t){var n=t?Ue.doc.createElementNS("http://www.w3.org/2000/svg",e):Ue.doc.createElement(e);return n.normalizedNodeName=e,n}function x(e){for(var t=e.replace(/\/\*(.|\s)*?\*\//g," ").replace(/\s+/g," "),n={},r=t.match(/ ?(.*?) ?{([^}]*)}/)||[o,i,t],o=r[0],i=r[1],a=r[2],s=a.split(";").map(function(e){return e.split(":").map(function(e){return e&&e.trim()})}),u=s,u=Array.isArray(u),u=0,u=u||u[Symbol.iterator]();;){var c;if(u){if(u>=u.length)break;c=u[u++]}else{if(u=u.next(),u.done)break;c=u.value}var l=c,f=l[0],p=l[1];n[function(e){return e.replace(/\W+\w/g,function(e){return e.slice(-1).toUpperCase()})}(f)]=p}return n}function O(e){var t=e.parentNode;t&&t.removeChild(e)}function E(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)c(n,null),c(r,e);else if("class"!==t||o)if("style"===t)if(Ue.isWeb){if(r&&"string"!==typeof r&&"string"!==typeof n||(e.style.cssText=r||""),r&&"object"===("undefined"===typeof r?"undefined":Be(r))){if("string"!==typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"===typeof r[i]&&!1===We.test(i)?r[i]+"px":r[i]}}else{var a=n,s=r;"string"===typeof n&&(a=x(n)),"string"==typeof r&&(s=x(r));var u={},l=!1;if(a){for(var f in a)"object"!=("undefined"===typeof s?"undefined":Be(s))||f in s||(u[f]="",l=!0);for(var p in s)s[p]!==a[p]&&(u[p]=s[p],l=!0);l&&e.setStyles(u)}else e.setStyles(s)}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var d=t!==(t=t.replace(/Capture$/,"")),h=t.toLowerCase();t=(h in e?h:t).slice(2),r?n||(e.addEventListener(t,j,d),"tap"==t&&(e.addEventListener("touchstart",T,d),e.addEventListener("touchend",k,d))):(e.removeEventListener(t,j,d),"tap"==t&&(e.removeEventListener("touchstart",T,d),e.removeEventListener("touchend",k,d))),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)S(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var y=o&&t!==(t=t.replace(/^xlink:?/,""));null==r||!1===r?y?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!==typeof r&&(y?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function S(e,t,n){try{e[t]=n}catch(e){}}function j(e){return this._listeners[e.type](Ue.event&&Ue.event(e)||e)}function T(e){this.___touchX=e.touches[0].pageX,this.___touchY=e.touches[0].pageY,this.___scrollTop=document.body.scrollTop}function k(e){Math.abs(e.changedTouches[0].pageX-this.___touchX)<30&&Math.abs(e.changedTouches[0].pageY-this.___touchY)<30&&Math.abs(document.body.scrollTop-this.___scrollTop)<30&&this.dispatchEvent(new CustomEvent("tap",{detail:e}))}function C(e){for(var t=0,n=Ue.styleCache.length;t-1;)if(t===e[n])return!0;return!1}function ce(e,t){return"#"===t?e:t.split("-")[1]}function le(e,t,n,r,o){if(t="string"===typeof t?document.querySelector(t):t,n)if(n.data)fe(n);else{Ue.isMultiStore=!0;for(var i in n)n[i].data&&fe(n[i],i)}if(r)for(;t.firstChild;)t.removeChild(t.firstChild);return o&&(o="string"===typeof o?document.querySelector(o):o),$(o,e,n,!1,t,!1)}function fe(e,t){e.instances=[],e.updateSelfInstances=[],de(e,t),K(e.data,function(t,n,r,o){var i={};i[be(o+"-"+t)]=!0,e.update(i)})}function pe(e,t,n){return fe(n),t="string"===typeof t?document.querySelector(t):t,$(t,e,n)}function de(e,t){e.update=function(n){Object.keys(n).length>0&&(this.instances.forEach(function(r){he(r,t),t?r._updatePath&&r._updatePath[t]&&ye(n,r._updatePath[t])&&(r.use&&f(e.data,("function"===typeof r.use?r.use():r.use)[t],r.using,t),r.update()):r._updatePath&&ye(n,r._updatePath)&&(r.use&&(r.using=f(e.data,"function"===typeof r.use?r.use():r.use)),r.update())}),this.updateSelfInstances.forEach(function(r){he(r,t),t?r._updateSelfPath&&r._updateSelfPath[t]&&ye(n,r._updateSelfPath[t])&&(r.useSelf&&f(e.data,("function"===typeof r.useSelf?r.useSelf():r.useSelf)[t],r.usingSelf,t),r.updateSelf()):r._updateSelfPath&&ye(n,r._updateSelfPath)&&(r.usingSelf=f(e.data,"function"===typeof r.useSelf?r.useSelf():r.useSelf),r.updateSelf())}),this.onChange&&this.onChange(n))}}function he(e,t){if(e.compute)for(var n in e.compute)e.computed[n]=e.compute[n].call(t?e.store:e.store.data)}function ye(e,t){for(var n in e){if(t[n])return!0;for(var r in t)if(me(n,r))return!0}return!1}function me(e,t){if(0===e.indexOf(t)){var n=e.substr(t.length,1);if("["===n||"."===n)return!0}return!1}function be(e){var t="";return e.replace("#-","").split("-").forEach(function(e,n){n?isNaN(Number(e))?t+="."+e:t+="["+e+"]":t+=e}),t}function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":Be(t))&&"function"!==typeof t?e:t}function _e(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":Be(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function we(e,t,n){if("WeElement"===t.is)Ue.mapping[e]=t;else{n="string"===typeof n?{css:n}:n||{};var r=function(e){function r(){var t,o,i;ve(this,r);for(var a=arguments.length,s=Array(a),u=0;u0)return{class:Oe.apply(null,n)}}function Se(e){var t=e.base;if(t)for(;t.parentNode;){if(t.parentNode._component)return t.parentNode._component;t=t.parentNode}}function je(e){var t="";for(var n in e){var r=e[n];null!=r&&(t&&(t+=" "),t+=pt[n]||(pt[n]=n.replace(/([A-Z])/g,"-$1").toLowerCase()),t+=": ",t+=r,"number"===typeof r&&!1===IS_NON_DIMENSIONAL.test(n)&&(t+="px"),t+=";")}return t||void 0}function Te(e,t,n,r){n=n||{},t=Object.assign({scopedCSS:!0},t);var o={},i=ke(e,t,n,r,o);return{css:Object.values(o),html:i}}function ke(e,t,n,r,o){if(null==e||"boolean"===typeof e)return"";var i=e.nodeName,a=e.attributes,s=!1,u=t.pretty,c=u&&"string"===typeof u?u:"\t";if("object"!==("undefined"===typeof e?"undefined":Be(e))&&!i)return st(e);var l=ct[i];if(l){s=!0;var f,p=Pe(e),d=new l(p,n);if(d._disable=d.__x=!0,d.props=p,d.store=n,d.install&&d.install(),d.beforeRender&&d.beforeRender(),f=d.render(d.props,d.store),t.scopedCSS){if(d.constructor.css||d.css){var h=d.constructor.css?d.constructor.css:"function"===typeof d.css?d.css():d.css,y="_s"+C(d.constructor);o[y]={id:y,css:P(h,y)},M(f,y)}d.scopedCSSAttr=e.css,I(f,d.scopedCSSAttr)}return ke(f,t,n,!1,o)}var m,b="";if(a){var v=Object.keys(a);t&&!0===t.sortAttributes&&v.sort();for(var g=0;g]/)&&(t&&t.allAttributes||"key"!==_&&"ref"!==_))){if("className"===_){if(a.class)continue;_="class"}else r&&_.match(/^xlink:?./)&&(_=_.toLowerCase().replace(/^xlink:?/,"xlink:"));"style"===_&&w&&"object"===("undefined"===typeof w?"undefined":Be(w))&&(w=je(w));var A=t.attributeHook&&t.attributeHook(_,w,n,t,s);if(A||""===A)b+=A;else if("dangerouslySetInnerHTML"===_)m=w&&w.__html;else if((w||0===w||""===w)&&"function"!==typeof w){if((!0===w||""===w)&&(w=_,!t||!t.xml)){b+=" "+_;continue}b+=" "+_+'="'+st(w)+'"'}}}}if(u){var x=b.replace(/^\n\s*/," ");x===b||~x.indexOf("\n")?u&&~b.indexOf("\n")&&(b+="\n"):b=x}if(b="<"+i+b+">",String(i).match(/[\s\n\\\/='"\0<>]/))throw b;var O=String(i).match(lt);O&&(b=b.replace(/>$/," />"));var E=[];if(m)u&&ft(m)&&(m="\n"+c+ut(m,c)),b+=m;else if(e.children){for(var S=u&&~b.indexOf("\n"),g=0;g";return O||(u&&~b.indexOf("\n")&&(b+="\n"),b+=""),b}function Ce(e,t){for(var n in t)e[n]=t[n];return e}function Pe(e){var t=Ce({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function Ne(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.obaa=t.html=t.merge=t.tag=t.renderToString=t.getHost=t.extractClass=t.classNames=t.defineElement=t.rpx=t.define=t.WeElement=t.options=t.rerender=t.render=t.Component=t.createRef=t.cloneElement=t.createElement=t.h=t.htm=void 0;var Be="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me=n(10);Object.defineProperty(t,"htm",{enumerable:!0,get:function(){return r(Me).default}});var Re=r(Me),Ue={scopedStyle:!0,mapping:{},isWeb:!0,staticStyleMapping:{},doc:"object"===("undefined"===typeof document?"undefined":Be(document))?document:null,root:function(){return"object"===("undefined"===typeof e?"undefined":Be(e))&&e&&e.Math===Math&&e.Array===Array?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof e?e:function(){return this}()}(),styleCache:[],isMultiStore:!1},Ie=[],Le=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable;if("undefined"!==typeof Element&&!Element.prototype.addEventListener){var Fe=function(e){e||(e=window.event);for(var t=0,n=0,r=ze[e.type];n8&&(He=!0)}var Ge=He?Promise.resolve().then.bind(Promise.resolve()):setTimeout,We=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Qe=[],qe=Ue.mapping,Xe=0,Ze=[],Je=0,Ye=!1,Ke=!1,et={},tt=0,nt=function(){function e(t,n){Y(this,e),this.props=s({},this.constructor.defaultProps,t),this.elementId=tt++,this._preCss=null,this.store=n,this.computed={}}return e.prototype.update=function(e,t,n){this._willUpdate||(this._willUpdate=!0,n&&(this._renderCallbacks=this._renderCallbacks||[]).push(n),X(this,2),Ue.componentChange&&Ue.componentChange(this,this.base),this._willUpdate=!1)},e.prototype.updateSelf=function(){this._willUpdateSelf||(this._willUpdateSelf=!0,X(this,2,null,null,!0),this._willUpdateSelf=!1)},e.prototype.fire=function(e,t){var n=this;Object.keys(this.props).every(function(r){return"on"+e.toLowerCase()!==r.toLowerCase()||(n.props[r]({detail:t}),!1)})},e.prototype.render=function(){},e}();nt.is="WeElement";var rt=["concat","copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift","size"].join(","),ot=["concat","copyWithin","entries","every","fill","filter","find","findIndex","forEach","includes","indexOf","join","keys","lastIndexOf","map","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","toLocaleString","toString","unshift","values","size"];K.add=function(e,t){te(e,t,e.$_o_.$_p_,e.$_o_.$_r_)},K.set=function(e,t,n){void 0===e[t]&&te(e,t,e.$_o_.$_p_,e.$_o_.$_r_),e[t]=n},Array.prototype.size=function(e){this.length=e};var it=["use","useSelf"],at={}.hasOwnProperty,st=function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},ut=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"\t"))},ct=Ue.mapping,lt=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,ft=function(e,t,n){return String(e).length>(t||40)||!n&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},pt={};i.f=y;var dt=Re.default.bind(i),ht=nt,yt=we;Ue.root.Omi={h:i,createElement:i,cloneElement:m,createRef:Ne,Component:nt,render:le,rerender:v,options:Ue,WeElement:ht,define:we,rpx:Ae,defineElement:yt,classNames:Oe,extractClass:Ee,getHost:Se,renderToString:Te,tag:xe,merge:pe,html:dt,htm:Re.default,obaa:K},Ue.root.omi=Ue.root.Omi,Ue.root.Omi.version="omio-2.8.0";var mt={h:i,createElement:i,cloneElement:m,createRef:Ne,Component:nt,render:le,rerender:v,options:Ue,WeElement:ht,define:we,rpx:Ae,defineElement:yt,classNames:Oe,extractClass:Ee,getHost:Se,renderToString:Te,tag:xe,merge:pe,html:dt,htm:Re.default,obaa:K};t.default=mt,t.h=i,t.createElement=i,t.cloneElement=m,t.createRef=Ne,t.Component=nt,t.render=le,t.rerender=v,t.options=Ue,t.WeElement=ht,t.define=we,t.rpx=Ae,t.defineElement=yt,t.classNames=Oe,t.extractClass=Ee,t.getHost=Se,t.renderToString=Te,t.tag=xe,t.merge=pe,t.html=dt,t.obaa=K}).call(t,n(2))},function(e,t,n){"use strict";function r(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"===typeof btoa){var i=o(r);return[n].concat(r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function o(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"===typeof e&&(e=[[null,e,""]]);for(var r={},o=0;oc){for(var t=0,n=a.length-u;t-1?t:e}function d(e,t){t=t||{};var n=t.body;if(e instanceof d){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function y(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function m(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var b={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(b.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=function(e){return e&&DataView.prototype.isPrototypeOf(e)},_=ArrayBuffer.isView||function(e){return e&&v.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},b.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},f.call(d.prototype),f.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];m.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=d,e.Response=m,e.fetch=function(e,t){return new Promise(function(n,r){var o=new d(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new m(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&b.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:void 0)},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;c1?t:t[0]};var r=function e(t,n,r,o){for(var i=1;i=5&&((o||!e&&5===r)&&(a.push(o,r,n),r=6),e&&(a.push(e,r,n),r=6)),o=""},u=0;u"===t?(r=1,o=""):o=t+o[0]:i?t===i?i="":o+=t:'"'===t||"'"===t?i=t:">"===t?(s(),r=1):r&&("="===t?(r=5,n=o,o=""):"/"===t&&(r<5||">"===e[u][c+1])?(s(),3===r&&(a=a[0]),r=a,(a=a[0]).push(r,2),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),r=2):o+=t),3===r&&"!--"===o&&(r=4,a=a[0])}return s(),a},i="function"==typeof Map,a=i?new Map:{},s=i?function(e){var t=a.get(e);return t||a.set(e,t=o(e)),t}:function(e){for(var t="",n=0;n0)return!1;return!0}},{key:"render",value:function(){if(this.demo)return Omi.h("div",null,this.show&&Omi.h("iframe",{style:"height:"+(window.innerHeight-59)+"px",src:this.demo}),!this.show&&Omi.h("div",{class:"switch code",onClick:this.onShow},Omi.h("img",{src:n(33)})),this.show&&Omi.h("div",{class:"switch close",onClick:this.onClose},Omi.h("img",{src:n(34)})))}}]),t}(s.WeElement))},function(e,t,n){var r=n(32);e.exports="string"===typeof r?r:r.toString()},function(e,t,n){t=e.exports=n(1)(void 0),t.push([e.i,"iframe{\n width: 750px;\n height: 100%;\n top: 60px;\n right: 0;\n position: fixed;\n border: none;\n z-index: 9999;\n border-left: 2px solid #24292E;\n}\n\n.switch{\n width: 40px;\n height: 40px;\n background-color: #AA0000;\n border-radius: 50%;\n position: fixed;\n right: 50px;\n bottom: 50px;\n cursor: pointer;\n text-align: center;\n z-index: 10000;\n}\n\n.switch img{\n width: 30px;\n height: 30px;\n margin-top:5px;\n}\n\n.switch.close img{\n margin-top:10px;\n width: 20px;\n height: 20px;\n}\n\n\n@media only screen and (max-width: 800px) {\n iframe{\n width: 100%;\n }\n}\n",""])},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0&&(n[t[r].replace(":","")]=e)}),n}function i(e,t){c[e]={callback:t,reg:u(e)}}function a(e){e=e.replace(/#.*$/,"");var t,n=e.split(/[?&]/).slice(1),r={};for(t=0;t-1)&&(y=x,a=a.slice(0,A))}a&&(r.push(a),a="",f=!1);var O="+"===w||"*"===w,E="?"===w||"*"===w,S=g||_,j=y||s;r.push({name:m||o++,prefix:y,delimiter:j,optional:E,repeat:O,pattern:S?c(S):"[^"+u(j===s?j:j+s)+"]+?"})}}return(a||iHello!`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */function h(nodeName,attributes){var children=[],lastSimple,child,simple,i;for(i=arguments.length;i-->2;){stack.push(arguments[i]);}if(attributes&&attributes.children!=null){if(!stack.length)stack.push(attributes.children);delete attributes.children;}while(stack.length){if((child=stack.pop())&&child.pop!==undefined){for(i=child.length;i--;){stack.push(child[i]);}}else{if(typeof child==='boolean')child=null;if(simple=typeof nodeName!=='function'){if(child==null)child='';else if(typeof child==='number')child=String(child);else if(typeof child!=='string')simple=false;}if(simple&&lastSimple){children[children.length-1]+=child;}else if(children.length===0){children=[child];}else{children.push(child);}lastSimple=simple;}}var p=new VNode();p.nodeName=nodeName;p.children=children;p.attributes=attributes==null?undefined:attributes;p.key=attributes==null?undefined:attributes.key;// if a \"vnode hook\" is defined, pass every created VNode to it\nif(options.vnode!==undefined)options.vnode(p);return p;}/* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError('Object.assign cannot be called with null or undefined');}return Object(val);}function assign(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s8){usePromise=true;}}}var defer=usePromise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function isArray(obj){return Object.prototype.toString.call(obj)==='[object Array]';}function getUse(data,paths,out,name){var obj=[];paths.forEach(function(path,index){var isPath=typeof path==='string';if(isPath){obj[index]=getTargetByPath(data,path);}else{var key=Object.keys(path)[0];var value=path[key];if(typeof value==='string'){obj[index]=getTargetByPath(data,value);}else{var tempPath=value[0];if(typeof tempPath==='string'){var tempVal=getTargetByPath(data,tempPath);obj[index]=value[1]?value[1](tempVal):tempVal;}else{var args=[];tempPath.forEach(function(path){args.push(getTargetByPath(data,path));});obj[index]=value[1].apply(null,args);}}obj[key]=obj[index];}});out&&(out[name]=obj);return obj;}function getTargetByPath(origin,path){var arr=path.replace(/]/g,'').replace(/\\[/g,'.').split('.');var current=origin;for(var i=0,len=arr.length;i2?[].slice.call(arguments,2):vnode.children);}// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL$1=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;/** Managed queue of dirty components to be re-rendered */var items=[];function enqueueRender(component){if(items.push(component)==1){(options.debounceRendering||defer)(rerender);}}/** Rerender all enqueued dirty components */function rerender(){var p;while(p=items.pop()){renderComponent(p);}}var mapping=options.mapping;/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */function isSameNodeType(node,vnode,hydrating){if(typeof vnode==='string'||typeof vnode==='number'){return node.splitText!==undefined;}if(typeof vnode.nodeName==='string'){var ctor=mapping[vnode.nodeName];if(ctor){return hydrating||node._componentConstructor===ctor;}return!node._componentConstructor&&isNamedNode(node,vnode.nodeName);}return hydrating||node._componentConstructor===vnode.nodeName;}/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */function isNamedNode(node,nodeName){return node.normalizedNodeName===nodeName||node.nodeName.toLowerCase()===nodeName.toLowerCase();}/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */function getNodeProps(vnode){var props=extend({},vnode.attributes);props.children=vnode.children;var defaultProps=vnode.nodeName.defaultProps;if(defaultProps!==undefined){for(var i in defaultProps){if(props[i]===undefined){props[i]=defaultProps[i];}}}return props;}/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */function createNode(nodeName,isSvg){var node=isSvg?options.doc.createElementNS('http://www.w3.org/2000/svg',nodeName):options.doc.createElement(nodeName);node.normalizedNodeName=nodeName;return node;}function parseCSSText(cssText){var cssTxt=cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g,' ').replace(/\\s+/g,' ');var style={},_ref=cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt],a=_ref[0],b=_ref[1],rule=_ref[2];var cssToJs=function cssToJs(s){return s.replace(/\\W+\\w/g,function(match){return match.slice(-1).toUpperCase();});};var properties=rule.split(';').map(function(o){return o.split(':').map(function(x){return x&&x.trim();});});for(var i=properties,i=Array.isArray(i),i=0,i=i?i:i[Symbol.iterator]();;){var _ref3;if(i){if(i>=i.length)break;_ref3=i[i++];}else{i=i.next();if(i.done)break;_ref3=i.value;}var _ref2=_ref3;var property=_ref2[0];var value=_ref2[1];style[cssToJs(property)]=value;}return style;}/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */function removeNode(node){var parentNode=node.parentNode;if(parentNode)parentNode.removeChild(node);}/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */function setAccessor(node,name,old,value,isSvg){if(name==='className')name='class';if(name==='key'){// ignore\n}else if(name==='ref'){applyRef(old,null);applyRef(value,node);}else if(name==='class'&&!isSvg){node.className=value||'';}else if(name==='style'){if(options.isWeb){if(!value||typeof value==='string'||typeof old==='string'){node.style.cssText=value||'';}if(value&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'){if(typeof old!=='string'){for(var i in old){if(!(i in value))node.style[i]='';}}for(var i in value){node.style[i]=typeof value[i]==='number'&&IS_NON_DIMENSIONAL$1.test(i)===false?value[i]+'px':value[i];}}}else{var oldJson=old,currentJson=value;if(typeof old==='string'){oldJson=parseCSSText(old);}if(typeof value=='string'){currentJson=parseCSSText(value);}var result={},changed=false;if(oldJson){for(var key in oldJson){if((typeof currentJson==='undefined'?'undefined':_typeof(currentJson))=='object'&&!(key in currentJson)){result[key]='';changed=true;}}for(var ckey in currentJson){if(currentJson[ckey]!==oldJson[ckey]){result[ckey]=currentJson[ckey];changed=true;}}if(changed){node.setStyles(result);}}else{node.setStyles(currentJson);}}}else if(name==='dangerouslySetInnerHTML'){if(value)node.innerHTML=value.__html||'';}else if(name[0]=='o'&&name[1]=='n'){var useCapture=name!==(name=name.replace(/Capture$/,''));var nameLower=name.toLowerCase();name=(nameLower in node?nameLower:name).slice(2);if(value){if(!old){node.addEventListener(name,eventProxy,useCapture);if(name=='tap'){node.addEventListener('touchstart',touchStart,useCapture);node.addEventListener('touchend',touchEnd,useCapture);}}}else{node.removeEventListener(name,eventProxy,useCapture);if(name=='tap'){node.removeEventListener('touchstart',touchStart,useCapture);node.removeEventListener('touchend',touchEnd,useCapture);}}(node._listeners||(node._listeners={}))[name]=value;}else if(name!=='list'&&name!=='type'&&!isSvg&&name in node){setProperty(node,name,value==null?'':value);if(value==null||value===false)node.removeAttribute(name);}else{var ns=isSvg&&name!==(name=name.replace(/^xlink:?/,''));if(value==null||value===false){if(ns)node.removeAttributeNS('http://www.w3.org/1999/xlink',name.toLowerCase());else node.removeAttribute(name);}else if(typeof value!=='function'){if(ns)node.setAttributeNS('http://www.w3.org/1999/xlink',name.toLowerCase(),value);else node.setAttribute(name,value);}}}/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */function setProperty(node,name,value){try{node[name]=value;}catch(e){}}/** Proxy an event to hooked event handlers\n *\t@private\n */function eventProxy(e){return this._listeners[e.type](options.event&&options.event(e)||e);}function touchStart(e){this.___touchX=e.touches[0].pageX;this.___touchY=e.touches[0].pageY;this.___scrollTop=document.body.scrollTop;}function touchEnd(e){if(Math.abs(e.changedTouches[0].pageX-this.___touchX)<30&&Math.abs(e.changedTouches[0].pageY-this.___touchY)<30&&Math.abs(document.body.scrollTop-this.___scrollTop)<30){this.dispatchEvent(new CustomEvent('tap',{detail:e}));}}var styleId=0;function getCtorName(ctor){for(var i=0,len=options.styleCache.length;i-1;){if(item===arr[i])return true;}return false;}function getRootName(prop,path){if(path==='#'){return prop;}return path.split('-')[1];}obaa.add=function(obj,prop){watch(obj,prop,obj.$_o_.$_p_,obj.$_o_.$_r_);};obaa.set=function(obj,prop,value){if(obj[prop]===undefined){watch(obj,prop,obj.$_o_.$_p_,obj.$_o_.$_r_);}obj[prop]=value;};Array.prototype.size=function(length){this.length=length;};/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {object} [store]\n *\t@public\n */function render(vnode,parent,store,empty,merge){parent=typeof parent==='string'?document.querySelector(parent):parent;if(store){if(store.data){obsStore(store);}else{options.isMultiStore=true;for(var key in store){if(store[key].data){obsStore(store[key],key);}}}}if(empty){while(parent.firstChild){parent.removeChild(parent.firstChild);}}if(merge){merge=typeof merge==='string'?document.querySelector(merge):merge;}return diff(merge,vnode,store,false,parent,false);}function obsStore(store,storeName){store.instances=[];store.updateSelfInstances=[];extendStoreUpate(store,storeName);obaa(store.data,function(prop,val,old,path){var patchs={};var key=fixPath(path+'-'+prop);patchs[key]=true;store.update(patchs);});}function merge(vnode,merge,store){obsStore(store);merge=typeof merge==='string'?document.querySelector(merge):merge;return diff(merge,vnode,store);}function extendStoreUpate(store,key){store.update=function(patch){if(Object.keys(patch).length>0){this.instances.forEach(function(instance){compute(instance,key);if(key){if(instance._updatePath&&instance._updatePath[key]&&needUpdate(patch,instance._updatePath[key])){if(instance.use){getUse(store.data,(typeof instance.use==='function'?instance.use():instance.use)[key],instance.using,key);}instance.update();}}else{if(instance._updatePath&&needUpdate(patch,instance._updatePath)){if(instance.use){instance.using=getUse(store.data,typeof instance.use==='function'?instance.use():instance.use);}instance.update();}}});this.updateSelfInstances.forEach(function(instance){compute(instance,key);if(key){if(instance._updateSelfPath&&instance._updateSelfPath[key]&&needUpdate(patch,instance._updateSelfPath[key])){if(instance.useSelf){getUse(store.data,(typeof instance.useSelf==='function'?instance.useSelf():instance.useSelf)[key],instance.usingSelf,key);}instance.updateSelf();}}else{if(instance._updateSelfPath&&needUpdate(patch,instance._updateSelfPath)){instance.usingSelf=getUse(store.data,typeof instance.useSelf==='function'?instance.useSelf():instance.useSelf);instance.updateSelf();}}});this.onChange&&this.onChange(patch);}};}function compute(instance,isMultiStore){if(instance.compute){for(var ck in instance.compute){instance.computed[ck]=instance.compute[ck].call(isMultiStore?instance.store:instance.store.data);}}}function needUpdate(diffResult,updatePath){for(var keyA in diffResult){if(updatePath[keyA]){return true;}for(var keyB in updatePath){if(includePath(keyA,keyB)){return true;}}}return false;}function includePath(pathA,pathB){if(pathA.indexOf(pathB)===0){var next=pathA.substr(pathB.length,1);if(next==='['||next==='.'){return true;}}return false;}function fixPath(path){var mpPath='';var arr=path.replace('#-','').split('-');arr.forEach(function(item,index){if(index){if(isNaN(Number(item))){mpPath+='.'+item;}else{mpPath+='['+item+']';}}else{mpPath+=item;}});return mpPath;}function _classCallCheck$1(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");}return call&&((typeof call==='undefined'?'undefined':_typeof(call))===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+(typeof superClass==='undefined'?'undefined':_typeof(superClass)));}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var storeHelpers=['use','useSelf'];function define(name,ctor,config){if(ctor.is==='WeElement'){options.mapping[name]=ctor;}else{if(typeof config==='string'){config={css:config};}else{config=config||{};}var Comp=function(_Component){_inherits(Comp,_Component);function Comp(){var _temp,_this,_ret;_classCallCheck$1(this,Comp);for(var _len=arguments.length,args=Array(_len),key=0;key<_len;key++){args[key]=arguments[key];}return _ret=(_temp=(_this=_possibleConstructorReturn(this,_Component.call.apply(_Component,[this].concat(args))),_this),_this.compute=config.compute,_temp),_possibleConstructorReturn(_this,_ret);}Comp.prototype.render=function render(){return ctor.call(this,this);};return Comp;}(Component);Comp.css=config.css;Comp.propTypes=config.propTypes;Comp.defaultProps=config.defaultProps;var _loop=function _loop(key){if(typeof config[key]==='function'){Comp.prototype[key]=function(){return config[key].apply(this,arguments);};}};for(var key in config){_loop(key);}storeHelpers.forEach(function(func){if(config[func]&&config[func]!=='function'){Comp.prototype[func]=function(){return config[func];};}});options.mapping[name]=Comp;}}function rpx(str){return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g,function(a,b){return window.innerWidth*Number(b)/750+'px';});}function tag(name){return function(target){define(name,target);};}/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */var hasOwn={}.hasOwnProperty;function classNames(){var classes=[];for(var i=0;i0){return{'class':classNames.apply(null,args)};}}function getHost(component){var base=component.base;if(base){while(base.parentNode){if(base.parentNode._component){return base.parentNode._component;}else{base=base.parentNode;}}}}/**\n * preact-render-to-string based on preact-render-to-string\n * by Jason Miller\n * Licensed under the MIT License\n * https://github.com/developit/preact-render-to-string\n *\n * modified by dntzhang\n */var encodeEntities=function encodeEntities(s){return String(s).replace(/&/g,'&').replace(//g,'>').replace(/\"/g,'"');};var indent=function indent(s,char){return String(s).replace(/(\\n+)/g,'$1'+(char||'\\t'));};var mapping$1=options.mapping;var VOID_ELEMENTS=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;var isLargeString=function isLargeString(s,length,ignoreLines){return String(s).length>(length||40)||!ignoreLines&&String(s).indexOf('\\n')!==-1||String(s).indexOf('<')!==-1;};var JS_TO_CSS={};// Convert an Object style to a CSSText string\nfunction styleObjToCss(s){var str='';for(var prop in s){var val=s[prop];if(val!=null){if(str)str+=' ';// str += jsToCss(prop);\nstr+=JS_TO_CSS[prop]||(JS_TO_CSS[prop]=prop.replace(/([A-Z])/g,'-$1').toLowerCase());str+=': ';str+=val;if(typeof val==='number'&&IS_NON_DIMENSIONAL.test(prop)===false){str+='px';}str+=';';}}return str||undefined;}function renderToString(vnode,opts,store,isSvgMode){store=store||{};opts=Object.assign({scopedCSS:true},opts);var css={};var html=_renderToString(vnode,opts,store,isSvgMode,css);return{css:Object.values(css),html:html};}/** The default export is an alias of `render()`. */function _renderToString(vnode,opts,store,isSvgMode,css){if(vnode==null||typeof vnode==='boolean'){return'';}var nodeName=vnode.nodeName,attributes=vnode.attributes,isComponent=false;var pretty=true&&opts.pretty,indentChar=pretty&&typeof pretty==='string'?pretty:'\\t';// #text nodes\nif((typeof vnode==='undefined'?'undefined':_typeof(vnode))!=='object'&&!nodeName){return encodeEntities(vnode);}// components\nvar ctor=mapping$1[nodeName];if(ctor){isComponent=true;var props=getNodeProps$1(vnode),rendered;// class-based components\nvar c=new ctor(props,store);// turn off stateful re-rendering:\nc._disable=c.__x=true;c.props=props;c.store=store;if(c.install)c.install();if(c.beforeRender)c.beforeRender();rendered=c.render(c.props,c.store);if(opts.scopedCSS){if(c.constructor.css||c.css){var cssStr=c.constructor.css?c.constructor.css:typeof c.css==='function'?c.css():c.css;var cssAttr='_s'+getCtorName(c.constructor);css[cssAttr]={id:cssAttr,css:scoper(cssStr,cssAttr)};addScopedAttrStatic(rendered,cssAttr);}c.scopedCSSAttr=vnode.css;scopeHost(rendered,c.scopedCSSAttr);}return _renderToString(rendered,opts,store,false,css);}// render JSX to HTML\nvar s='',html;if(attributes){var attrs=Object.keys(attributes);// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\nif(opts&&opts.sortAttributes===true)attrs.sort();for(var i=0;i]/))continue;if(!(opts&&opts.allAttributes)&&(name==='key'||name==='ref'))continue;if(name==='className'){if(attributes['class'])continue;name='class';}else if(isSvgMode&&name.match(/^xlink:?./)){name=name.toLowerCase().replace(/^xlink:?/,'xlink:');}if(name==='style'&&v&&(typeof v==='undefined'?'undefined':_typeof(v))==='object'){v=styleObjToCss(v);}var hooked=opts.attributeHook&&opts.attributeHook(name,v,store,opts,isComponent);if(hooked||hooked===''){s+=hooked;continue;}if(name==='dangerouslySetInnerHTML'){html=v&&v.__html;}else if((v||v===0||v==='')&&typeof v!=='function'){if(v===true||v===''){v=name;// in non-xml mode, allow boolean attributes\nif(!opts||!opts.xml){s+=' '+name;continue;}}s+=' '+name+'=\"'+encodeEntities(v)+'\"';}}}// account for >1 multiline attribute\nif(pretty){var sub=s.replace(/^\\n\\s*/,' ');if(sub!==s&&!~sub.indexOf('\\n'))s=sub;else if(pretty&&~s.indexOf('\\n'))s+='\\n';}s='<'+nodeName+s+'>';if(String(nodeName).match(/[\\s\\n\\\\/='\"\\0<>]/))throw s;var isVoid=String(nodeName).match(VOID_ELEMENTS);if(isVoid)s=s.replace(/>$/,' />');var pieces=[];if(html){// if multiline, indent.\nif(pretty&&isLargeString(html)){html='\\n'+indentChar+indent(html,indentChar);}s+=html;}else if(vnode.children){var hasLarge=pretty&&~s.indexOf('\\n');for(var i=0;i';}if(!isVoid){if(pretty&&~s.indexOf('\\n'))s+='\\n';s+='';}return s;}function assign$1(obj,props){for(var i in props){obj[i]=props[i];}return obj;}function getNodeProps$1(vnode){var props=assign$1({},vnode.attributes);props.children=vnode.children;var defaultProps=vnode.nodeName.defaultProps;if(defaultProps!==undefined){for(var i in defaultProps){if(props[i]===undefined){props[i]=defaultProps[i];}}}return props;}h.f=Fragment;var html=_htm2.default.bind(h);var WeElement=Component;var defineElement=define;function createRef(){return{};}options.root.Omi={h:h,createElement:h,cloneElement:cloneElement,createRef:createRef,Component:Component,render:render,rerender:rerender,options:options,WeElement:WeElement,define:define,rpx:rpx,defineElement:defineElement,classNames:classNames,extractClass:extractClass,getHost:getHost,renderToString:renderToString,tag:tag,merge:merge,html:html,htm:_htm2.default,obaa:obaa};options.root.omi=options.root.Omi;options.root.Omi.version='omio-2.8.0';var omi={h:h,createElement:h,cloneElement:cloneElement,createRef:createRef,Component:Component,render:render,rerender:rerender,options:options,WeElement:WeElement,define:define,rpx:rpx,defineElement:defineElement,classNames:classNames,extractClass:extractClass,getHost:getHost,renderToString:renderToString,tag:tag,merge:merge,html:html,htm:_htm2.default,obaa:obaa};exports.default=omi;exports.h=h;exports.createElement=h;exports.cloneElement=cloneElement;exports.createRef=createRef;exports.Component=Component;exports.render=render;exports.rerender=rerender;exports.options=options;exports.WeElement=WeElement;exports.define=define;exports.rpx=rpx;exports.defineElement=defineElement;exports.classNames=classNames;exports.extractClass=extractClass;exports.getHost=getHost;exports.renderToString=renderToString;exports.tag=tag;exports.merge=merge;exports.html=html;exports.obaa=obaa;//# sourceMappingURL=omi.esm.js.map\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/// css base code, injected by the css-loader\nmodule.exports=function(useSourceMap){var list=[];// return the list of modules as css string\nlist.toString=function toString(){return this.map(function(item){var content=cssWithMappingToString(item,useSourceMap);if(item[2]){return\"@media \"+item[2]+\"{\"+content+\"}\";}else{return content;}}).join(\"\");};// import a list of modules into the list\nlist.i=function(modules,mediaQuery){if(typeof modules===\"string\")modules=[[null,modules,\"\"]];var alreadyImportedModules={};for(var i=0;icapacity){// Manually shift all values starting at the index back to the\n// beginning of the queue.\nfor(var scan=0,newLength=queue.length-index;scan-1;};}function normalizeName(name){if(typeof name!=='string'){name=String(name);}if(/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)){throw new TypeError('Invalid character in header field name');}return name.toLowerCase();}function normalizeValue(value){if(typeof value!=='string'){value=String(value);}return value;}// Build a destructive iterator for the value list\nfunction iteratorFor(items){var iterator={next:function next(){var value=items.shift();return{done:value===undefined,value:value};}};if(support.iterable){iterator[Symbol.iterator]=function(){return iterator;};}return iterator;}function Headers(headers){this.map={};if(headers instanceof Headers){headers.forEach(function(value,name){this.append(name,value);},this);}else if(Array.isArray(headers)){headers.forEach(function(header){this.append(header[0],header[1]);},this);}else if(headers){Object.getOwnPropertyNames(headers).forEach(function(name){this.append(name,headers[name]);},this);}}Headers.prototype.append=function(name,value){name=normalizeName(name);value=normalizeValue(value);var oldValue=this.map[name];this.map[name]=oldValue?oldValue+','+value:value;};Headers.prototype['delete']=function(name){delete this.map[normalizeName(name)];};Headers.prototype.get=function(name){name=normalizeName(name);return this.has(name)?this.map[name]:null;};Headers.prototype.has=function(name){return this.map.hasOwnProperty(normalizeName(name));};Headers.prototype.set=function(name,value){this.map[normalizeName(name)]=normalizeValue(value);};Headers.prototype.forEach=function(callback,thisArg){for(var name in this.map){if(this.map.hasOwnProperty(name)){callback.call(thisArg,this.map[name],name,this);}}};Headers.prototype.keys=function(){var items=[];this.forEach(function(value,name){items.push(name);});return iteratorFor(items);};Headers.prototype.values=function(){var items=[];this.forEach(function(value){items.push(value);});return iteratorFor(items);};Headers.prototype.entries=function(){var items=[];this.forEach(function(value,name){items.push([name,value]);});return iteratorFor(items);};if(support.iterable){Headers.prototype[Symbol.iterator]=Headers.prototype.entries;}function consumed(body){if(body.bodyUsed){return Promise.reject(new TypeError('Already read'));}body.bodyUsed=true;}function fileReaderReady(reader){return new Promise(function(resolve,reject){reader.onload=function(){resolve(reader.result);};reader.onerror=function(){reject(reader.error);};});}function readBlobAsArrayBuffer(blob){var reader=new FileReader();var promise=fileReaderReady(reader);reader.readAsArrayBuffer(blob);return promise;}function readBlobAsText(blob){var reader=new FileReader();var promise=fileReaderReady(reader);reader.readAsText(blob);return promise;}function readArrayBufferAsText(buf){var view=new Uint8Array(buf);var chars=new Array(view.length);for(var i=0;i-1?upcased:method;}function Request(input,options){options=options||{};var body=options.body;if(input instanceof Request){if(input.bodyUsed){throw new TypeError('Already read');}this.url=input.url;this.credentials=input.credentials;if(!options.headers){this.headers=new Headers(input.headers);}this.method=input.method;this.mode=input.mode;if(!body&&input._bodyInit!=null){body=input._bodyInit;input.bodyUsed=true;}}else{this.url=String(input);}this.credentials=options.credentials||this.credentials||'omit';if(options.headers||!this.headers){this.headers=new Headers(options.headers);}this.method=normalizeMethod(options.method||this.method||'GET');this.mode=options.mode||this.mode||null;this.referrer=null;if((this.method==='GET'||this.method==='HEAD')&&body){throw new TypeError('Body not allowed for GET or HEAD requests');}this._initBody(body);}Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit});};function decode(body){var form=new FormData();body.trim().split('&').forEach(function(bytes){if(bytes){var split=bytes.split('=');var name=split.shift().replace(/\\+/g,' ');var value=split.join('=').replace(/\\+/g,' ');form.append(decodeURIComponent(name),decodeURIComponent(value));}});return form;}function parseHeaders(rawHeaders){var headers=new Headers();rawHeaders.split(/\\r?\\n/).forEach(function(line){var parts=line.split(':');var key=parts.shift().trim();if(key){var value=parts.join(':').trim();headers.append(key,value);}});return headers;}Body.call(Request.prototype);function Response(bodyInit,options){if(!options){options={};}this.type='default';this.status='status'in options?options.status:200;this.ok=this.status>=200&&this.status<300;this.statusText='statusText'in options?options.statusText:'OK';this.headers=new Headers(options.headers);this.url=options.url||'';this._initBody(bodyInit);}Body.call(Response.prototype);Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url});};Response.error=function(){var response=new Response(null,{status:0,statusText:''});response.type='error';return response;};var redirectStatuses=[301,302,303,307,308];Response.redirect=function(url,status){if(redirectStatuses.indexOf(status)===-1){throw new RangeError('Invalid status code');}return new Response(null,{status:status,headers:{location:url}});};self.Headers=Headers;self.Request=Request;self.Response=Response;self.fetch=function(input,init){return new Promise(function(resolve,reject){var request=new Request(input,init);var xhr=new XMLHttpRequest();xhr.onload=function(){var options={status:xhr.status,statusText:xhr.statusText,headers:parseHeaders(xhr.getAllResponseHeaders()||'')};options.url='responseURL'in xhr?xhr.responseURL:options.headers.get('X-Request-URL');var body='response'in xhr?xhr.response:xhr.responseText;resolve(new Response(body,options));};xhr.onerror=function(){reject(new TypeError('Network request failed'));};xhr.ontimeout=function(){reject(new TypeError('Network request failed'));};xhr.open(request.method,request.url,true);if(request.credentials==='include'){xhr.withCredentials=true;}if('responseType'in xhr&&support.blob){xhr.responseType='blob';}request.headers.forEach(function(value,name){xhr.setRequestHeader(name,value);});xhr.send(typeof request._bodyInit==='undefined'?null:request._bodyInit);});};self.fetch.polyfill=true;})(typeof self!=='undefined'?self:undefined);\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*//* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError('Object.assign cannot be called with null or undefined');}return Object(val);}function shouldUseNative(){try{if(!Object.assign){return false;}// Detect buggy property enumeration order in older V8 versions.\n// https://bugs.chromium.org/p/v8/issues/detail?id=4118\nvar test1=new String('abc');// eslint-disable-line no-new-wrappers\ntest1[5]='de';if(Object.getOwnPropertyNames(test1)[0]==='5'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056\nvar test2={};for(var i=0;i<10;i++){test2['_'+String.fromCharCode(i)]=i;}var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n];});if(order2.join('')!=='0123456789'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056\nvar test3={};'abcdefghijklmnopqrst'.split('').forEach(function(letter){test3[letter]=letter;});if(Object.keys(Object.assign({},test3)).join('')!=='abcdefghijklmnopqrst'){return false;}return true;}catch(err){// We don't expect any of the above to throw, but better to be safe.\nreturn false;}}module.exports=shouldUseNative()?Object.assign:function(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s1?r:r[0];};var n=function n(t,r,u,e){for(var p=1;p=5&&((e||!n&&5===u)&&(s.push(e,u,r),u=6),n&&(s.push(n,u,r),u=6)),e=\"\";},a=0;a\"===t?(u=1,e=\"\"):e=t+e[0]:p?t===p?p=\"\":e+=t:'\"'===t||\"'\"===t?p=t:\">\"===t?(h(),u=1):u&&(\"=\"===t?(u=5,r=e,e=\"\"):\"/\"===t&&(u<5||\">\"===n[a][f+1])?(h(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,2),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(h(),u=2):e+=t),3===u&&\"!--\"===e&&(u=4,s=s[0]);}}return h(),s;},r=\"function\"==typeof Map,u=r?new Map():{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r;}:function(n){for(var r=\"\",e=0;e {\n// let newP = document.createElement('div')\n// newP.className = '_code-ctn'\n// let pre = code.parentNode\n// let ctn = pre.parentNode\n// if (pre.nodeName === 'PRE') {\n// ctn.insertBefore(newP, pre)\n// let hl = document.createElement('div')\n// hl.className = '_hl'\n// newP.appendChild(hl)\n// newP.appendChild(pre)\n// let nums = codeHlNumArr[index]\n// let max = Math.max.apply(null, nums)\n// let inner = ''\n// for (let i = 0; i <= max; i++) {\n// if (nums.indexOf(i) == -1) {\n// inner += '
'\n// } else {\n// inner += '
'\n// }\n// }\n// hl.innerHTML = inner\n// }\n// })\n//fix line-highlight\nwindow.dispatchEvent(new Event('resize'));}},{key:'_arrToNumber',value:function _arrToNumber(numArr){var arr=[];numArr.forEach(function(item){if(item.indexOf('-')!==-1){var tempArr=item.split('-');var begin=Number(tempArr[0]);var end=Number(tempArr[1]);for(var i=begin;i0)return false;}return true;}},{key:'render',value:function render(){if(!this.demo)return;return Omi.h('div',null,this.show&&Omi.h('iframe',{style:'height:'+(window.innerHeight-59)+'px',src:this.demo}),!this.show&&Omi.h('div',{'class':'switch code',onClick:this.onShow},Omi.h('img',{src:__webpack_require__(33)})),this.show&&Omi.h('div',{'class':'switch close',onClick:this.onClose},Omi.h('img',{src:__webpack_require__(34)})));}}]);return _class2;}(_omi.WeElement));\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\n var result = __webpack_require__(32);\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(1)(undefined);\n// imports\n\n\n// module\nexports.push([module.i, \"iframe{\\n width: 750px;\\n height: 100%;\\n top: 60px;\\n right: 0;\\n position: fixed;\\n border: none;\\n z-index: 9999;\\n border-left: 2px solid #24292E;\\n}\\n\\n.switch{\\n width: 40px;\\n height: 40px;\\n background-color: #AA0000;\\n border-radius: 50%;\\n position: fixed;\\n right: 50px;\\n bottom: 50px;\\n cursor: pointer;\\n text-align: center;\\n z-index: 10000;\\n}\\n\\n.switch img{\\n width: 30px;\\n height: 30px;\\n margin-top:5px;\\n}\\n\\n.switch.close img{\\n margin-top:10px;\\n width: 20px;\\n height: 20px;\\n}\\n\\n\\n@media only screen and (max-width: 800px) {\\n iframe{\\n width: 100%;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC\"\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==\"\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(exports,\"__esModule\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){params[pathArr[index].replace(':','')]=item;}});return params;}function route(path,callback){mapping[path]={callback:callback,reg:p2r(path)};}function getGlobal(){if((typeof global==='undefined'?'undefined':_typeof(global))!=='object'||!global||global.Math!==Math||global.Array!==Array){return self||window||global||function(){return this;}();}return global;}function getUrlParams(url){url=url.replace(/#.*$/,'');var queryArray=url.split(/[?&]/).slice(1);var i,args={};for(i=0;i [\"test\", \"\\d+\", undefined, \"?\"]\n// \"(\\\\d+)\" => [undefined, undefined, \"\\d+\", undefined]\n'(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'].join('|'),'g');/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */function parse(str,options){var tokens=[];var key=0;var index=0;var path='';var defaultDelimiter=options&&options.delimiter||DEFAULT_DELIMITER;var whitelist=options&&options.whitelist||undefined;var pathEscaped=false;var res;while((res=PATH_REGEXP.exec(str))!==null){var m=res[0];var escaped=res[1];var offset=res.index;path+=str.slice(index,offset);index=offset+m.length;// Ignore already escaped sequences.\nif(escaped){path+=escaped[1];pathEscaped=true;continue;}var prev='';var name=res[2];var capture=res[3];var group=res[4];var modifier=res[5];if(!pathEscaped&&path.length){var k=path.length-1;var c=path[k];var matches=whitelist?whitelist.indexOf(c)>-1:true;if(matches){prev=c;path=path.slice(0,k);}}// Push the current path onto the tokens.\nif(path){tokens.push(path);path='';pathEscaped=false;}var repeat=modifier==='+'||modifier==='*';var optional=modifier==='?'||modifier==='*';var pattern=capture||group;var delimiter=prev||defaultDelimiter;tokens.push({name:name||key++,prefix:prev,delimiter:delimiter,optional:optional,repeat:repeat,pattern:pattern?escapeGroup(pattern):'[^'+escapeString(delimiter===defaultDelimiter?delimiter:delimiter+defaultDelimiter)+']+?'});}// Push any remaining characters.\nif(path||indexHello!`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */\nfunction h(nodeName, attributes) {\n var children = [],\n lastSimple,\n child,\n simple,\n i;\n for (i = arguments.length; i-- > 2;) {\n stack.push(arguments[i]);\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children);\n delete attributes.children;\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--;) {\n stack.push(child[i]);\n }\n } else {\n if (typeof child === 'boolean') child = null;\n\n if (simple = typeof nodeName !== 'function') {\n if (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child;\n } else if (children.length === 0) {\n children = [child];\n } else {\n children.push(child);\n }\n\n lastSimple = simple;\n }\n }\n\n var p = new VNode();\n p.nodeName = nodeName;\n p.children = children;\n p.attributes = attributes == null ? undefined : attributes;\n p.key = attributes == null ? undefined : attributes.key;\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p);\n\n return p;\n}\n\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction assign(target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n}\n\nif (typeof Element !== 'undefined' && !Element.prototype.addEventListener) {\n var runListeners = function runListeners(oEvent) {\n if (!oEvent) {\n oEvent = window.event;\n }\n for (var iLstId = 0, iElId = 0, oEvtListeners = oListeners[oEvent.type]; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n for (iLstId; iLstId < oEvtListeners.aEvts[iElId].length; iLstId++) {\n oEvtListeners.aEvts[iElId][iLstId].call(this, oEvent);\n }\n break;\n }\n }\n };\n\n var oListeners = {};\n\n Element.prototype.addEventListener = function (sEventType, fListener /*, useCapture (will be ignored!) */) {\n if (oListeners.hasOwnProperty(sEventType)) {\n var oEvtListeners = oListeners[sEventType];\n for (var nElIdx = -1, iElId = 0; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n nElIdx = iElId;break;\n }\n }\n if (nElIdx === -1) {\n oEvtListeners.aEls.push(this);\n oEvtListeners.aEvts.push([fListener]);\n this[\"on\" + sEventType] = runListeners;\n } else {\n var aElListeners = oEvtListeners.aEvts[nElIdx];\n if (this[\"on\" + sEventType] !== runListeners) {\n aElListeners.splice(0);\n this[\"on\" + sEventType] = runListeners;\n }\n for (var iLstId = 0; iLstId < aElListeners.length; iLstId++) {\n if (aElListeners[iLstId] === fListener) {\n return;\n }\n }\n aElListeners.push(fListener);\n }\n } else {\n oListeners[sEventType] = { aEls: [this], aEvts: [[fListener]] };\n this[\"on\" + sEventType] = runListeners;\n }\n };\n Element.prototype.removeEventListener = function (sEventType, fListener /*, useCapture (will be ignored!) */) {\n if (!oListeners.hasOwnProperty(sEventType)) {\n return;\n }\n var oEvtListeners = oListeners[sEventType];\n for (var nElIdx = -1, iElId = 0; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n nElIdx = iElId;break;\n }\n }\n if (nElIdx === -1) {\n return;\n }\n for (var iLstId = 0, aElListeners = oEvtListeners.aEvts[nElIdx]; iLstId < aElListeners.length; iLstId++) {\n if (aElListeners[iLstId] === fListener) {\n aElListeners.splice(iLstId, 1);\n }\n }\n };\n}\n\nif (typeof Object.create !== 'function') {\n Object.create = function (proto, propertiesObject) {\n if (typeof proto !== 'object' && typeof proto !== 'function') {\n throw new TypeError('Object prototype may only be an Object: ' + proto);\n } else if (proto === null) {\n throw new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n }\n\n // if (typeof propertiesObject != 'undefined') {\n // throw new Error(\"This browser's implementation of Object.create is a shim and doesn't support a second argument.\");\n // }\n\n function F() {}\n F.prototype = proto;\n\n return new F();\n };\n}\n\nif (!String.prototype.trim) {\n String.prototype.trim = function () {\n return this.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n };\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {Object} obj\t\tObject onto which properties should be copied.\n * @param {Object} props\tObject from which to copy properties.\n * @returns obj\n * @private\n */\nfunction extend(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nfunction applyRef(ref, value) {\n if (ref) {\n if (typeof ref == 'function') ref(value);else ref.current = value;\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n *\n * @param {Function} callback\n */\n\nvar usePromise = typeof Promise == 'function';\n\n// for native\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\n if (global.__config__.platform === 'android') {\n usePromise = true;\n } else {\n var systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\n if (systemVersion > 8) {\n usePromise = true;\n }\n }\n}\n\nvar defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\nfunction isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n}\n\nfunction getUse(data, paths, out, name) {\n var obj = [];\n paths.forEach(function (path, index) {\n var isPath = typeof path === 'string';\n if (isPath) {\n obj[index] = getTargetByPath(data, path);\n } else {\n var key = Object.keys(path)[0];\n var value = path[key];\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value);\n } else {\n var tempPath = value[0];\n if (typeof tempPath === 'string') {\n var tempVal = getTargetByPath(data, tempPath);\n obj[index] = value[1] ? value[1](tempVal) : tempVal;\n } else {\n var args = [];\n tempPath.forEach(function (path) {\n args.push(getTargetByPath(data, path));\n });\n obj[index] = value[1].apply(null, args);\n }\n }\n obj[key] = obj[index];\n }\n });\n out && (out[name] = obj);\n return obj;\n}\n\nfunction getTargetByPath(origin, path) {\n var arr = path.replace(/]/g, '').replace(/\\[/g, '.').split('.');\n var current = origin;\n for (var i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]];\n }\n return current;\n}\n\nfunction getPath(obj, out, name) {\n\n var result = {};\n obj.forEach(function (item) {\n if (typeof item === 'string') {\n result[item] = true;\n } else {\n var tempPath = item[Object.keys(item)[0]];\n if (typeof tempPath === 'string') {\n result[tempPath] = true;\n } else {\n if (typeof tempPath[0] === 'string') {\n result[tempPath[0]] = true;\n } else {\n tempPath[0].forEach(function (path) {\n return result[path] = true;\n });\n }\n }\n }\n });\n out && (out[name] = result);\n return result;\n}\n\nfunction removeItem(item, arr) {\n for (var i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n break;\n }\n }\n}\n\nfunction Fragment(props) {\n return props.children;\n}\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nfunction cloneElement(vnode, props) {\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL$1 = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\n/** Managed queue of dirty components to be re-rendered */\n\nvar items = [];\n\nfunction enqueueRender(component) {\n if (items.push(component) == 1) {\n(options.debounceRendering || defer)(rerender);\n }\n}\n\n/** Rerender all enqueued dirty components */\nfunction rerender() {\n var p;\n while (p = items.pop()) {\n renderComponent(p);\n }\n}\n\nvar mapping = options.mapping;\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nfunction isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined;\n }\n if (typeof vnode.nodeName === 'string') {\n var ctor = mapping[vnode.nodeName];\n if (ctor) {\n return hydrating || node._componentConstructor === ctor;\n }\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n }\n return hydrating || node._componentConstructor === vnode.nodeName;\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nfunction isNamedNode(node, nodeName) {\n return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nfunction getNodeProps(vnode) {\n var props = extend({}, vnode.attributes);\n props.children = vnode.children;\n\n var defaultProps = vnode.nodeName.defaultProps;\n if (defaultProps !== undefined) {\n for (var i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i];\n }\n }\n }\n\n return props;\n}\n\n/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */\nfunction createNode(nodeName, isSvg) {\n var node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\n node.normalizedNodeName = nodeName;\n return node;\n}\n\nfunction parseCSSText(cssText) {\n var cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, ' ').replace(/\\s+/g, ' ');\n var style = {},\n _ref = cssTxt.match(/ ?(.*?) ?{([^}]*)}/) || [a, b, cssTxt],\n a = _ref[0],\n b = _ref[1],\n rule = _ref[2];\n\n var cssToJs = function cssToJs(s) {\n return s.replace(/\\W+\\w/g, function (match) {\n return match.slice(-1).toUpperCase();\n });\n };\n var properties = rule.split(';').map(function (o) {\n return o.split(':').map(function (x) {\n return x && x.trim();\n });\n });\n for (var i = properties, i = Array.isArray(i), i = 0, i = i ? i : i[Symbol.iterator]();;) {\n var _ref3;\n\n if (i) {\n if (i >= i.length) break;\n _ref3 = i[i++];\n } else {\n i = i.next();\n if (i.done) break;\n _ref3 = i.value;\n }\n\n var _ref2 = _ref3;\n var property = _ref2[0];\n var value = _ref2[1];\n style[cssToJs(property)] = value;\n }return style;\n}\n\n/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */\nfunction removeNode(node) {\n var parentNode = node.parentNode;\n if (parentNode) parentNode.removeChild(node);\n}\n\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */\nfunction setAccessor(node, name, old, value, isSvg) {\n if (name === 'className') name = 'class';\n\n if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null);\n applyRef(value, node);\n } else if (name === 'class' && !isSvg) {\n node.className = value || '';\n } else if (name === 'style') {\n if (options.isWeb) {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || '';\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (var i in old) {\n if (!(i in value)) node.style[i] = '';\n }\n }\n for (var i in value) {\n node.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL$1.test(i) === false ? value[i] + 'px' : value[i];\n }\n }\n } else {\n var oldJson = old,\n currentJson = value;\n if (typeof old === 'string') {\n oldJson = parseCSSText(old);\n }\n if (typeof value == 'string') {\n currentJson = parseCSSText(value);\n }\n\n var result = {},\n changed = false;\n\n if (oldJson) {\n for (var key in oldJson) {\n if (typeof currentJson == 'object' && !(key in currentJson)) {\n result[key] = '';\n changed = true;\n }\n }\n\n for (var ckey in currentJson) {\n if (currentJson[ckey] !== oldJson[ckey]) {\n result[ckey] = currentJson[ckey];\n changed = true;\n }\n }\n\n if (changed) {\n node.setStyles(result);\n }\n } else {\n node.setStyles(currentJson);\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || '';\n } else if (name[0] == 'o' && name[1] == 'n') {\n var useCapture = name !== (name = name.replace(/Capture$/, ''));\n var nameLower = name.toLowerCase();\n name = (nameLower in node ? nameLower : name).slice(2);\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture);\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture);\n node.addEventListener('touchend', touchEnd, useCapture);\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture);\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture);\n node.removeEventListener('touchend', touchEnd, useCapture);\n }\n }\n(node._listeners || (node._listeners = {}))[name] = value;\n } else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n setProperty(node, name, value == null ? '' : value);\n if (value == null || value === false) node.removeAttribute(name);\n } else {\n var ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n if (value == null || value === false) {\n if (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n } else if (typeof value !== 'function') {\n if (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n }\n }\n}\n\n/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */\nfunction setProperty(node, name, value) {\n try {\n node[name] = value;\n } catch (e) {}\n}\n\n/** Proxy an event to hooked event handlers\n *\t@private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type](options.event && options.event(e) || e);\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX;\n this.___touchY = e.touches[0].pageY;\n this.___scrollTop = document.body.scrollTop;\n}\n\nfunction touchEnd(e) {\n if (Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 && Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 && Math.abs(document.body.scrollTop - this.___scrollTop) < 30) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }));\n }\n}\n\nvar styleId = 0;\n\nfunction getCtorName(ctor) {\n for (var i = 0, len = options.styleCache.length; i < len; i++) {\n var item = options.styleCache[i];\n\n if (item.ctor === ctor) {\n return item.attrName;\n }\n }\n\n var attrName = 's' + styleId;\n options.styleCache.push({ ctor: ctor, attrName: attrName });\n styleId++;\n\n return attrName;\n}\n\n// many thanks to https://github.com/thomaspark/scoper/\nfunction scoper(css, prefix) {\n prefix = '[' + prefix.toLowerCase() + ']';\n // https://www.w3.org/TR/css-syntax-3/#lexical\n css = css.replace(/\\/\\*[^*]*\\*+([^/][^*]*\\*+)*\\//g, '');\n // eslint-disable-next-line\n var re = new RegExp('([^\\r\\n,{}:]+)(:[^\\r\\n,{}]+)?(,(?=[^{}]*{)|\\s*{)', 'g');\n /**\n * Example:\n *\n * .classname::pesudo { color:red }\n *\n * g1 is normal selector `.classname`\n * g2 is pesudo class or pesudo element\n * g3 is the suffix\n */\n css = css.replace(re, function (g0, g1, g2, g3) {\n if (typeof g2 === 'undefined') {\n g2 = '';\n }\n\n /* eslint-ignore-next-line */\n if (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\n return g1 + g2 + g3;\n }\n\n var appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\n //let prependClass = prefix + ' ' + g1.trim() + g2;\n\n return appendClass + g3;\n //return appendClass + ',' + prependClass + g3;\n });\n\n return css;\n}\n\nfunction addStyle(cssText, id) {\n id = id.toLowerCase();\n var ele = document.getElementById(id);\n var head = document.getElementsByTagName('head')[0];\n if (ele && ele.parentNode === head) {\n head.removeChild(ele);\n }\n\n var someThingStyles = document.createElement('style');\n head.appendChild(someThingStyles);\n someThingStyles.setAttribute('type', 'text/css');\n someThingStyles.setAttribute('id', id);\n if (window.ActiveXObject) {\n someThingStyles.styleSheet.cssText = cssText;\n } else {\n someThingStyles.textContent = cssText;\n }\n}\n\nfunction addStyleWithoutId(cssText) {\n var head = document.getElementsByTagName('head')[0];\n var someThingStyles = document.createElement('style');\n head.appendChild(someThingStyles);\n someThingStyles.setAttribute('type', 'text/css');\n\n if (window.ActiveXObject) {\n someThingStyles.styleSheet.cssText = cssText;\n } else {\n someThingStyles.textContent = cssText;\n }\n}\n\nfunction addScopedAttrStatic(vdom, attr) {\n if (options.scopedStyle) {\n scopeVdom(attr, vdom);\n }\n}\n\nfunction addStyleToHead(style, attr) {\n if (options.scopedStyle) {\n if (!options.staticStyleMapping[attr]) {\n addStyle(scoper(style, attr), attr);\n options.staticStyleMapping[attr] = true;\n }\n } else if (!options.staticStyleMapping[attr]) {\n addStyleWithoutId(style);\n options.staticStyleMapping[attr] = true;\n }\n}\n\nfunction scopeVdom(attr, vdom) {\n if (typeof vdom === 'object') {\n vdom.attributes = vdom.attributes || {};\n vdom.attributes[attr] = '';\n vdom.css = vdom.css || {};\n vdom.css[attr] = '';\n vdom.children.forEach(function (child) {\n return scopeVdom(attr, child);\n });\n }\n}\n\nfunction scopeHost(vdom, css) {\n if (typeof vdom === 'object' && css) {\n vdom.attributes = vdom.attributes || {};\n for (var key in css) {\n vdom.attributes[key] = '';\n }\n }\n}\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nvar mounts = [];\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar hydrating = false;\n\n/** Invoke queued componentDidMount lifecycle methods */\nfunction flushMounts() {\n var c;\n while (c = mounts.pop()) {\n if (options.afterMount) options.afterMount(c);\n if (c.installed) c.installed();\n if (c.constructor.css || c.css) {\n addStyleToHead(c.constructor.css ? c.constructor.css : typeof c.css === 'function' ? c.css() : c.css, '_s' + getCtorName(c.constructor));\n }\n }\n}\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nfunction diff(dom, vnode, store, mountAll, parent, componentRoot, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !('__omiattr_' in dom);\n }\n var ret;\n\n if (isArray(vnode)) {\n vnode = {\n nodeName: 'span',\n children: vnode\n };\n } else if (vnode && vnode.nodeName === Fragment) {\n vnode.nodeName = 'span';\n }\n\n ret = idiff(dom, vnode, store, mountAll, componentRoot, updateSelf);\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (! --diffLevel) {\n hydrating = false;\n // invoke queued componentDidMount lifecycle methods\n if (!componentRoot) flushMounts();\n }\n\n return ret;\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, store, mountAll, componentRoot, updateSelf) {\n var out = dom,\n prevSvgMode = isSvgMode;\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n // If the VNode represents a Component, perform a component diff:\n var vnodeName = vnode.nodeName;\n if (options.mapping[vnodeName]) {\n vnode.nodeName = options.mapping[vnodeName];\n return buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf);\n }\n if (typeof vnodeName == 'function') {\n return buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf);\n }\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode;\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode);\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n recollectNodeTree(dom, true);\n }\n }\n\n //ie8 error\n try {\n out['__omiattr_'] = true;\n } catch (e) {}\n\n return out;\n }\n\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName);\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode);\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) {\n out.appendChild(dom.firstChild);\n } // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true);\n }\n }\n\n var fc = out.firstChild,\n props = out['__omiattr_'],\n vchildren = vnode.children;\n\n if (props == null) {\n props = out['__omiattr_'] = {};\n for (var a = out.attributes, i = a.length; i--;) {\n props[a[i].name] = a[i].value;\n }\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0];\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if (vchildren && vchildren.length || fc != null) {\n innerDiffNode(out, vchildren, store, mountAll, hydrating || props.dangerouslySetInnerHTML != null, updateSelf);\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props);\n\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode;\n\n return out;\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Object} store\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\n *\t@param {Boolean} mountAll\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, store, mountAll, isHydrating, updateSelf) {\n var originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child;\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (var i = 0; i < len; i++) {\n var _child = originalChildren[i],\n props = _child['__omiattr_'],\n key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n if (key != null) {\n keyedLen++;\n keyed[key] = _child;\n } else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n children[childrenLen++] = _child;\n }\n }\n }\n\n if (vlen !== 0) {\n for (var i = 0; i < vlen; i++) {\n vchild = vchildren[i];\n child = null;\n\n // attempt to find a node based on key matching\n var key = vchild.key;\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key];\n keyed[key] = undefined;\n keyedLen--;\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n child = c;\n children[j] = undefined;\n if (j === childrenLen - 1) childrenLen--;\n if (j === min) min++;\n break;\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, store, mountAll, null, updateSelf);\n\n f = originalChildren[i];\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child);\n } else if (child === f.nextSibling) {\n removeNode(f);\n } else {\n dom.insertBefore(child, f);\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (var i in keyed) {\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n }\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nfunction recollectNodeTree(node, unmountOnly) {\n var component = node._component;\n if (component) {\n // if node is owned by a Component, unmount that component (ends up recursing back here)\n unmountComponent(component);\n } else {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node['__omiattr_'] != null) applyRef(node['__omiattr_'].ref, null);\n\n if (unmountOnly === false || node['__omiattr_'] == null) {\n removeNode(node);\n }\n\n removeChildren(node);\n }\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nfunction removeChildren(node) {\n node = node.lastChild;\n while (node) {\n var next = node.previousSibling;\n recollectNodeTree(node, true);\n node = next;\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old) {\n var name;\n\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n }\n }\n}\n\n/** Retains a pool of Components for re-use, keyed on component name.\n *\tNote: since component names are not unique or even necessarily available, these are primarily a form of sharding.\n *\t@private\n */\nvar components = {};\n\n/** Reclaim a component for later re-use by the recycler. */\nfunction collectComponent(component) {\n var name = component.constructor.name;(components[name] || (components[name] = [])).push(component);\n}\n\n/** Create a component. Normalizes differences between PFC's and classful Components. */\nfunction createComponent(Ctor, props, store, vnode) {\n var list = components[Ctor.name],\n inst;\n\n if (Ctor.prototype && Ctor.prototype.render) {\n inst = new Ctor(props, store);\n Component.call(inst, props, store);\n } else {\n inst = new Component(props, store);\n inst.constructor = Ctor;\n inst.render = doRender;\n }\n vnode && (inst.scopedCssAttr = vnode.css);\n\n if (inst.store) {\n if (inst.use) {\n var use = typeof inst.use === 'function' ? inst.use() : inst.use;\n\n if (options.isMultiStore) {\n var _updatePath = {};\n var using = {};\n for (var storeName in use) {\n _updatePath[storeName] = {};\n using[storeName] = {};\n getPath(use[storeName], _updatePath, storeName);\n getUse(inst.store[storeName].data, use[storeName], using, storeName);\n inst.store[storeName].instances.push(inst);\n }\n inst.using = using;\n inst._updatePath = _updatePath;\n } else {\n inst._updatePath = getPath(use);\n inst.using = getUse(inst.store.data, use);\n inst.store.instances.push(inst);\n }\n }\n\n if (inst.useSelf) {\n var _use = typeof inst.useSelf === 'function' ? inst.useSelf() : inst.useSelf;\n\n if (options.isMultiStore) {\n var _updatePath2 = {};\n var _using = {};\n for (var _storeName in _use) {\n getPath(_use[_storeName], _updatePath2, _storeName);\n getUse(inst.store[_storeName].data, _use[_storeName], _using, _storeName);\n inst.store[_storeName].updateSelfInstances.push(inst);\n }\n inst.usingSelf = _using;\n inst._updateSelfPath = _updatePath2;\n } else {\n inst._updateSelfPath = getPath(_use);\n inst.usingSelf = getUse(inst.store.data, _use);\n inst.store.updateSelfInstances.push(inst);\n }\n }\n\n if (inst.compute) {\n for (var key in inst.compute) {\n inst.computed[key] = inst.compute[key].call(options.isMultiStore ? inst.store : inst.store.data);\n }\n }\n }\n\n if (list) {\n for (var i = list.length; i--;) {\n if (list[i].constructor === Ctor) {\n inst.nextBase = list[i].nextBase;\n list.splice(i, 1);\n break;\n }\n }\n }\n return inst;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, store) {\n return this.constructor(props, store);\n}\n\n/** Set a component's `props` (generally derived from JSX attributes).\n *\t@param {Object} props\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\n */\nfunction setComponentProps(component, props, opts, store, mountAll) {\n if (component._disable) return;\n component._disable = true;\n\n if (component.__ref = props.ref) delete props.ref;\n if (component.__key = props.key) delete props.key;\n\n if (!component.base || mountAll) {\n if (component.beforeInstall) component.beforeInstall();\n if (component.install) component.install();\n }\n\n if (!component.prevProps) component.prevProps = component.props;\n component.props = props;\n\n component._disable = false;\n\n if (opts !== 0) {\n if (opts === 1 || options.syncComponentUpdates !== false || !component.base) {\n renderComponent(component, 1, mountAll);\n } else {\n enqueueRender(component);\n }\n }\n\n applyRef(component.__ref, component);\n}\n\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\n *\t@param {Component} component\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\n *\t@private\n */\nfunction renderComponent(component, opts, mountAll, isChild, updateSelf) {\n if (component._disable) return;\n\n var props = component.props,\n store = component.store,\n previousProps = component.prevProps || props,\n isUpdate = component.base,\n nextBase = component.nextBase,\n initialBase = isUpdate || nextBase,\n initialChildComponent = component._component,\n skip = false,\n rendered,\n inst,\n cbase;\n\n // if updating\n if (isUpdate) {\n component.props = previousProps;\n\n var receiveResult = true;\n if (component.receiveProps) {\n receiveResult = component.receiveProps(props, previousProps);\n }\n if (receiveResult !== false) {\n skip = false;\n if (component.beforeUpdate) {\n component.beforeUpdate(props, store);\n }\n } else {\n skip = true;\n }\n component.props = props;\n }\n\n component.prevProps = component.nextBase = null;\n\n if (!skip) {\n component.beforeRender && component.beforeRender();\n rendered = component.render(props, store);\n\n //don't rerender\n if (component.constructor.css || component.css) {\n addScopedAttrStatic(rendered, '_s' + getCtorName(component.constructor));\n }\n\n scopeHost(rendered, component.scopedCssAttr);\n\n var childComponent = rendered && rendered.nodeName,\n toUnmount,\n base,\n ctor = options.mapping[childComponent];\n\n if (ctor) {\n // set up high order component link\n\n var childProps = getNodeProps(rendered);\n inst = initialChildComponent;\n\n if (inst && inst.constructor === ctor && childProps.key == inst.__key) {\n setComponentProps(inst, childProps, 1, store, false);\n } else {\n toUnmount = inst;\n\n component._component = inst = createComponent(ctor, childProps, store);\n inst.nextBase = inst.nextBase || nextBase;\n inst._parentComponent = component;\n setComponentProps(inst, childProps, 0, store, false);\n renderComponent(inst, 1, mountAll, true);\n }\n\n base = inst.base;\n } else {\n cbase = initialBase;\n\n // destroy high order component link\n toUnmount = initialChildComponent;\n if (toUnmount) {\n cbase = component._component = null;\n }\n\n if (initialBase || opts === 1) {\n if (cbase) cbase._component = null;\n base = diff(cbase, rendered, store, mountAll || !isUpdate, initialBase && initialBase.parentNode, true, updateSelf);\n }\n }\n\n if (initialBase && base !== initialBase && inst !== initialChildComponent) {\n var baseParent = initialBase.parentNode;\n if (baseParent && base !== baseParent) {\n baseParent.replaceChild(base, initialBase);\n\n if (!toUnmount) {\n initialBase._component = null;\n recollectNodeTree(initialBase, false);\n }\n }\n }\n\n if (toUnmount) {\n unmountComponent(toUnmount);\n }\n\n component.base = base;\n if (base && !isChild) {\n var componentRef = component,\n t = component;\n while (t = t._parentComponent) {\n(componentRef = t).base = base;\n }\n base._component = componentRef;\n base._componentConstructor = componentRef.constructor;\n }\n }\n\n if (!isUpdate || mountAll) {\n mounts.unshift(component);\n } else if (!skip) {\n // Ensure that pending componentDidMount() hooks of child components\n // are called before the componentDidUpdate() hook in the parent.\n // Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\n // flushMounts();\n\n if (component.afterUpdate) {\n //deprecated\n component.afterUpdate(previousProps, store);\n }\n if (component.updated) {\n component.updated(previousProps, store);\n }\n if (options.afterUpdate) options.afterUpdate(component);\n }\n\n if (component._renderCallbacks != null) {\n while (component._renderCallbacks.length) {\n component._renderCallbacks.pop().call(component);\n }\n }\n\n if (!diffLevel && !isChild) flushMounts();\n}\n\n/** Apply the Component referenced by a VNode to the DOM.\n *\t@param {Element} dom\tThe DOM node to mutate\n *\t@param {VNode} vnode\tA Component-referencing VNode\n *\t@returns {Element} dom\tThe created/mutated element\n *\t@private\n */\nfunction buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf) {\n var c = dom && dom._component,\n originalComponent = c,\n oldDom = dom,\n isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n isOwner = isDirectOwner,\n props = getNodeProps(vnode);\n while (c && !isOwner && (c = c._parentComponent)) {\n isOwner = c.constructor === vnode.nodeName;\n }\n\n if (c && isOwner && (!mountAll || c._component)) {\n if (!updateSelf) {\n setComponentProps(c, props, 3, store, mountAll);\n }\n dom = c.base;\n } else {\n if (originalComponent && !isDirectOwner) {\n unmountComponent(originalComponent);\n dom = oldDom = null;\n }\n\n c = createComponent(vnode.nodeName, props, store, vnode);\n if (dom && !c.nextBase) {\n c.nextBase = dom;\n // passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\n oldDom = null;\n }\n setComponentProps(c, props, 1, store, mountAll);\n dom = c.base;\n\n if (oldDom && dom !== oldDom) {\n oldDom._component = null;\n recollectNodeTree(oldDom, false);\n }\n }\n\n return dom;\n}\n\n/** Remove a component from the DOM and recycle it.\n *\t@param {Component} component\tThe Component instance to unmount\n *\t@private\n */\nfunction unmountComponent(component) {\n if (options.beforeUnmount) options.beforeUnmount(component);\n\n var base = component.base;\n\n component._disable = true;\n\n if (component.uninstall) component.uninstall();\n\n if (component.store) {\n if (options.isMultiStore) {\n for (var key in component.store) {\n var current = component.store[key];\n current.instances && removeItem(component, current.instances);\n current.updateSelfInstances && removeItem(component, current.updateSelfInstances);\n }\n } else {\n component.store.instances && removeItem(component, component.store.instances);\n component.store.updateSelfInstances && removeItem(component, component.store.updateSelfInstances);\n }\n }\n\n component.base = null;\n\n // recursively tear down & recollect high-order component children:\n var inner = component._component;\n if (inner) {\n unmountComponent(inner);\n } else if (base) {\n if (base['__omiattr_'] != null) applyRef(base['__omiattr_'].ref, null);\n\n component.nextBase = base;\n\n removeNode(base);\n collectComponent(component);\n\n removeChildren(base);\n }\n\n applyRef(component.__ref, null);\n}\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar id = 0;\n\nvar Component = function () {\n function Component(props, store) {\n _classCallCheck(this, Component);\n\n this.props = assign({}, this.constructor.defaultProps, props);\n this.elementId = id++;\n\n this._preCss = null;\n\n this.store = store;\n this.computed = {};\n }\n\n Component.prototype.update = function update(ignoreAttrs, updateSelf, callback) {\n if (this._willUpdate) return;\n this._willUpdate = true;\n if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n renderComponent(this, 2);\n if (options.componentChange) options.componentChange(this, this.base);\n this._willUpdate = false;\n };\n\n Component.prototype.updateSelf = function updateSelf() {\n if (this._willUpdateSelf) return;\n this._willUpdateSelf = true;\n renderComponent(this, 2, null, null, true);\n this._willUpdateSelf = false;\n };\n\n Component.prototype.fire = function fire(type, data) {\n var _this = this;\n\n Object.keys(this.props).every(function (key) {\n if ('on' + type.toLowerCase() === key.toLowerCase()) {\n _this.props[key]({ detail: data });\n return false;\n }\n return true;\n });\n };\n\n Component.prototype.render = function render() {};\n\n return Component;\n}();\n\nComponent.is = 'WeElement';\n\n/*\n * obaa 2.1.0\n * By dntzhang\n * Github: https://github.com/Tencent/omi/tree/master/packages/obaa\n * MIT Licensed.\n */\n\n// $_r_: root\n// $_c_: prop change callback\n// $_p_: path\n\nfunction obaa(target, arr, callback) {\n\n\tvar eventPropArr = [];\n\tif (isArray$1(target)) {\n\t\tif (target.length === 0) {\n\t\t\ttarget.$_o_ = {\n\t\t\t\t$_r_: target,\n\t\t\t\t$_p_: '#'\n\t\t\t};\n\t\t}\n\t\tmock(target, target);\n\t}\n\tif (target && typeof target === 'object' && Object.keys(target).length === 0) {\n\t\ttrack(target);\n\t\ttarget.$_o_.$_r_ = target;\n\t}\n\tfor (var prop in target) {\n\t\tif (target.hasOwnProperty(prop)) {\n\t\t\tif (callback) {\n\t\t\t\tif (isArray$1(arr) && isInArray(arr, prop)) {\n\t\t\t\t\teventPropArr.push(prop);\n\t\t\t\t\twatch(target, prop, null, target);\n\t\t\t\t} else if (isString(arr) && prop == arr) {\n\t\t\t\t\teventPropArr.push(prop);\n\t\t\t\t\twatch(target, prop, null, target);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\teventPropArr.push(prop);\n\t\t\t\twatch(target, prop, null, target);\n\t\t\t}\n\t\t}\n\t}\n\tif (!target.$_c_) {\n\t\ttarget.$_c_ = [];\n\t}\n\tvar propChanged = callback ? callback : arr;\n\ttarget.$_c_.push({\n\t\tall: !callback,\n\t\tpropChanged: propChanged,\n\t\teventPropArr: eventPropArr\n\t});\n}\n\nvar triggerStr = ['concat', 'copyWithin', 'fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift', 'size'].join(',');\n\nvar methods = ['concat', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values', 'size'];\n\nfunction mock(target, root) {\n\tmethods.forEach(function (item) {\n\t\ttarget[item] = function () {\n\t\t\tvar old = Array.prototype.slice.call(this, 0);\n\t\t\tvar result = Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));\n\t\t\tif (new RegExp('\\\\b' + item + '\\\\b').test(triggerStr)) {\n\t\t\t\tfor (var cprop in this) {\n\t\t\t\t\tif (this.hasOwnProperty(cprop) && !isFunction(this[cprop])) {\n\t\t\t\t\t\twatch(this, cprop, this.$_o_.$_p_, root);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//todo\n\t\t\t\tonPropertyChanged('Array-' + item, this, old, this, this.$_o_.$_p_, root);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\ttarget['pure' + item.substring(0, 1).toUpperCase() + item.substring(1)] = function () {\n\t\t\treturn Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));\n\t\t};\n\t});\n}\n\nfunction watch(target, prop, path, root) {\n\tif (prop === '$_o_') return;\n\tif (isFunction(target[prop])) return;\n\tif (!target.$_o_) target.$_o_ = {\n\t\t$_r_: root\n\t};\n\tif (path !== undefined && path !== null) {\n\t\ttarget.$_o_.$_p_ = path;\n\t} else {\n\t\ttarget.$_o_.$_p_ = '#';\n\t}\n\n\tvar currentValue = target.$_o_[prop] = target[prop];\n\tObject.defineProperty(target, prop, {\n\t\tget: function get() {\n\t\t\treturn this.$_o_[prop];\n\t\t},\n\t\tset: function set(value) {\n\t\t\tvar old = this.$_o_[prop];\n\t\t\tthis.$_o_[prop] = value;\n\t\t\tonPropertyChanged(prop, value, old, this, target.$_o_.$_p_, root);\n\t\t},\n\t\tconfigurable: true,\n\t\tenumerable: true\n\t});\n\tif (typeof currentValue == 'object') {\n\t\tif (isArray$1(currentValue)) {\n\t\t\tmock(currentValue, root);\n\t\t\tif (currentValue.length === 0) {\n\t\t\t\ttrack(currentValue, prop, path);\n\t\t\t}\n\t\t}\n\t\tif (currentValue && Object.keys(currentValue).length === 0) {\n\t\t\ttrack(currentValue, prop, path);\n\t\t}\n\t\tfor (var cprop in currentValue) {\n\t\t\tif (currentValue.hasOwnProperty(cprop)) {\n\t\t\t\twatch(currentValue, cprop, target.$_o_.$_p_ + '-' + prop, root);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction track(obj, prop, path) {\n\tif (obj.$_o_) {\n\t\treturn;\n\t}\n\tobj.$_o_ = {};\n\tif (path !== undefined && path !== null) {\n\t\tobj.$_o_.$_p_ = path + '-' + prop;\n\t} else {\n\t\tif (prop !== undefined && prop !== null) {\n\t\t\tobj.$_o_.$_p_ = '#' + '-' + prop;\n\t\t} else {\n\t\t\tobj.$_o_.$_p_ = '#';\n\t\t}\n\t}\n}\n\nfunction onPropertyChanged(prop, value, oldValue, target, path, root) {\n\tif (value !== oldValue && !(nan(value) && nan(oldValue)) && root.$_c_) {\n\t\tvar rootName = getRootName(prop, path);\n\t\tfor (var i = 0, len = root.$_c_.length; i < len; i++) {\n\t\t\tvar handler = root.$_c_[i];\n\t\t\tif (handler.all || isInArray(handler.eventPropArr, rootName) || rootName.indexOf('Array-') === 0) {\n\t\t\t\thandler.propChanged.call(target, prop, value, oldValue, path);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (prop.indexOf('Array-') !== 0 && typeof value === 'object') {\n\t\twatch(target, prop, target.$_o_.$_p_, root);\n\t}\n}\n\nfunction isFunction(obj) {\n\treturn Object.prototype.toString.call(obj) == '[object Function]';\n}\n\nfunction nan(value) {\n\treturn typeof value === \"number\" && isNaN(value);\n}\n\nfunction isArray$1(obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Array]';\n}\n\nfunction isString(obj) {\n\treturn typeof obj === 'string';\n}\n\nfunction isInArray(arr, item) {\n\tfor (var i = arr.length; --i > -1;) {\n\t\tif (item === arr[i]) return true;\n\t}\n\treturn false;\n}\n\nfunction getRootName(prop, path) {\n\tif (path === '#') {\n\t\treturn prop;\n\t}\n\treturn path.split('-')[1];\n}\n\nobaa.add = function (obj, prop) {\n\twatch(obj, prop, obj.$_o_.$_p_, obj.$_o_.$_r_);\n};\n\nobaa.set = function (obj, prop, value) {\n\tif (obj[prop] === undefined) {\n\t\twatch(obj, prop, obj.$_o_.$_p_, obj.$_o_.$_r_);\n\t}\n\tobj[prop] = value;\n};\n\nArray.prototype.size = function (length) {\n\tthis.length = length;\n};\n\n/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {object} [store]\n *\t@public\n */\nfunction render(vnode, parent, store, empty, merge) {\n parent = typeof parent === 'string' ? document.querySelector(parent) : parent;\n\n if (store) {\n if (store.data) {\n obsStore(store);\n } else {\n options.isMultiStore = true;\n for (var key in store) {\n if (store[key].data) {\n obsStore(store[key], key);\n }\n }\n }\n }\n\n if (empty) {\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n }\n\n if (merge) {\n merge = typeof merge === 'string' ? document.querySelector(merge) : merge;\n }\n\n return diff(merge, vnode, store, false, parent, false);\n}\n\nfunction obsStore(store, storeName) {\n\n store.instances = [];\n store.updateSelfInstances = [];\n extendStoreUpate(store, storeName);\n\n obaa(store.data, function (prop, val, old, path) {\n var patchs = {};\n var key = fixPath(path + '-' + prop);\n patchs[key] = true;\n store.update(patchs);\n });\n}\n\nfunction merge(vnode, merge, store) {\n obsStore(store);\n\n merge = typeof merge === 'string' ? document.querySelector(merge) : merge;\n\n return diff(merge, vnode, store);\n}\n\nfunction extendStoreUpate(store, key) {\n store.update = function (patch) {\n if (Object.keys(patch).length > 0) {\n this.instances.forEach(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key])) {\n if (instance.use) {\n getUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key);\n }\n\n instance.update();\n }\n } else {\n if (instance._updatePath && needUpdate(patch, instance._updatePath)) {\n if (instance.use) {\n instance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use);\n }\n instance.update();\n }\n }\n });\n\n this.updateSelfInstances.forEach(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key])) {\n if (instance.useSelf) {\n getUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key);\n }\n\n instance.updateSelf();\n }\n } else {\n if (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n instance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf);\n instance.updateSelf();\n }\n }\n });\n\n this.onChange && this.onChange(patch);\n }\n };\n}\n\nfunction compute(instance, isMultiStore) {\n if (instance.compute) {\n for (var ck in instance.compute) {\n instance.computed[ck] = instance.compute[ck].call(isMultiStore ? instance.store : instance.store.data);\n }\n }\n}\n\nfunction needUpdate(diffResult, updatePath) {\n for (var keyA in diffResult) {\n if (updatePath[keyA]) {\n return true;\n }\n for (var keyB in updatePath) {\n if (includePath(keyA, keyB)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction includePath(pathA, pathB) {\n if (pathA.indexOf(pathB) === 0) {\n var next = pathA.substr(pathB.length, 1);\n if (next === '[' || next === '.') {\n return true;\n }\n }\n return false;\n}\n\nfunction fixPath(path) {\n var mpPath = '';\n var arr = path.replace('#-', '').split('-');\n arr.forEach(function (item, index) {\n if (index) {\n if (isNaN(Number(item))) {\n mpPath += '.' + item;\n } else {\n mpPath += '[' + item + ']';\n }\n } else {\n mpPath += item;\n }\n });\n return mpPath;\n}\n\nfunction _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar storeHelpers = ['use', 'useSelf'];\n\nfunction define(name, ctor, config) {\n\tif (ctor.is === 'WeElement') {\n\t\toptions.mapping[name] = ctor;\n\t} else {\n\n\t\tif (typeof config === 'string') {\n\t\t\tconfig = { css: config };\n\t\t} else {\n\t\t\tconfig = config || {};\n\t\t}\n\n\t\tvar Comp = function (_Component) {\n\t\t\t_inherits(Comp, _Component);\n\n\t\t\tfunction Comp() {\n\t\t\t\tvar _temp, _this, _ret;\n\n\t\t\t\t_classCallCheck$1(this, Comp);\n\n\t\t\t\tfor (var _len = arguments.length, args = Array(_len), key = 0; key < _len; key++) {\n\t\t\t\t\targs[key] = arguments[key];\n\t\t\t\t}\n\n\t\t\t\treturn _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.compute = config.compute, _temp), _possibleConstructorReturn(_this, _ret);\n\t\t\t}\n\n\t\t\tComp.prototype.render = function render() {\n\t\t\t\treturn ctor.call(this, this);\n\t\t\t};\n\n\t\t\treturn Comp;\n\t\t}(Component);\n\n\t\tComp.css = config.css;\n\t\tComp.propTypes = config.propTypes;\n\t\tComp.defaultProps = config.defaultProps;\n\n\t\tvar _loop = function _loop(key) {\n\t\t\tif (typeof config[key] === 'function') {\n\t\t\t\tComp.prototype[key] = function () {\n\t\t\t\t\treturn config[key].apply(this, arguments);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\tfor (var key in config) {\n\t\t\t_loop(key);\n\t\t}\n\n\t\tstoreHelpers.forEach(function (func) {\n\t\t\tif (config[func] && config[func] !== 'function') {\n\t\t\t\tComp.prototype[func] = function () {\n\t\t\t\t\treturn config[func];\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\n\t\toptions.mapping[name] = Comp;\n\t}\n}\n\nfunction rpx(str) {\n return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, function (a, b) {\n return window.innerWidth * Number(b) / 750 + 'px';\n });\n}\n\nfunction tag(name) {\n return function (target) {\n define(name, target);\n };\n}\n\n/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty;\n\nfunction classNames() {\n var classes = [];\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n if (!arg) continue;\n\n var argType = typeof arg;\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg);\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg);\n if (inner) {\n classes.push(inner);\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(' ');\n}\n\nfunction extractClass() {\n var _Array$prototype$slic = Array.prototype.slice.call(arguments, 0),\n props = _Array$prototype$slic[0],\n args = _Array$prototype$slic.slice(1);\n\n if (props) {\n if (props['class']) {\n args.unshift(props['class']);\n delete props['class'];\n } else if (props.className) {\n args.unshift(props.className);\n delete props.className;\n }\n }\n if (args.length > 0) {\n return { 'class': classNames.apply(null, args) };\n }\n}\n\nfunction getHost(component) {\n var base = component.base;\n if (base) {\n while (base.parentNode) {\n if (base.parentNode._component) {\n return base.parentNode._component;\n } else {\n base = base.parentNode;\n }\n }\n }\n}\n\n/**\n * preact-render-to-string based on preact-render-to-string\n * by Jason Miller\n * Licensed under the MIT License\n * https://github.com/developit/preact-render-to-string\n *\n * modified by dntzhang\n */\n\nvar encodeEntities = function encodeEntities(s) {\n return String(s).replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"');\n};\n\nvar indent = function indent(s, char) {\n return String(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n};\n\nvar mapping$1 = options.mapping;\n\nvar VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nvar isLargeString = function isLargeString(s, length, ignoreLines) {\n return String(s).length > (length || 40) || !ignoreLines && String(s).indexOf('\\n') !== -1 || String(s).indexOf('<') !== -1;\n};\n\nvar JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nfunction styleObjToCss(s) {\n var str = '';\n for (var prop in s) {\n var val = s[prop];\n if (val != null) {\n if (str) str += ' ';\n // str += jsToCss(prop);\n str += JS_TO_CSS[prop] || (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n str += ': ';\n str += val;\n if (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n str += 'px';\n }\n str += ';';\n }\n }\n return str || undefined;\n}\n\nfunction renderToString(vnode, opts, store, isSvgMode) {\n store = store || {};\n opts = Object.assign({\n scopedCSS: true\n }, opts);\n var css = {};\n var html = _renderToString(vnode, opts, store, isSvgMode, css);\n return {\n css: Object.values(css),\n html: html\n };\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, opts, store, isSvgMode, css) {\n if (vnode == null || typeof vnode === 'boolean') {\n return '';\n }\n\n var nodeName = vnode.nodeName,\n attributes = vnode.attributes,\n isComponent = false;\n\n var pretty = true && opts.pretty,\n indentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n // #text nodes\n if (typeof vnode !== 'object' && !nodeName) {\n return encodeEntities(vnode);\n }\n\n // components\n var ctor = mapping$1[nodeName];\n if (ctor) {\n isComponent = true;\n\n var props = getNodeProps$1(vnode),\n rendered;\n // class-based components\n var c = new ctor(props, store);\n // turn off stateful re-rendering:\n c._disable = c.__x = true;\n c.props = props;\n c.store = store;\n if (c.install) c.install();\n if (c.beforeRender) c.beforeRender();\n rendered = c.render(c.props, c.store);\n\n if (opts.scopedCSS) {\n\n if (c.constructor.css || c.css) {\n\n var cssStr = c.constructor.css ? c.constructor.css : typeof c.css === 'function' ? c.css() : c.css;\n var cssAttr = '_s' + getCtorName(c.constructor);\n css[cssAttr] = {\n id: cssAttr,\n css: scoper(cssStr, cssAttr)\n };\n addScopedAttrStatic(rendered, cssAttr);\n }\n\n c.scopedCSSAttr = vnode.css;\n scopeHost(rendered, c.scopedCSSAttr);\n }\n\n return _renderToString(rendered, opts, store, false, css);\n }\n\n // render JSX to HTML\n var s = '',\n html;\n\n if (attributes) {\n var attrs = Object.keys(attributes);\n\n // allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n if (opts && opts.sortAttributes === true) attrs.sort();\n\n for (var i = 0; i < attrs.length; i++) {\n var name = attrs[i],\n v = attributes[name];\n if (name === 'children') continue;\n\n if (name.match(/[\\s\\n\\\\/='\"\\0<>]/)) continue;\n\n if (!(opts && opts.allAttributes) && (name === 'key' || name === 'ref')) continue;\n\n if (name === 'className') {\n if (attributes['class']) continue;\n name = 'class';\n } else if (isSvgMode && name.match(/^xlink:?./)) {\n name = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n }\n\n if (name === 'style' && v && typeof v === 'object') {\n v = styleObjToCss(v);\n }\n\n var hooked = opts.attributeHook && opts.attributeHook(name, v, store, opts, isComponent);\n if (hooked || hooked === '') {\n s += hooked;\n continue;\n }\n\n if (name === 'dangerouslySetInnerHTML') {\n html = v && v.__html;\n } else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n if (v === true || v === '') {\n v = name;\n // in non-xml mode, allow boolean attributes\n if (!opts || !opts.xml) {\n s += ' ' + name;\n continue;\n }\n }\n s += ' ' + name + '=\"' + encodeEntities(v) + '\"';\n }\n }\n }\n\n // account for >1 multiline attribute\n if (pretty) {\n var sub = s.replace(/^\\n\\s*/, ' ');\n if (sub !== s && !~sub.indexOf('\\n')) s = sub;else if (pretty && ~s.indexOf('\\n')) s += '\\n';\n }\n\n s = '<' + nodeName + s + '>';\n if (String(nodeName).match(/[\\s\\n\\\\/='\"\\0<>]/)) throw s;\n\n var isVoid = String(nodeName).match(VOID_ELEMENTS);\n if (isVoid) s = s.replace(/>$/, ' />');\n\n var pieces = [];\n if (html) {\n // if multiline, indent.\n if (pretty && isLargeString(html)) {\n html = '\\n' + indentChar + indent(html, indentChar);\n }\n s += html;\n } else if (vnode.children) {\n var hasLarge = pretty && ~s.indexOf('\\n');\n for (var i = 0; i < vnode.children.length; i++) {\n var child = vnode.children[i];\n if (child != null && child !== false) {\n var childSvgMode = nodeName === 'svg' ? true : nodeName === 'foreignObject' ? false : isSvgMode,\n ret = _renderToString(child, opts, store, childSvgMode, css);\n if (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n if (ret) pieces.push(ret);\n }\n }\n if (pretty && hasLarge) {\n for (var i = pieces.length; i--;) {\n pieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n }\n }\n }\n\n if (pieces.length) {\n s += pieces.join('');\n } else if (opts && opts.xml) {\n return s.substring(0, s.length - 1) + ' />';\n }\n\n if (!isVoid) {\n if (pretty && ~s.indexOf('\\n')) s += '\\n';\n s += '';\n }\n\n return s;\n}\n\nfunction assign$1(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\nfunction getNodeProps$1(vnode) {\n var props = assign$1({}, vnode.attributes);\n props.children = vnode.children;\n\n var defaultProps = vnode.nodeName.defaultProps;\n if (defaultProps !== undefined) {\n for (var i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i];\n }\n }\n }\n\n return props;\n}\n\nh.f = Fragment;\n\nvar html = htm.bind(h);\n\nvar WeElement = Component;\nvar defineElement = define;\nfunction createRef() {\n return {};\n}\n\noptions.root.Omi = {\n h: h,\n createElement: h,\n cloneElement: cloneElement,\n createRef: createRef,\n Component: Component,\n render: render,\n rerender: rerender,\n options: options,\n WeElement: WeElement,\n define: define,\n rpx: rpx,\n defineElement: defineElement,\n classNames: classNames,\n extractClass: extractClass,\n getHost: getHost,\n renderToString: renderToString,\n tag: tag,\n merge: merge,\n html: html,\n htm: htm,\n obaa: obaa\n};\noptions.root.omi = options.root.Omi;\noptions.root.Omi.version = 'omio-2.8.0';\n\nvar omi = {\n h: h,\n createElement: h,\n cloneElement: cloneElement,\n createRef: createRef,\n Component: Component,\n render: render,\n rerender: rerender,\n options: options,\n WeElement: WeElement,\n define: define,\n rpx: rpx,\n defineElement: defineElement,\n classNames: classNames,\n extractClass: extractClass,\n getHost: getHost,\n renderToString: renderToString,\n tag: tag,\n merge: merge,\n html: html,\n htm: htm,\n obaa: obaa\n};\n\nexport default omi;\nexport { h, h as createElement, cloneElement, createRef, Component, render, rerender, options, WeElement, define, rpx, defineElement, classNames, extractClass, getHost, renderToString, tag, merge, html, obaa };\n//# sourceMappingURL=omi.esm.js.map\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/omio/dist/omi.esm.js","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/css-loader/lib/css-base.js","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n\n// WEBPACK FOOTER //\n// (webpack)/buildin/global.js","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/core.js","'use strict';\n\nif (typeof Promise === 'undefined') {\n // Rejection tracking prevents a common issue where React gets into an\n // inconsistent state due to an error, but it gets swallowed by a Promise,\n // and the user has no idea what causes React's erratic future behavior.\n require('promise/lib/rejection-tracking').enable();\n window.Promise = require('promise/lib/es6-extensions.js');\n}\n\n// fetch() polyfill for making API calls.\nrequire('whatwg-fetch');\n\n// Object.assign() is commonly used with React.\n// It will use the native implementation if it's present and isn't buggy.\nObject.assign = require('object-assign');\n\n// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.\n// We don't polyfill it in the browser--this is user's responsibility.\nif (process.env.NODE_ENV === 'test') {\n require('raf').polyfill(global);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./config/polyfills.js","'use strict';\n\nvar Promise = require('./core');\n\nvar DEFAULT_WHITELIST = [\n ReferenceError,\n TypeError,\n RangeError\n];\n\nvar enabled = false;\nexports.disable = disable;\nfunction disable() {\n enabled = false;\n Promise._47 = null;\n Promise._71 = null;\n}\n\nexports.enable = enable;\nfunction enable(options) {\n options = options || {};\n if (enabled) disable();\n enabled = true;\n var id = 0;\n var displayId = 0;\n var rejections = {};\n Promise._47 = function (promise) {\n if (\n promise._83 === 2 && // IS REJECTED\n rejections[promise._56]\n ) {\n if (rejections[promise._56].logged) {\n onHandled(promise._56);\n } else {\n clearTimeout(rejections[promise._56].timeout);\n }\n delete rejections[promise._56];\n }\n };\n Promise._71 = function (promise, err) {\n if (promise._75 === 0) { // not yet handled\n promise._56 = id++;\n rejections[promise._56] = {\n displayId: null,\n error: err,\n timeout: setTimeout(\n onUnhandled.bind(null, promise._56),\n // For reference errors and type errors, this almost always\n // means the programmer made a mistake, so log them after just\n // 100ms\n // otherwise, wait 2 seconds to see if they get handled\n matchWhitelist(err, DEFAULT_WHITELIST)\n ? 100\n : 2000\n ),\n logged: false\n };\n }\n };\n function onUnhandled(id) {\n if (\n options.allRejections ||\n matchWhitelist(\n rejections[id].error,\n options.whitelist || DEFAULT_WHITELIST\n )\n ) {\n rejections[id].displayId = displayId++;\n if (options.onUnhandled) {\n rejections[id].logged = true;\n options.onUnhandled(\n rejections[id].displayId,\n rejections[id].error\n );\n } else {\n rejections[id].logged = true;\n logError(\n rejections[id].displayId,\n rejections[id].error\n );\n }\n }\n }\n function onHandled(id) {\n if (rejections[id].logged) {\n if (options.onHandled) {\n options.onHandled(rejections[id].displayId, rejections[id].error);\n } else if (!rejections[id].onUnhandled) {\n console.warn(\n 'Promise Rejection Handled (id: ' + rejections[id].displayId + '):'\n );\n console.warn(\n ' This means you can ignore any previous messages of the form \"Possible Unhandled Promise Rejection\" with id ' +\n rejections[id].displayId + '.'\n );\n }\n }\n }\n}\n\nfunction logError(id, error) {\n console.warn('Possible Unhandled Promise Rejection (id: ' + id + '):');\n var errStr = (error && (error.stack || error)) + '';\n errStr.split('\\n').forEach(function (line) {\n console.warn(' ' + line);\n });\n}\n\nfunction matchWhitelist(error, list) {\n return list.some(function (cls) {\n return error instanceof cls;\n });\n}\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/rejection-tracking.js","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/asap/browser-raw.js","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/es6-extensions.js","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/whatwg-fetch/fetch.js","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/object-assign/index.js","var n=function(t,r,u,e){for(var p=1;p=5&&((e||!n&&5===u)&&(s.push(e,u,r),u=6),n&&(s.push(n,u,r),u=6)),e=\"\"},a=0;a\"===t?(u=1,e=\"\"):e=t+e[0]:p?t===p?p=\"\":e+=t:'\"'===t||\"'\"===t?p=t:\">\"===t?(h(),u=1):u&&(\"=\"===t?(u=5,r=e,e=\"\"):\"/\"===t&&(u<5||\">\"===n[a][f+1])?(h(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,2),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(h(),u=2):e+=t),3===u&&\"!--\"===e&&(u=4,s=s[0])}return h(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/htm/dist/htm.module.js","import { define, WeElement } from 'omi'\n\nimport './my-head'\nimport './my-content'\nimport './my-sidebar'\nimport './my-demo'\n\ndefine('my-frame', class extends WeElement {\n\n installed(){\n this.store.init()\n }\n\n render() {\n return (\n
\n \n
\n \n
\n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-frame.js","import { define, WeElement } from 'omi'\nimport logo from './omi-logo2019.svg'\n\ndefine('my-head', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position'\n ]\n\n toggleMenus = evt => {\n this.store.toogleSidebar()\n evt.stopPropagation()\n }\n\n hideSidebar = evt => {\n this.store.hideSidebar()\n }\n\n render() {\n return (\n
\n
\n \"\"\n
\n\n \n \n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-head/index.js","module.exports = __webpack_public_path__ + \"static/media/omi-logo2019.923166c3.svg\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/omi-logo2019.svg\n// module id = 14\n// module chunks = 8 9","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAqklEQVRoQ+2WQQ6AMAgE4f+Pxg+oSTNbDXR7Z5UZQpvR/GTz/w838LdBG7ABSMAjBAHichvACGHAXANVVRCOtDwzb2E/GnADUv4R5xkQA9wWN3cLbUMmDrYBMdDluLkGfJEtD8N7wXkXWfsREk/Atri5W2gbMnGwDYiBLsfNNdB+jbqB5Wn2U0KM7KO4uVvoI4D4MzaAEcIAG4AAcbkNYIQwwAYgQFze3sAFU6MwMZGH3LoAAAAASUVORK5CYII=\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/menu.png\n// module id = 15\n// module chunks = 8 9","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/_index.css\n// module id = 16\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".head{\\n position:fixed;\\n height:60px;\\n line-height: 60px;\\n border-bottom: 1px solid #eee;\\n width:100%;\\n background-color:#24292e;\\n z-index:100;\\n top: 0;\\n}\\n\\nul,li{\\n display: inline-block;\\n}\\n\\n.logo_box{\\n width:100px;\\n display: inline-block;\\n text-align:center;\\n line-height: 60px;\\n}\\n\\n.menu a,.logo_box a{\\n display: inline-block;\\n height:60px;\\n color: white;\\n}\\n\\n.menu{\\n position: absolute;\\n right:20px;\\n}\\n\\n.menu li{\\n margin-left:15px;\\n}\\n\\n.logo_box a{\\n font-size: 34px;\\n font-weight: bold;\\n color: #00bff3;\\n padding: 0px 15px;\\n line-height: 60px;\\n cursor: pointer;\\n}\\n\\n.menu a:hover{\\n color: white;\\n}\\n\\n.m_menu{\\n position:fixed;\\n display:none;\\n cursor: pointer;\\n}\\n\\n.menu li{\\n display:inline-block;\\n}\\n\\n.logo{\\n width: 40px;\\n height: 40px;\\n margin-left: 10px;\\n margin-top: 10px;\\n cursor: pointer;\\n}\\n\\n@media only screen and (max-width: 800px) {\\n\\n .logo_box{\\n display:inline-block;\\n }\\n\\n .logo{\\n display: none;\\n }\\n\\n .head{\\n text-align:center;\\n }\\n\\n .m_menu{\\n top:0;\\n left:0;\\n display:block;\\n width:50px;\\n height:50px;\\n padding-top: 6px;\\n }\\n\\n .m_menu img{\\n width:30px;\\n }\\n\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-head/_index.css\n// module id = 17\n// module chunks = 8 9","import { define, WeElement } from 'omi'\nimport '../my-footer'\n\ndefine('my-content', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'html'\n ]\n\n install() {\n this.store.myContent = this\n }\n\n installed() {\n this.initCodeStyle()\n }\n\n afterUpdate() {\n this.initCodeStyle()\n }\n\n touchEnd = () => {\n this.store.hideSidebar()\n }\n\n initCodeStyle() {\n let codes = document.querySelectorAll('code')\n\n let codesArr = Array.prototype.slice.call(codes);\n let codeHlNumArr = []\n codesArr.forEach(code => {\n let arr = code.className.match(/{([\\S\\s]*)}/)\n let pre = code.parentNode\n //bug!\n arr && pre.setAttribute('data-line', arr[1])\n if (code.className) {\n pre.className = code.className\n\n const temp = code.className.match(/language-\\w*/g)[0]\n if (temp) {\n code.innerHTML = Prism.highlight(code.innerText, Prism.languages[temp.split('-')[1]], temp.split('-')[1])\n }\n } else {\n let pre = code.parentNode\n code.className = 'language-markup'\n pre.className = 'language-markup'\n code.innerHTML = Prism.highlight(code.innerText, Prism.languages.markup, 'markup')\n }\n // let hllNums = null\n // if (arr) {\n // let numArr = arr[0].replace(/[{|}]/g, '').split(',')\n // hllNums = this._arrToNumber(numArr)\n // }\n //codeHlNumArr.push(hllNums)\n })\n\n // codesArr.forEach((code, index) => {\n // let newP = document.createElement('div')\n // newP.className = '_code-ctn'\n // let pre = code.parentNode\n // let ctn = pre.parentNode\n // if (pre.nodeName === 'PRE') {\n // ctn.insertBefore(newP, pre)\n\n // let hl = document.createElement('div')\n // hl.className = '_hl'\n // newP.appendChild(hl)\n // newP.appendChild(pre)\n // let nums = codeHlNumArr[index]\n\n // let max = Math.max.apply(null, nums)\n\n // let inner = ''\n // for (let i = 0; i <= max; i++) {\n // if (nums.indexOf(i) == -1) {\n // inner += '
'\n // } else {\n // inner += '
'\n // }\n // }\n // hl.innerHTML = inner\n // }\n // })\n //fix line-highlight\n window.dispatchEvent(new Event('resize'));\n }\n\n _arrToNumber(numArr) {\n let arr = []\n numArr.forEach(item => {\n if (item.indexOf('-') !== -1) {\n const tempArr = item.split('-')\n const begin = Number(tempArr[0])\n const end = Number(tempArr[1])\n for (let i = begin; i < end + 1; i++) {\n arr.push(i)\n }\n } else {\n arr.push(Number(item))\n }\n })\n return arr\n }\n\n render() {\n return (\n
\n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-content/index.js","import { define, WeElement } from 'omi'\n\ndefine('my-footer', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position',\n 'menu'\n ]\n\n render() {\n const [\n position,\n menus\n ] = this.using\n const pre = this.store.getPre()\n const next = this.store.getNext()\n\n return (\n
\n {pre &&← {pre.name}}\n {next &&}\n
\n )\n }\n\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-footer/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-footer/_index.css\n// module id = 20\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".ft{\\n position: relative;\\n margin-top: 20px\\n}\\n\\n.pre{\\n position: absolute;\\n left:15px;\\n}\\n\\n.next{\\n position: absolute;\\n right: 15px;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-footer/_index.css\n// module id = 21\n// module chunks = 8 9","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-content/_index.css\n// module id = 22\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".content{\\n position: relative;\\n padding: 70px 30px;\\n max-width: 900px;\\n margin: 0 auto;\\n\\n}\\n\\n@media screen and (max-width: 1500px){\\n .content {\\n margin-left: 290px;\\n }\\n}\\n\\nh3{\\n color:#444444;\\n}\\n\\npre{\\n border: 1px solid #eee;\\n width: 100%;\\n}\\nli{\\n text-indent: 20px;\\n list-style:disc inside ;\\n}\\n\\n@media only screen and (max-width: 800px) {\\n .content{\\n margin-left: 0;\\n border-left: none;\\n padding: 70px 10px 70px 10px;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-content/_index.css\n// module id = 23\n// module chunks = 8 9","import { define, WeElement } from 'omi'\nimport '../my-list'\n\ndefine('my-sidebar', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'menus',\n 'sideBarShow',\n 'lan'\n ]\n\n render() {\n const [menus, sideBarShow, lan] = this.using\n\n return (\n
\n {menus[lan].map((menu, index) => (\n \n ))}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-sidebar/index.js","import { define, WeElement } from 'omi'\n\ndefine('my-list', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position'\n ]\n\n render(props) {\n const [position] = this.using\n\n return (\n
    \n
  • {props.menu.title}
  • \n {props.menu.list &&\n props.menu.list.map((item, subIndex) => {\n const cls = position[0] === props.index && position[1] === subIndex ? { class: 'current' } : null\n return
  • \n \n {item.name}\n \n
  • \n })}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-list/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-list/_index.css\n// module id = 26\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"li.title{\\n font-size: 14px;\\n font-weight: bold;\\n margin-bottom:10px;\\n margin-top:10px;\\n text-indent: 23px;\\n}\\nli{\\n margin-bottom:1px;\\n text-indent: 33px;\\n}\\nli a{\\n display:block;\\n font-size:14px;\\n height:30px;\\n line-height:30px;\\n color: black;\\n background-color:#eee;\\n}\\nli a.current,li a.current:hover{\\n background-color:#24292e;\\n color: white;\\n cursor: default;\\n}\\nli a:hover{\\n background-color:#f0f8ff;\\n}\\n\\n\\nul,li{\\n list-style:none;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-list/_index.css\n// module id = 27\n// module chunks = 8 9","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-sidebar/_index.css\n// module id = 28\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"@media only screen and (max-width: 800px) {\\n .list{\\n transform: translateX(-100%);\\n background-color:white;\\n left:0 !important;\\n -moz-transition: all .6s ease;\\n -o-transition: all .6s ease;\\n -webkit-transition: all .6s ease;\\n transition: all .6s ease;\\n width: 70% !important;\\n z-index: 100000;\\n border-right: none !important;\\n }\\n\\n .list.show {\\n -moz-transform: translateX(0%) translateZ(0);\\n -ms-transform: translateX(0%) translateZ(0);\\n -o-transform: translateX(0%) translateZ(0);\\n -webkit-transform: translateX(0%) translateZ(0);\\n transform: translateX(0%) translateZ(0);\\n }\\n}\\n\\n.list{\\n width: 261px;\\n text-indent: 20px;\\n border-right: 1px solid #eee;\\n overflow-x: hidden;\\n overflow-y: auto;\\n position:fixed;\\n top:60px;\\n background-color: white;\\n height: 100%;\\n border-right: 1px solid #ccc;\\n padding-bottom: 100px;\\n}\\n.version{\\n height:20px;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-sidebar/_index.css\n// module id = 29\n// module chunks = 8 9","import { define, WeElement } from 'omi'\nimport css from './_index.css'\n\ndefine('my-demo', class extends WeElement {\n install() {\n this.store.myDemo = this\n if(this.checkPc())\n this.show = true\n else\n this.show = false\n this.demo = this.store.demo\n }\n\n css() {\n return css\n }\n\n checkPc() {\n let userAgentInfo = navigator.userAgent\n let mp = [\"Android\", \"iPhone\", \"SymbianOS\", \"Windows Phone\", \"iPad\", \"iPod\"]\n for (let i = 0; i < mp.length; i++)\n if (userAgentInfo.indexOf(mp[i]) > 0)\n return false\n return true\n }\n\n onShow = () => {\n this.show = true\n this.update()\n }\n\n onClose = () => {\n this.show = false\n this.update()\n }\n \n render() {\n if(!this.demo) return\n return (\n
\n { this.show && }\n\n {!this.show &&
\n \n
}\n\n {this.show &&
\n \n
}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-demo/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/_index.css\n// module id = 31\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"iframe{\\n width: 750px;\\n height: 100%;\\n top: 60px;\\n right: 0;\\n position: fixed;\\n border: none;\\n z-index: 9999;\\n border-left: 2px solid #24292E;\\n}\\n\\n.switch{\\n width: 40px;\\n height: 40px;\\n background-color: #AA0000;\\n border-radius: 50%;\\n position: fixed;\\n right: 50px;\\n bottom: 50px;\\n cursor: pointer;\\n text-align: center;\\n z-index: 10000;\\n}\\n\\n.switch img{\\n width: 30px;\\n height: 30px;\\n margin-top:5px;\\n}\\n\\n.switch.close img{\\n margin-top:10px;\\n width: 20px;\\n height: 20px;\\n}\\n\\n\\n@media only screen and (max-width: 800px) {\\n iframe{\\n width: 100%;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-demo/_index.css\n// module id = 32\n// module chunks = 8 9","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/code.png\n// module id = 33\n// module chunks = 8 9","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/close.png\n// module id = 34\n// module chunks = 8 9","import config from '../docs/config.js'\nimport 'omi-router'\n\nclass Store {\n constructor(data) {\n this.data = {\n position: [-1, -1],\n menus: config.menus,\n lan: data.lan,\n html: '',\n sideBarShow: false\n }\n let id = 0\n this.map = {}\n this.positionMap = {}\n config.menus[this.data.lan].forEach((menu, index) => {\n menu.list.forEach((item, subIndex) => {\n item.id = id++\n item.position = [index, subIndex]\n this.map[item.id] = item\n item.index = index\n item.subIndex = subIndex\n this.positionMap[index+'-'+subIndex] = item\n })\n })\n this.preIndex = 0\n this.preSubIndex = 0\n }\n\n getNext(){\n const item = this.positionMap[this.data.position.join('-')]\n if(item){\n return this.map[item.id+1]\n }\n }\n\n getPre(){\n const item = this.positionMap[this.data.position.join('-')]\n if(item){\n return this.map[item.id-1]\n }\n }\n\n init() {\n this.remarkable = new Remarkable({ html: true })\n if (location.hash === \"\") {\n this.data.position = [0, 0]\n this.getMarkDown(this.data.menus[this.data.lan][0].list[0].md, this.data.lan, m => {\n this.data.html = this.remarkable.render(m)\n })\n }\n this.initRouter()\n }\n\n toogleSidebar() {\n this.data.sideBarShow = !this.data.sideBarShow\n }\n\n hideSidebar() {\n this.data.sideBarShow = false\n }\n\n initRouter() {\n const menus = this.data.menus[this.data.lan]\n menus.forEach(item => {\n item.list.forEach(subItem => {\n route('/' + subItem.md, evt => {\n menus[this.preIndex].list[this.preSubIndex].selected = false\n this.preIndex = evt.query.index\n this.preSubIndex = evt.query.subIndex\n this.data.position = [Number(evt.query.index), Number(evt.query.subIndex)]\n this.data.sideBarShow = false\n\n this.getMarkDown(subItem.md, this.data.lan, m => {\n this.data.html = this.remarkable.render(m)\n document.body.scrollTop = 0\n document.documentElement.scrollTop = 0\n })\n })\n })\n })\n }\n\n getMarkDown(name, lan, callback) {\n import('../docs/' + lan + '/' + name + '.md').then(m => {\n callback(m)\n })\n }\n}\n\nexport default Store\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/index.js","const config = {\n menus: {\n 'zh-cn': [\n {\n title: 'OMIU',\n list: [\n { name: '简介', md: 'introduction' }\n ]\n },\n {\n title: '基础组件',\n list: [\n { name: 'Button 按钮', md: 'button' },\n { name: 'Tabs 选项卡', md: 'tabs' },\n { name: 'Radio 单选框', md: 'radio' }\n ]\n }\n\n ],\n en: [\n {\n title: 'OMIU',\n list: [\n { name: 'Introduction', md: 'introduction' }\n ]\n },\n {\n title: 'Base',\n list: [\n { name: 'Button', md: 'button' },\n { name: 'Tabs', md: 'tabs' },\n { name: 'Radio', md: 'radio' }\n ]\n }\n ]\n }\n}\n\nexport default config\n\n\n\n// WEBPACK FOOTER //\n// ./src/docs/config.js","/*!\n * omi-router v2.1.0 by dntzhang\n * Router for Omi.\n * Github: https://github.com/Tencent/omi\n * MIT Licensed.\n */\n\nvar p2r = require('path-to-regexp')\nvar mapping = {}\nvar root = getGlobal()\n\nroot.route = route\nroot.route.params = null\nroot.historyLength = 0\n\nroot.route.to = function (path, data) {\n root.route._routeByTo = true\n root.route.data = data\n if (path[0] === '#') {\n location.hash = path\n } else {\n location.hash = '#' + path\n }\n}\n\nwindow.addEventListener('hashchange', change)\n\nfunction change(evt) {\n var byNative = false\n //need to fix a line by omi-link\n if(window.history.length === root.historyLength && !root.route._routeByTo){\n //keep alive mode\n byNative = true\n }\n root.route._routeByTo = false\n root.historyLength = window.history.length\n var prevent = false\n if (evt.type === 'hashchange' && root.route.before) {\n prevent = root.route.before(evt) === false\n }\n if (prevent) return\n var path = window.location.hash.replace('#', '')\n if(path === '') path = '/'\n var notFound = true\n Object.keys(mapping).every(function(key){\n var toArr = path.split('?')[0].match(mapping[key].reg)\n if (toArr) {\n var pathArr = key.match(mapping[key].reg)\n root.route.params = getParams(toArr, pathArr)\n root.route.query = getUrlParams(path)\n mapping[key].callback({\n params: root.route.params,\n query: getUrlParams(path),\n data: root.route.data,\n byNative: byNative\n })\n root.route.data = null\n notFound = false\n return false\n }\n return true\n })\n\n if (notFound) {\n mapping['*'] && mapping['*'].callback({ byNative: byNative })\n }\n\n if (evt.type === 'hashchange' && root.route.after) {\n root.route.after(evt)\n }\n}\n\ndocument.addEventListener('DOMContentLoaded', change)\n\nfunction getParams(toArr, pathArr) {\n var params = {}\n toArr.forEach(function (item, index) {\n if (index > 0) {\n params[pathArr[index].replace(':', '')] = item\n }\n })\n return params\n}\n\n\nexport default function route(path, callback) {\n mapping[path] = {\n callback: callback,\n reg: p2r(path)\n }\n}\n\nfunction getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function () {\n return this\n })()\n )\n }\n return global\n}\n\nfunction getUrlParams(url) {\n url = url.replace(/#.*$/, '')\n var queryArray = url.split(/[?&]/).slice(1)\n var i, args = {}\n for (i = 0; i < queryArray.length; i++) {\n var match = queryArray[i].match(/([^=]+)=([^=]+)/)\n if (match !== null) {\n args[match[1]] = decodeURIComponent(match[2])\n }\n }\n return args\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/omi-router/index.js","/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.match = match\nmodule.exports.regexpToFunction = regexpToFunction\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * Default configs.\n */\nvar DEFAULT_DELIMITER = '/'\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \":test(\\\\d+)?\" => [\"test\", \"\\d+\", undefined, \"?\"]\n // \"(\\\\d+)\" => [undefined, undefined, \"\\d+\", undefined]\n '(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = (options && options.delimiter) || DEFAULT_DELIMITER\n var whitelist = (options && options.whitelist) || undefined\n var pathEscaped = false\n var res\n\n while ((res = PATH_REGEXP.exec(str)) !== null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n pathEscaped = true\n continue\n }\n\n var prev = ''\n var name = res[2]\n var capture = res[3]\n var group = res[4]\n var modifier = res[5]\n\n if (!pathEscaped && path.length) {\n var k = path.length - 1\n var c = path[k]\n var matches = whitelist ? whitelist.indexOf(c) > -1 : true\n\n if (matches) {\n prev = c\n path = path.slice(0, k)\n }\n }\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n pathEscaped = false\n }\n\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var pattern = capture || group\n var delimiter = prev || defaultDelimiter\n\n tokens.push({\n name: name || key++,\n prefix: prev,\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n pattern: pattern\n ? escapeGroup(pattern)\n : '[^' + escapeString(delimiter === defaultDelimiter ? delimiter : (delimiter + defaultDelimiter)) + ']+?'\n })\n }\n\n // Push any remaining characters.\n if (path || index < str.length) {\n tokens.push(path + str.substr(index))\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Create path match function from `path-to-regexp` spec.\n */\nfunction match (str, options) {\n var keys = []\n var re = pathToRegexp(str, keys, options)\n return regexpToFunction(re, keys)\n}\n\n/**\n * Create a path match function from `path-to-regexp` output.\n */\nfunction regexpToFunction (re, keys) {\n return function (pathname, options) {\n var m = re.exec(pathname)\n if (!m) return false\n\n var path = m[0]\n var index = m.index\n var params = {}\n var decode = (options && options.decode) || decodeURIComponent\n\n for (var i = 1; i < m.length; i++) {\n if (m[i] === undefined) continue\n\n var key = keys[i - 1]\n\n if (key.repeat) {\n params[key.name] = m[i].split(key.delimiter).map(function (value) {\n return decode(value, key)\n })\n } else {\n params[key.name] = decode(m[i], key)\n }\n }\n\n return { path: path, index: index, params: params }\n }\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))\n }\n }\n\n return function (data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n var validate = options ? options.validate !== false : true\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$/()])/g, '\\\\$1')\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {Array=} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n if (!keys) return path\n\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n pattern: null\n })\n }\n }\n\n return path\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n return new RegExp('(?:' + parts.join('|') + ')', flags(options))\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n options = options || {}\n\n var strict = options.strict\n var start = options.start !== false\n var end = options.end !== false\n var delimiter = options.delimiter || DEFAULT_DELIMITER\n var endsWith = [].concat(options.endsWith || []).map(escapeString).concat('$').join('|')\n var route = start ? '^' : ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var capture = token.repeat\n ? '(?:' + token.pattern + ')(?:' + escapeString(token.delimiter) + '(?:' + token.pattern + '))*'\n : token.pattern\n\n if (keys) keys.push(token)\n\n if (token.optional) {\n if (!token.prefix) {\n route += '(' + capture + ')?'\n } else {\n route += '(?:' + escapeString(token.prefix) + '(' + capture + '))?'\n }\n } else {\n route += escapeString(token.prefix) + '(' + capture + ')'\n }\n }\n }\n\n if (end) {\n if (!strict) route += '(?:' + escapeString(delimiter) + ')?'\n\n route += endsWith === '$' ? '$' : '(?=' + endsWith + ')'\n } else {\n var endToken = tokens[tokens.length - 1]\n var isEndDelimited = typeof endToken === 'string'\n ? endToken[endToken.length - 1] === delimiter\n : endToken === undefined\n\n if (!strict) route += '(?:' + escapeString(delimiter) + '(?=' + endsWith + '))?'\n if (!isEndDelimited) route += '(?=' + escapeString(delimiter) + '|' + endsWith + ')'\n }\n\n return new RegExp(route, flags(options))\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (path instanceof RegExp) {\n return regexpToRegexp(path, keys)\n }\n\n if (Array.isArray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), keys, options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), keys, options)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/path-to-regexp/index.js","var map = {\n\t\"./en/button.md\": [\n\t\t40,\n\t\t7\n\t],\n\t\"./en/introduction.md\": [\n\t\t41,\n\t\t6\n\t],\n\t\"./en/radio.md\": [\n\t\t42,\n\t\t5\n\t],\n\t\"./en/tabs.md\": [\n\t\t43,\n\t\t4\n\t],\n\t\"./zh-cn/button.md\": [\n\t\t44,\n\t\t3\n\t],\n\t\"./zh-cn/introduction.md\": [\n\t\t45,\n\t\t2\n\t],\n\t\"./zh-cn/radio.md\": [\n\t\t46,\n\t\t1\n\t],\n\t\"./zh-cn/tabs.md\": [\n\t\t47,\n\t\t0\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tvar ids = map[req];\n\tif(!ids)\n\t\treturn Promise.reject(new Error(\"Cannot find module '\" + req + \"'.\"));\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__(ids[0]);\n\t});\n};\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 39;\nmodule.exports = webpackAsyncContext;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs lazy ^\\.\\/.*\\.md$\n// module id = 39\n// module chunks = 8 9","import { render } from 'omi'\nimport './assets/index.css'\nimport './elements/my-frame.js'\nimport Store from './store'\n\nrender(, '#root', new Store({ lan: 'zh-cn' }))\n\n\n\n// WEBPACK FOOTER //\n// ./src/cn.js"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/index.00ca5bbb.js b/components/docs/static/js/index.00ca5bbb.js deleted file mode 100644 index 8e5eddfe5..000000000 --- a/components/docs/static/js/index.00ca5bbb.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,r,i){for(var a,s,u=0,c=[];u2;)Ie.push(arguments[a]);for(t&&null!=t.children&&(Ie.length||Ie.push(t.children),delete t.children);Ie.length;)if((r=Ie.pop())&&void 0!==r.pop)for(a=r.length;a--;)Ie.push(r[a]);else"boolean"===typeof r&&(r=null),(i="function"!==typeof e)&&(null==r?r="":"number"===typeof r?r=String(r):"string"!==typeof r&&(i=!1)),i&&n?s[s.length-1]+=r:0===s.length?s=[r]:s.push(r),n=i;var u=new o;return u.nodeName=e,u.children=s,u.attributes=null==t?void 0:t,u.key=null==t?void 0:t.key,void 0!==Ue.vnode&&Ue.vnode(u),u}function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function s(e,t){for(var n,r,o=a(e),i=1;i2?[].slice.call(arguments,2):e.children)}function b(e){1==Qe.push(e)&&(Ue.debounceRendering||Ge)(v)}function v(){for(var e;e=Qe.pop();)X(e)}function g(e,t,n){if("string"===typeof t||"number"===typeof t)return void 0!==e.splitText;if("string"===typeof t.nodeName){var r=qe[t.nodeName];return r?n||e._componentConstructor===r:!e._componentConstructor&&_(e,t.nodeName)}return n||e._componentConstructor===t.nodeName}function _(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function w(e){var t=u({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function A(e,t){var n=t?Ue.doc.createElementNS("http://www.w3.org/2000/svg",e):Ue.doc.createElement(e);return n.normalizedNodeName=e,n}function x(e){for(var t=e.replace(/\/\*(.|\s)*?\*\//g," ").replace(/\s+/g," "),n={},r=t.match(/ ?(.*?) ?{([^}]*)}/)||[o,i,t],o=r[0],i=r[1],a=r[2],s=a.split(";").map(function(e){return e.split(":").map(function(e){return e&&e.trim()})}),u=s,u=Array.isArray(u),u=0,u=u||u[Symbol.iterator]();;){var c;if(u){if(u>=u.length)break;c=u[u++]}else{if(u=u.next(),u.done)break;c=u.value}var l=c,f=l[0],p=l[1];n[function(e){return e.replace(/\W+\w/g,function(e){return e.slice(-1).toUpperCase()})}(f)]=p}return n}function O(e){var t=e.parentNode;t&&t.removeChild(e)}function E(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)c(n,null),c(r,e);else if("class"!==t||o)if("style"===t)if(Ue.isWeb){if(r&&"string"!==typeof r&&"string"!==typeof n||(e.style.cssText=r||""),r&&"object"===("undefined"===typeof r?"undefined":Be(r))){if("string"!==typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"===typeof r[i]&&!1===We.test(i)?r[i]+"px":r[i]}}else{var a=n,s=r;"string"===typeof n&&(a=x(n)),"string"==typeof r&&(s=x(r));var u={},l=!1;if(a){for(var f in a)"object"!=("undefined"===typeof s?"undefined":Be(s))||f in s||(u[f]="",l=!0);for(var p in s)s[p]!==a[p]&&(u[p]=s[p],l=!0);l&&e.setStyles(u)}else e.setStyles(s)}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var d=t!==(t=t.replace(/Capture$/,"")),h=t.toLowerCase();t=(h in e?h:t).slice(2),r?n||(e.addEventListener(t,j,d),"tap"==t&&(e.addEventListener("touchstart",T,d),e.addEventListener("touchend",k,d))):(e.removeEventListener(t,j,d),"tap"==t&&(e.removeEventListener("touchstart",T,d),e.removeEventListener("touchend",k,d))),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)S(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var y=o&&t!==(t=t.replace(/^xlink:?/,""));null==r||!1===r?y?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!==typeof r&&(y?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function S(e,t,n){try{e[t]=n}catch(e){}}function j(e){return this._listeners[e.type](Ue.event&&Ue.event(e)||e)}function T(e){this.___touchX=e.touches[0].pageX,this.___touchY=e.touches[0].pageY,this.___scrollTop=document.body.scrollTop}function k(e){Math.abs(e.changedTouches[0].pageX-this.___touchX)<30&&Math.abs(e.changedTouches[0].pageY-this.___touchY)<30&&Math.abs(document.body.scrollTop-this.___scrollTop)<30&&this.dispatchEvent(new CustomEvent("tap",{detail:e}))}function C(e){for(var t=0,n=Ue.styleCache.length;t-1;)if(t===e[n])return!0;return!1}function ce(e,t){return"#"===t?e:t.split("-")[1]}function le(e,t,n,r,o){if(t="string"===typeof t?document.querySelector(t):t,n)if(n.data)fe(n);else{Ue.isMultiStore=!0;for(var i in n)n[i].data&&fe(n[i],i)}if(r)for(;t.firstChild;)t.removeChild(t.firstChild);return o&&(o="string"===typeof o?document.querySelector(o):o),$(o,e,n,!1,t,!1)}function fe(e,t){e.instances=[],e.updateSelfInstances=[],de(e,t),K(e.data,function(t,n,r,o){var i={};i[be(o+"-"+t)]=!0,e.update(i)})}function pe(e,t,n){return fe(n),t="string"===typeof t?document.querySelector(t):t,$(t,e,n)}function de(e,t){e.update=function(n){Object.keys(n).length>0&&(this.instances.forEach(function(r){he(r,t),t?r._updatePath&&r._updatePath[t]&&ye(n,r._updatePath[t])&&(r.use&&f(e.data,("function"===typeof r.use?r.use():r.use)[t],r.using,t),r.update()):r._updatePath&&ye(n,r._updatePath)&&(r.use&&(r.using=f(e.data,"function"===typeof r.use?r.use():r.use)),r.update())}),this.updateSelfInstances.forEach(function(r){he(r,t),t?r._updateSelfPath&&r._updateSelfPath[t]&&ye(n,r._updateSelfPath[t])&&(r.useSelf&&f(e.data,("function"===typeof r.useSelf?r.useSelf():r.useSelf)[t],r.usingSelf,t),r.updateSelf()):r._updateSelfPath&&ye(n,r._updateSelfPath)&&(r.usingSelf=f(e.data,"function"===typeof r.useSelf?r.useSelf():r.useSelf),r.updateSelf())}),this.onChange&&this.onChange(n))}}function he(e,t){if(e.compute)for(var n in e.compute)e.computed[n]=e.compute[n].call(t?e.store:e.store.data)}function ye(e,t){for(var n in e){if(t[n])return!0;for(var r in t)if(me(n,r))return!0}return!1}function me(e,t){if(0===e.indexOf(t)){var n=e.substr(t.length,1);if("["===n||"."===n)return!0}return!1}function be(e){var t="";return e.replace("#-","").split("-").forEach(function(e,n){n?isNaN(Number(e))?t+="."+e:t+="["+e+"]":t+=e}),t}function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":Be(t))&&"function"!==typeof t?e:t}function _e(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":Be(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function we(e,t,n){if("WeElement"===t.is)Ue.mapping[e]=t;else{n="string"===typeof n?{css:n}:n||{};var r=function(e){function r(){var t,o,i;ve(this,r);for(var a=arguments.length,s=Array(a),u=0;u0)return{class:Oe.apply(null,n)}}function Se(e){var t=e.base;if(t)for(;t.parentNode;){if(t.parentNode._component)return t.parentNode._component;t=t.parentNode}}function je(e){var t="";for(var n in e){var r=e[n];null!=r&&(t&&(t+=" "),t+=pt[n]||(pt[n]=n.replace(/([A-Z])/g,"-$1").toLowerCase()),t+=": ",t+=r,"number"===typeof r&&!1===IS_NON_DIMENSIONAL.test(n)&&(t+="px"),t+=";")}return t||void 0}function Te(e,t,n,r){n=n||{},t=Object.assign({scopedCSS:!0},t);var o={},i=ke(e,t,n,r,o);return{css:Object.values(o),html:i}}function ke(e,t,n,r,o){if(null==e||"boolean"===typeof e)return"";var i=e.nodeName,a=e.attributes,s=!1,u=t.pretty,c=u&&"string"===typeof u?u:"\t";if("object"!==("undefined"===typeof e?"undefined":Be(e))&&!i)return st(e);var l=ct[i];if(l){s=!0;var f,p=Pe(e),d=new l(p,n);if(d._disable=d.__x=!0,d.props=p,d.store=n,d.install&&d.install(),d.beforeRender&&d.beforeRender(),f=d.render(d.props,d.store),t.scopedCSS){if(d.constructor.css||d.css){var h=d.constructor.css?d.constructor.css:"function"===typeof d.css?d.css():d.css,y="_s"+C(d.constructor);o[y]={id:y,css:P(h,y)},M(f,y)}d.scopedCSSAttr=e.css,I(f,d.scopedCSSAttr)}return ke(f,t,n,!1,o)}var m,b="";if(a){var v=Object.keys(a);t&&!0===t.sortAttributes&&v.sort();for(var g=0;g]/)&&(t&&t.allAttributes||"key"!==_&&"ref"!==_))){if("className"===_){if(a.class)continue;_="class"}else r&&_.match(/^xlink:?./)&&(_=_.toLowerCase().replace(/^xlink:?/,"xlink:"));"style"===_&&w&&"object"===("undefined"===typeof w?"undefined":Be(w))&&(w=je(w));var A=t.attributeHook&&t.attributeHook(_,w,n,t,s);if(A||""===A)b+=A;else if("dangerouslySetInnerHTML"===_)m=w&&w.__html;else if((w||0===w||""===w)&&"function"!==typeof w){if((!0===w||""===w)&&(w=_,!t||!t.xml)){b+=" "+_;continue}b+=" "+_+'="'+st(w)+'"'}}}}if(u){var x=b.replace(/^\n\s*/," ");x===b||~x.indexOf("\n")?u&&~b.indexOf("\n")&&(b+="\n"):b=x}if(b="<"+i+b+">",String(i).match(/[\s\n\\\/='"\0<>]/))throw b;var O=String(i).match(lt);O&&(b=b.replace(/>$/," />"));var E=[];if(m)u&&ft(m)&&(m="\n"+c+ut(m,c)),b+=m;else if(e.children){for(var S=u&&~b.indexOf("\n"),g=0;g";return O||(u&&~b.indexOf("\n")&&(b+="\n"),b+=""),b}function Ce(e,t){for(var n in t)e[n]=t[n];return e}function Pe(e){var t=Ce({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function Ne(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.obaa=t.html=t.merge=t.tag=t.renderToString=t.getHost=t.extractClass=t.classNames=t.defineElement=t.rpx=t.define=t.WeElement=t.options=t.rerender=t.render=t.Component=t.createRef=t.cloneElement=t.createElement=t.h=t.htm=void 0;var Be="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me=n(10);Object.defineProperty(t,"htm",{enumerable:!0,get:function(){return r(Me).default}});var Re=r(Me),Ue={scopedStyle:!0,mapping:{},isWeb:!0,staticStyleMapping:{},doc:"object"===("undefined"===typeof document?"undefined":Be(document))?document:null,root:function(){return"object"===("undefined"===typeof e?"undefined":Be(e))&&e&&e.Math===Math&&e.Array===Array?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof e?e:function(){return this}()}(),styleCache:[],isMultiStore:!1},Ie=[],Le=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable;if("undefined"!==typeof Element&&!Element.prototype.addEventListener){var Fe=function(e){e||(e=window.event);for(var t=0,n=0,r=ze[e.type];n8&&(He=!0)}var Ge=He?Promise.resolve().then.bind(Promise.resolve()):setTimeout,We=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Qe=[],qe=Ue.mapping,Xe=0,Ze=[],Je=0,Ye=!1,Ke=!1,et={},tt=0,nt=function(){function e(t,n){Y(this,e),this.props=s({},this.constructor.defaultProps,t),this.elementId=tt++,this._preCss=null,this.store=n,this.computed={}}return e.prototype.update=function(e,t,n){this._willUpdate||(this._willUpdate=!0,n&&(this._renderCallbacks=this._renderCallbacks||[]).push(n),X(this,2),Ue.componentChange&&Ue.componentChange(this,this.base),this._willUpdate=!1)},e.prototype.updateSelf=function(){this._willUpdateSelf||(this._willUpdateSelf=!0,X(this,2,null,null,!0),this._willUpdateSelf=!1)},e.prototype.fire=function(e,t){var n=this;Object.keys(this.props).every(function(r){return"on"+e.toLowerCase()!==r.toLowerCase()||(n.props[r]({detail:t}),!1)})},e.prototype.render=function(){},e}();nt.is="WeElement";var rt=["concat","copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift","size"].join(","),ot=["concat","copyWithin","entries","every","fill","filter","find","findIndex","forEach","includes","indexOf","join","keys","lastIndexOf","map","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","toLocaleString","toString","unshift","values","size"];K.add=function(e,t){te(e,t,e.$_o_.$_p_,e.$_o_.$_r_)},K.set=function(e,t,n){void 0===e[t]&&te(e,t,e.$_o_.$_p_,e.$_o_.$_r_),e[t]=n},Array.prototype.size=function(e){this.length=e};var it=["use","useSelf"],at={}.hasOwnProperty,st=function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},ut=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"\t"))},ct=Ue.mapping,lt=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,ft=function(e,t,n){return String(e).length>(t||40)||!n&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},pt={};i.f=y;var dt=Re.default.bind(i),ht=nt,yt=we;Ue.root.Omi={h:i,createElement:i,cloneElement:m,createRef:Ne,Component:nt,render:le,rerender:v,options:Ue,WeElement:ht,define:we,rpx:Ae,defineElement:yt,classNames:Oe,extractClass:Ee,getHost:Se,renderToString:Te,tag:xe,merge:pe,html:dt,htm:Re.default,obaa:K},Ue.root.omi=Ue.root.Omi,Ue.root.Omi.version="omio-2.8.0";var mt={h:i,createElement:i,cloneElement:m,createRef:Ne,Component:nt,render:le,rerender:v,options:Ue,WeElement:ht,define:we,rpx:Ae,defineElement:yt,classNames:Oe,extractClass:Ee,getHost:Se,renderToString:Te,tag:xe,merge:pe,html:dt,htm:Re.default,obaa:K};t.default=mt,t.h=i,t.createElement=i,t.cloneElement=m,t.createRef=Ne,t.Component=nt,t.render=le,t.rerender=v,t.options=Ue,t.WeElement=ht,t.define=we,t.rpx=Ae,t.defineElement=yt,t.classNames=Oe,t.extractClass=Ee,t.getHost=Se,t.renderToString=Te,t.tag=xe,t.merge=pe,t.html=dt,t.obaa=K}).call(t,n(2))},function(e,t,n){"use strict";function r(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"===typeof btoa){var i=o(r);return[n].concat(r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function o(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"===typeof e&&(e=[[null,e,""]]);for(var r={},o=0;oc){for(var t=0,n=a.length-u;t-1?t:e}function d(e,t){t=t||{};var n=t.body;if(e instanceof d){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function y(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function m(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var b={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(b.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=function(e){return e&&DataView.prototype.isPrototypeOf(e)},_=ArrayBuffer.isView||function(e){return e&&v.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},b.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},f.call(d.prototype),f.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];m.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=d,e.Response=m,e.fetch=function(e,t){return new Promise(function(n,r){var o=new d(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new m(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&b.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:void 0)},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;c1?t:t[0]};var r=function e(t,n,r,o){for(var i=1;i=5&&((o||!e&&5===r)&&(a.push(o,r,n),r=6),e&&(a.push(e,r,n),r=6)),o=""},u=0;u"===t?(r=1,o=""):o=t+o[0]:i?t===i?i="":o+=t:'"'===t||"'"===t?i=t:">"===t?(s(),r=1):r&&("="===t?(r=5,n=o,o=""):"/"===t&&(r<5||">"===e[u][c+1])?(s(),3===r&&(a=a[0]),r=a,(a=a[0]).push(r,2),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),r=2):o+=t),3===r&&"!--"===o&&(r=4,a=a[0])}return s(),a},i="function"==typeof Map,a=i?new Map:{},s=i?function(e){var t=a.get(e);return t||a.set(e,t=o(e)),t}:function(e){for(var t="",n=0;n0)return!1;return!0}},{key:"render",value:function(){if(this.demo)return Omi.h("div",null,this.show&&Omi.h("iframe",{style:"height:"+(window.innerHeight-59)+"px",src:this.demo}),!this.show&&Omi.h("div",{class:"switch code",onClick:this.onShow},Omi.h("img",{src:n(33)})),this.show&&Omi.h("div",{class:"switch close",onClick:this.onClose},Omi.h("img",{src:n(34)})))}}]),t}(s.WeElement))},function(e,t,n){var r=n(32);e.exports="string"===typeof r?r:r.toString()},function(e,t,n){t=e.exports=n(1)(void 0),t.push([e.i,"iframe{\n width: 750px;\n height: 100%;\n top: 60px;\n right: 0;\n position: fixed;\n border: none;\n z-index: 9999;\n border-left: 2px solid #24292E;\n}\n\n.switch{\n width: 40px;\n height: 40px;\n background-color: #AA0000;\n border-radius: 50%;\n position: fixed;\n right: 50px;\n bottom: 50px;\n cursor: pointer;\n text-align: center;\n z-index: 10000;\n}\n\n.switch img{\n width: 30px;\n height: 30px;\n margin-top:5px;\n}\n\n.switch.close img{\n margin-top:10px;\n width: 20px;\n height: 20px;\n}\n\n\n@media only screen and (max-width: 800px) {\n iframe{\n width: 100%;\n }\n}\n",""])},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0&&(n[t[r].replace(":","")]=e)}),n}function i(e,t){c[e]={callback:t,reg:u(e)}}function a(e){e=e.replace(/#.*$/,"");var t,n=e.split(/[?&]/).slice(1),r={};for(t=0;t-1)&&(y=x,a=a.slice(0,A))}a&&(r.push(a),a="",f=!1);var O="+"===w||"*"===w,E="?"===w||"*"===w,S=g||_,j=y||s;r.push({name:m||o++,prefix:y,delimiter:j,optional:E,repeat:O,pattern:S?c(S):"[^"+u(j===s?j:j+s)+"]+?"})}}return(a||iHello!`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */function h(nodeName,attributes){var children=[],lastSimple,child,simple,i;for(i=arguments.length;i-->2;){stack.push(arguments[i]);}if(attributes&&attributes.children!=null){if(!stack.length)stack.push(attributes.children);delete attributes.children;}while(stack.length){if((child=stack.pop())&&child.pop!==undefined){for(i=child.length;i--;){stack.push(child[i]);}}else{if(typeof child==='boolean')child=null;if(simple=typeof nodeName!=='function'){if(child==null)child='';else if(typeof child==='number')child=String(child);else if(typeof child!=='string')simple=false;}if(simple&&lastSimple){children[children.length-1]+=child;}else if(children.length===0){children=[child];}else{children.push(child);}lastSimple=simple;}}var p=new VNode();p.nodeName=nodeName;p.children=children;p.attributes=attributes==null?undefined:attributes;p.key=attributes==null?undefined:attributes.key;// if a \"vnode hook\" is defined, pass every created VNode to it\nif(options.vnode!==undefined)options.vnode(p);return p;}/* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError('Object.assign cannot be called with null or undefined');}return Object(val);}function assign(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s8){usePromise=true;}}}var defer=usePromise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function isArray(obj){return Object.prototype.toString.call(obj)==='[object Array]';}function getUse(data,paths,out,name){var obj=[];paths.forEach(function(path,index){var isPath=typeof path==='string';if(isPath){obj[index]=getTargetByPath(data,path);}else{var key=Object.keys(path)[0];var value=path[key];if(typeof value==='string'){obj[index]=getTargetByPath(data,value);}else{var tempPath=value[0];if(typeof tempPath==='string'){var tempVal=getTargetByPath(data,tempPath);obj[index]=value[1]?value[1](tempVal):tempVal;}else{var args=[];tempPath.forEach(function(path){args.push(getTargetByPath(data,path));});obj[index]=value[1].apply(null,args);}}obj[key]=obj[index];}});out&&(out[name]=obj);return obj;}function getTargetByPath(origin,path){var arr=path.replace(/]/g,'').replace(/\\[/g,'.').split('.');var current=origin;for(var i=0,len=arr.length;i2?[].slice.call(arguments,2):vnode.children);}// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL$1=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;/** Managed queue of dirty components to be re-rendered */var items=[];function enqueueRender(component){if(items.push(component)==1){(options.debounceRendering||defer)(rerender);}}/** Rerender all enqueued dirty components */function rerender(){var p;while(p=items.pop()){renderComponent(p);}}var mapping=options.mapping;/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */function isSameNodeType(node,vnode,hydrating){if(typeof vnode==='string'||typeof vnode==='number'){return node.splitText!==undefined;}if(typeof vnode.nodeName==='string'){var ctor=mapping[vnode.nodeName];if(ctor){return hydrating||node._componentConstructor===ctor;}return!node._componentConstructor&&isNamedNode(node,vnode.nodeName);}return hydrating||node._componentConstructor===vnode.nodeName;}/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */function isNamedNode(node,nodeName){return node.normalizedNodeName===nodeName||node.nodeName.toLowerCase()===nodeName.toLowerCase();}/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */function getNodeProps(vnode){var props=extend({},vnode.attributes);props.children=vnode.children;var defaultProps=vnode.nodeName.defaultProps;if(defaultProps!==undefined){for(var i in defaultProps){if(props[i]===undefined){props[i]=defaultProps[i];}}}return props;}/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */function createNode(nodeName,isSvg){var node=isSvg?options.doc.createElementNS('http://www.w3.org/2000/svg',nodeName):options.doc.createElement(nodeName);node.normalizedNodeName=nodeName;return node;}function parseCSSText(cssText){var cssTxt=cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g,' ').replace(/\\s+/g,' ');var style={},_ref=cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt],a=_ref[0],b=_ref[1],rule=_ref[2];var cssToJs=function cssToJs(s){return s.replace(/\\W+\\w/g,function(match){return match.slice(-1).toUpperCase();});};var properties=rule.split(';').map(function(o){return o.split(':').map(function(x){return x&&x.trim();});});for(var i=properties,i=Array.isArray(i),i=0,i=i?i:i[Symbol.iterator]();;){var _ref3;if(i){if(i>=i.length)break;_ref3=i[i++];}else{i=i.next();if(i.done)break;_ref3=i.value;}var _ref2=_ref3;var property=_ref2[0];var value=_ref2[1];style[cssToJs(property)]=value;}return style;}/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */function removeNode(node){var parentNode=node.parentNode;if(parentNode)parentNode.removeChild(node);}/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */function setAccessor(node,name,old,value,isSvg){if(name==='className')name='class';if(name==='key'){// ignore\n}else if(name==='ref'){applyRef(old,null);applyRef(value,node);}else if(name==='class'&&!isSvg){node.className=value||'';}else if(name==='style'){if(options.isWeb){if(!value||typeof value==='string'||typeof old==='string'){node.style.cssText=value||'';}if(value&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'){if(typeof old!=='string'){for(var i in old){if(!(i in value))node.style[i]='';}}for(var i in value){node.style[i]=typeof value[i]==='number'&&IS_NON_DIMENSIONAL$1.test(i)===false?value[i]+'px':value[i];}}}else{var oldJson=old,currentJson=value;if(typeof old==='string'){oldJson=parseCSSText(old);}if(typeof value=='string'){currentJson=parseCSSText(value);}var result={},changed=false;if(oldJson){for(var key in oldJson){if((typeof currentJson==='undefined'?'undefined':_typeof(currentJson))=='object'&&!(key in currentJson)){result[key]='';changed=true;}}for(var ckey in currentJson){if(currentJson[ckey]!==oldJson[ckey]){result[ckey]=currentJson[ckey];changed=true;}}if(changed){node.setStyles(result);}}else{node.setStyles(currentJson);}}}else if(name==='dangerouslySetInnerHTML'){if(value)node.innerHTML=value.__html||'';}else if(name[0]=='o'&&name[1]=='n'){var useCapture=name!==(name=name.replace(/Capture$/,''));var nameLower=name.toLowerCase();name=(nameLower in node?nameLower:name).slice(2);if(value){if(!old){node.addEventListener(name,eventProxy,useCapture);if(name=='tap'){node.addEventListener('touchstart',touchStart,useCapture);node.addEventListener('touchend',touchEnd,useCapture);}}}else{node.removeEventListener(name,eventProxy,useCapture);if(name=='tap'){node.removeEventListener('touchstart',touchStart,useCapture);node.removeEventListener('touchend',touchEnd,useCapture);}}(node._listeners||(node._listeners={}))[name]=value;}else if(name!=='list'&&name!=='type'&&!isSvg&&name in node){setProperty(node,name,value==null?'':value);if(value==null||value===false)node.removeAttribute(name);}else{var ns=isSvg&&name!==(name=name.replace(/^xlink:?/,''));if(value==null||value===false){if(ns)node.removeAttributeNS('http://www.w3.org/1999/xlink',name.toLowerCase());else node.removeAttribute(name);}else if(typeof value!=='function'){if(ns)node.setAttributeNS('http://www.w3.org/1999/xlink',name.toLowerCase(),value);else node.setAttribute(name,value);}}}/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */function setProperty(node,name,value){try{node[name]=value;}catch(e){}}/** Proxy an event to hooked event handlers\n *\t@private\n */function eventProxy(e){return this._listeners[e.type](options.event&&options.event(e)||e);}function touchStart(e){this.___touchX=e.touches[0].pageX;this.___touchY=e.touches[0].pageY;this.___scrollTop=document.body.scrollTop;}function touchEnd(e){if(Math.abs(e.changedTouches[0].pageX-this.___touchX)<30&&Math.abs(e.changedTouches[0].pageY-this.___touchY)<30&&Math.abs(document.body.scrollTop-this.___scrollTop)<30){this.dispatchEvent(new CustomEvent('tap',{detail:e}));}}var styleId=0;function getCtorName(ctor){for(var i=0,len=options.styleCache.length;i-1;){if(item===arr[i])return true;}return false;}function getRootName(prop,path){if(path==='#'){return prop;}return path.split('-')[1];}obaa.add=function(obj,prop){watch(obj,prop,obj.$_o_.$_p_,obj.$_o_.$_r_);};obaa.set=function(obj,prop,value){if(obj[prop]===undefined){watch(obj,prop,obj.$_o_.$_p_,obj.$_o_.$_r_);}obj[prop]=value;};Array.prototype.size=function(length){this.length=length;};/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {object} [store]\n *\t@public\n */function render(vnode,parent,store,empty,merge){parent=typeof parent==='string'?document.querySelector(parent):parent;if(store){if(store.data){obsStore(store);}else{options.isMultiStore=true;for(var key in store){if(store[key].data){obsStore(store[key],key);}}}}if(empty){while(parent.firstChild){parent.removeChild(parent.firstChild);}}if(merge){merge=typeof merge==='string'?document.querySelector(merge):merge;}return diff(merge,vnode,store,false,parent,false);}function obsStore(store,storeName){store.instances=[];store.updateSelfInstances=[];extendStoreUpate(store,storeName);obaa(store.data,function(prop,val,old,path){var patchs={};var key=fixPath(path+'-'+prop);patchs[key]=true;store.update(patchs);});}function merge(vnode,merge,store){obsStore(store);merge=typeof merge==='string'?document.querySelector(merge):merge;return diff(merge,vnode,store);}function extendStoreUpate(store,key){store.update=function(patch){if(Object.keys(patch).length>0){this.instances.forEach(function(instance){compute(instance,key);if(key){if(instance._updatePath&&instance._updatePath[key]&&needUpdate(patch,instance._updatePath[key])){if(instance.use){getUse(store.data,(typeof instance.use==='function'?instance.use():instance.use)[key],instance.using,key);}instance.update();}}else{if(instance._updatePath&&needUpdate(patch,instance._updatePath)){if(instance.use){instance.using=getUse(store.data,typeof instance.use==='function'?instance.use():instance.use);}instance.update();}}});this.updateSelfInstances.forEach(function(instance){compute(instance,key);if(key){if(instance._updateSelfPath&&instance._updateSelfPath[key]&&needUpdate(patch,instance._updateSelfPath[key])){if(instance.useSelf){getUse(store.data,(typeof instance.useSelf==='function'?instance.useSelf():instance.useSelf)[key],instance.usingSelf,key);}instance.updateSelf();}}else{if(instance._updateSelfPath&&needUpdate(patch,instance._updateSelfPath)){instance.usingSelf=getUse(store.data,typeof instance.useSelf==='function'?instance.useSelf():instance.useSelf);instance.updateSelf();}}});this.onChange&&this.onChange(patch);}};}function compute(instance,isMultiStore){if(instance.compute){for(var ck in instance.compute){instance.computed[ck]=instance.compute[ck].call(isMultiStore?instance.store:instance.store.data);}}}function needUpdate(diffResult,updatePath){for(var keyA in diffResult){if(updatePath[keyA]){return true;}for(var keyB in updatePath){if(includePath(keyA,keyB)){return true;}}}return false;}function includePath(pathA,pathB){if(pathA.indexOf(pathB)===0){var next=pathA.substr(pathB.length,1);if(next==='['||next==='.'){return true;}}return false;}function fixPath(path){var mpPath='';var arr=path.replace('#-','').split('-');arr.forEach(function(item,index){if(index){if(isNaN(Number(item))){mpPath+='.'+item;}else{mpPath+='['+item+']';}}else{mpPath+=item;}});return mpPath;}function _classCallCheck$1(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");}return call&&((typeof call==='undefined'?'undefined':_typeof(call))===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+(typeof superClass==='undefined'?'undefined':_typeof(superClass)));}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var storeHelpers=['use','useSelf'];function define(name,ctor,config){if(ctor.is==='WeElement'){options.mapping[name]=ctor;}else{if(typeof config==='string'){config={css:config};}else{config=config||{};}var Comp=function(_Component){_inherits(Comp,_Component);function Comp(){var _temp,_this,_ret;_classCallCheck$1(this,Comp);for(var _len=arguments.length,args=Array(_len),key=0;key<_len;key++){args[key]=arguments[key];}return _ret=(_temp=(_this=_possibleConstructorReturn(this,_Component.call.apply(_Component,[this].concat(args))),_this),_this.compute=config.compute,_temp),_possibleConstructorReturn(_this,_ret);}Comp.prototype.render=function render(){return ctor.call(this,this);};return Comp;}(Component);Comp.css=config.css;Comp.propTypes=config.propTypes;Comp.defaultProps=config.defaultProps;var _loop=function _loop(key){if(typeof config[key]==='function'){Comp.prototype[key]=function(){return config[key].apply(this,arguments);};}};for(var key in config){_loop(key);}storeHelpers.forEach(function(func){if(config[func]&&config[func]!=='function'){Comp.prototype[func]=function(){return config[func];};}});options.mapping[name]=Comp;}}function rpx(str){return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g,function(a,b){return window.innerWidth*Number(b)/750+'px';});}function tag(name){return function(target){define(name,target);};}/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */var hasOwn={}.hasOwnProperty;function classNames(){var classes=[];for(var i=0;i0){return{'class':classNames.apply(null,args)};}}function getHost(component){var base=component.base;if(base){while(base.parentNode){if(base.parentNode._component){return base.parentNode._component;}else{base=base.parentNode;}}}}/**\n * preact-render-to-string based on preact-render-to-string\n * by Jason Miller\n * Licensed under the MIT License\n * https://github.com/developit/preact-render-to-string\n *\n * modified by dntzhang\n */var encodeEntities=function encodeEntities(s){return String(s).replace(/&/g,'&').replace(//g,'>').replace(/\"/g,'"');};var indent=function indent(s,char){return String(s).replace(/(\\n+)/g,'$1'+(char||'\\t'));};var mapping$1=options.mapping;var VOID_ELEMENTS=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;var isLargeString=function isLargeString(s,length,ignoreLines){return String(s).length>(length||40)||!ignoreLines&&String(s).indexOf('\\n')!==-1||String(s).indexOf('<')!==-1;};var JS_TO_CSS={};// Convert an Object style to a CSSText string\nfunction styleObjToCss(s){var str='';for(var prop in s){var val=s[prop];if(val!=null){if(str)str+=' ';// str += jsToCss(prop);\nstr+=JS_TO_CSS[prop]||(JS_TO_CSS[prop]=prop.replace(/([A-Z])/g,'-$1').toLowerCase());str+=': ';str+=val;if(typeof val==='number'&&IS_NON_DIMENSIONAL.test(prop)===false){str+='px';}str+=';';}}return str||undefined;}function renderToString(vnode,opts,store,isSvgMode){store=store||{};opts=Object.assign({scopedCSS:true},opts);var css={};var html=_renderToString(vnode,opts,store,isSvgMode,css);return{css:Object.values(css),html:html};}/** The default export is an alias of `render()`. */function _renderToString(vnode,opts,store,isSvgMode,css){if(vnode==null||typeof vnode==='boolean'){return'';}var nodeName=vnode.nodeName,attributes=vnode.attributes,isComponent=false;var pretty=true&&opts.pretty,indentChar=pretty&&typeof pretty==='string'?pretty:'\\t';// #text nodes\nif((typeof vnode==='undefined'?'undefined':_typeof(vnode))!=='object'&&!nodeName){return encodeEntities(vnode);}// components\nvar ctor=mapping$1[nodeName];if(ctor){isComponent=true;var props=getNodeProps$1(vnode),rendered;// class-based components\nvar c=new ctor(props,store);// turn off stateful re-rendering:\nc._disable=c.__x=true;c.props=props;c.store=store;if(c.install)c.install();if(c.beforeRender)c.beforeRender();rendered=c.render(c.props,c.store);if(opts.scopedCSS){if(c.constructor.css||c.css){var cssStr=c.constructor.css?c.constructor.css:typeof c.css==='function'?c.css():c.css;var cssAttr='_s'+getCtorName(c.constructor);css[cssAttr]={id:cssAttr,css:scoper(cssStr,cssAttr)};addScopedAttrStatic(rendered,cssAttr);}c.scopedCSSAttr=vnode.css;scopeHost(rendered,c.scopedCSSAttr);}return _renderToString(rendered,opts,store,false,css);}// render JSX to HTML\nvar s='',html;if(attributes){var attrs=Object.keys(attributes);// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\nif(opts&&opts.sortAttributes===true)attrs.sort();for(var i=0;i]/))continue;if(!(opts&&opts.allAttributes)&&(name==='key'||name==='ref'))continue;if(name==='className'){if(attributes['class'])continue;name='class';}else if(isSvgMode&&name.match(/^xlink:?./)){name=name.toLowerCase().replace(/^xlink:?/,'xlink:');}if(name==='style'&&v&&(typeof v==='undefined'?'undefined':_typeof(v))==='object'){v=styleObjToCss(v);}var hooked=opts.attributeHook&&opts.attributeHook(name,v,store,opts,isComponent);if(hooked||hooked===''){s+=hooked;continue;}if(name==='dangerouslySetInnerHTML'){html=v&&v.__html;}else if((v||v===0||v==='')&&typeof v!=='function'){if(v===true||v===''){v=name;// in non-xml mode, allow boolean attributes\nif(!opts||!opts.xml){s+=' '+name;continue;}}s+=' '+name+'=\"'+encodeEntities(v)+'\"';}}}// account for >1 multiline attribute\nif(pretty){var sub=s.replace(/^\\n\\s*/,' ');if(sub!==s&&!~sub.indexOf('\\n'))s=sub;else if(pretty&&~s.indexOf('\\n'))s+='\\n';}s='<'+nodeName+s+'>';if(String(nodeName).match(/[\\s\\n\\\\/='\"\\0<>]/))throw s;var isVoid=String(nodeName).match(VOID_ELEMENTS);if(isVoid)s=s.replace(/>$/,' />');var pieces=[];if(html){// if multiline, indent.\nif(pretty&&isLargeString(html)){html='\\n'+indentChar+indent(html,indentChar);}s+=html;}else if(vnode.children){var hasLarge=pretty&&~s.indexOf('\\n');for(var i=0;i';}if(!isVoid){if(pretty&&~s.indexOf('\\n'))s+='\\n';s+='';}return s;}function assign$1(obj,props){for(var i in props){obj[i]=props[i];}return obj;}function getNodeProps$1(vnode){var props=assign$1({},vnode.attributes);props.children=vnode.children;var defaultProps=vnode.nodeName.defaultProps;if(defaultProps!==undefined){for(var i in defaultProps){if(props[i]===undefined){props[i]=defaultProps[i];}}}return props;}h.f=Fragment;var html=_htm2.default.bind(h);var WeElement=Component;var defineElement=define;function createRef(){return{};}options.root.Omi={h:h,createElement:h,cloneElement:cloneElement,createRef:createRef,Component:Component,render:render,rerender:rerender,options:options,WeElement:WeElement,define:define,rpx:rpx,defineElement:defineElement,classNames:classNames,extractClass:extractClass,getHost:getHost,renderToString:renderToString,tag:tag,merge:merge,html:html,htm:_htm2.default,obaa:obaa};options.root.omi=options.root.Omi;options.root.Omi.version='omio-2.8.0';var omi={h:h,createElement:h,cloneElement:cloneElement,createRef:createRef,Component:Component,render:render,rerender:rerender,options:options,WeElement:WeElement,define:define,rpx:rpx,defineElement:defineElement,classNames:classNames,extractClass:extractClass,getHost:getHost,renderToString:renderToString,tag:tag,merge:merge,html:html,htm:_htm2.default,obaa:obaa};exports.default=omi;exports.h=h;exports.createElement=h;exports.cloneElement=cloneElement;exports.createRef=createRef;exports.Component=Component;exports.render=render;exports.rerender=rerender;exports.options=options;exports.WeElement=WeElement;exports.define=define;exports.rpx=rpx;exports.defineElement=defineElement;exports.classNames=classNames;exports.extractClass=extractClass;exports.getHost=getHost;exports.renderToString=renderToString;exports.tag=tag;exports.merge=merge;exports.html=html;exports.obaa=obaa;//# sourceMappingURL=omi.esm.js.map\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/// css base code, injected by the css-loader\nmodule.exports=function(useSourceMap){var list=[];// return the list of modules as css string\nlist.toString=function toString(){return this.map(function(item){var content=cssWithMappingToString(item,useSourceMap);if(item[2]){return\"@media \"+item[2]+\"{\"+content+\"}\";}else{return content;}}).join(\"\");};// import a list of modules into the list\nlist.i=function(modules,mediaQuery){if(typeof modules===\"string\")modules=[[null,modules,\"\"]];var alreadyImportedModules={};for(var i=0;icapacity){// Manually shift all values starting at the index back to the\n// beginning of the queue.\nfor(var scan=0,newLength=queue.length-index;scan-1;};}function normalizeName(name){if(typeof name!=='string'){name=String(name);}if(/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)){throw new TypeError('Invalid character in header field name');}return name.toLowerCase();}function normalizeValue(value){if(typeof value!=='string'){value=String(value);}return value;}// Build a destructive iterator for the value list\nfunction iteratorFor(items){var iterator={next:function next(){var value=items.shift();return{done:value===undefined,value:value};}};if(support.iterable){iterator[Symbol.iterator]=function(){return iterator;};}return iterator;}function Headers(headers){this.map={};if(headers instanceof Headers){headers.forEach(function(value,name){this.append(name,value);},this);}else if(Array.isArray(headers)){headers.forEach(function(header){this.append(header[0],header[1]);},this);}else if(headers){Object.getOwnPropertyNames(headers).forEach(function(name){this.append(name,headers[name]);},this);}}Headers.prototype.append=function(name,value){name=normalizeName(name);value=normalizeValue(value);var oldValue=this.map[name];this.map[name]=oldValue?oldValue+','+value:value;};Headers.prototype['delete']=function(name){delete this.map[normalizeName(name)];};Headers.prototype.get=function(name){name=normalizeName(name);return this.has(name)?this.map[name]:null;};Headers.prototype.has=function(name){return this.map.hasOwnProperty(normalizeName(name));};Headers.prototype.set=function(name,value){this.map[normalizeName(name)]=normalizeValue(value);};Headers.prototype.forEach=function(callback,thisArg){for(var name in this.map){if(this.map.hasOwnProperty(name)){callback.call(thisArg,this.map[name],name,this);}}};Headers.prototype.keys=function(){var items=[];this.forEach(function(value,name){items.push(name);});return iteratorFor(items);};Headers.prototype.values=function(){var items=[];this.forEach(function(value){items.push(value);});return iteratorFor(items);};Headers.prototype.entries=function(){var items=[];this.forEach(function(value,name){items.push([name,value]);});return iteratorFor(items);};if(support.iterable){Headers.prototype[Symbol.iterator]=Headers.prototype.entries;}function consumed(body){if(body.bodyUsed){return Promise.reject(new TypeError('Already read'));}body.bodyUsed=true;}function fileReaderReady(reader){return new Promise(function(resolve,reject){reader.onload=function(){resolve(reader.result);};reader.onerror=function(){reject(reader.error);};});}function readBlobAsArrayBuffer(blob){var reader=new FileReader();var promise=fileReaderReady(reader);reader.readAsArrayBuffer(blob);return promise;}function readBlobAsText(blob){var reader=new FileReader();var promise=fileReaderReady(reader);reader.readAsText(blob);return promise;}function readArrayBufferAsText(buf){var view=new Uint8Array(buf);var chars=new Array(view.length);for(var i=0;i-1?upcased:method;}function Request(input,options){options=options||{};var body=options.body;if(input instanceof Request){if(input.bodyUsed){throw new TypeError('Already read');}this.url=input.url;this.credentials=input.credentials;if(!options.headers){this.headers=new Headers(input.headers);}this.method=input.method;this.mode=input.mode;if(!body&&input._bodyInit!=null){body=input._bodyInit;input.bodyUsed=true;}}else{this.url=String(input);}this.credentials=options.credentials||this.credentials||'omit';if(options.headers||!this.headers){this.headers=new Headers(options.headers);}this.method=normalizeMethod(options.method||this.method||'GET');this.mode=options.mode||this.mode||null;this.referrer=null;if((this.method==='GET'||this.method==='HEAD')&&body){throw new TypeError('Body not allowed for GET or HEAD requests');}this._initBody(body);}Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit});};function decode(body){var form=new FormData();body.trim().split('&').forEach(function(bytes){if(bytes){var split=bytes.split('=');var name=split.shift().replace(/\\+/g,' ');var value=split.join('=').replace(/\\+/g,' ');form.append(decodeURIComponent(name),decodeURIComponent(value));}});return form;}function parseHeaders(rawHeaders){var headers=new Headers();rawHeaders.split(/\\r?\\n/).forEach(function(line){var parts=line.split(':');var key=parts.shift().trim();if(key){var value=parts.join(':').trim();headers.append(key,value);}});return headers;}Body.call(Request.prototype);function Response(bodyInit,options){if(!options){options={};}this.type='default';this.status='status'in options?options.status:200;this.ok=this.status>=200&&this.status<300;this.statusText='statusText'in options?options.statusText:'OK';this.headers=new Headers(options.headers);this.url=options.url||'';this._initBody(bodyInit);}Body.call(Response.prototype);Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url});};Response.error=function(){var response=new Response(null,{status:0,statusText:''});response.type='error';return response;};var redirectStatuses=[301,302,303,307,308];Response.redirect=function(url,status){if(redirectStatuses.indexOf(status)===-1){throw new RangeError('Invalid status code');}return new Response(null,{status:status,headers:{location:url}});};self.Headers=Headers;self.Request=Request;self.Response=Response;self.fetch=function(input,init){return new Promise(function(resolve,reject){var request=new Request(input,init);var xhr=new XMLHttpRequest();xhr.onload=function(){var options={status:xhr.status,statusText:xhr.statusText,headers:parseHeaders(xhr.getAllResponseHeaders()||'')};options.url='responseURL'in xhr?xhr.responseURL:options.headers.get('X-Request-URL');var body='response'in xhr?xhr.response:xhr.responseText;resolve(new Response(body,options));};xhr.onerror=function(){reject(new TypeError('Network request failed'));};xhr.ontimeout=function(){reject(new TypeError('Network request failed'));};xhr.open(request.method,request.url,true);if(request.credentials==='include'){xhr.withCredentials=true;}if('responseType'in xhr&&support.blob){xhr.responseType='blob';}request.headers.forEach(function(value,name){xhr.setRequestHeader(name,value);});xhr.send(typeof request._bodyInit==='undefined'?null:request._bodyInit);});};self.fetch.polyfill=true;})(typeof self!=='undefined'?self:undefined);\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*//* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError('Object.assign cannot be called with null or undefined');}return Object(val);}function shouldUseNative(){try{if(!Object.assign){return false;}// Detect buggy property enumeration order in older V8 versions.\n// https://bugs.chromium.org/p/v8/issues/detail?id=4118\nvar test1=new String('abc');// eslint-disable-line no-new-wrappers\ntest1[5]='de';if(Object.getOwnPropertyNames(test1)[0]==='5'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056\nvar test2={};for(var i=0;i<10;i++){test2['_'+String.fromCharCode(i)]=i;}var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n];});if(order2.join('')!=='0123456789'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056\nvar test3={};'abcdefghijklmnopqrst'.split('').forEach(function(letter){test3[letter]=letter;});if(Object.keys(Object.assign({},test3)).join('')!=='abcdefghijklmnopqrst'){return false;}return true;}catch(err){// We don't expect any of the above to throw, but better to be safe.\nreturn false;}}module.exports=shouldUseNative()?Object.assign:function(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s1?r:r[0];};var n=function n(t,r,u,e){for(var p=1;p=5&&((e||!n&&5===u)&&(s.push(e,u,r),u=6),n&&(s.push(n,u,r),u=6)),e=\"\";},a=0;a\"===t?(u=1,e=\"\"):e=t+e[0]:p?t===p?p=\"\":e+=t:'\"'===t||\"'\"===t?p=t:\">\"===t?(h(),u=1):u&&(\"=\"===t?(u=5,r=e,e=\"\"):\"/\"===t&&(u<5||\">\"===n[a][f+1])?(h(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,2),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(h(),u=2):e+=t),3===u&&\"!--\"===e&&(u=4,s=s[0]);}}return h(),s;},r=\"function\"==typeof Map,u=r?new Map():{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r;}:function(n){for(var r=\"\",e=0;e {\n// let newP = document.createElement('div')\n// newP.className = '_code-ctn'\n// let pre = code.parentNode\n// let ctn = pre.parentNode\n// if (pre.nodeName === 'PRE') {\n// ctn.insertBefore(newP, pre)\n// let hl = document.createElement('div')\n// hl.className = '_hl'\n// newP.appendChild(hl)\n// newP.appendChild(pre)\n// let nums = codeHlNumArr[index]\n// let max = Math.max.apply(null, nums)\n// let inner = ''\n// for (let i = 0; i <= max; i++) {\n// if (nums.indexOf(i) == -1) {\n// inner += '
'\n// } else {\n// inner += '
'\n// }\n// }\n// hl.innerHTML = inner\n// }\n// })\n//fix line-highlight\nwindow.dispatchEvent(new Event('resize'));}},{key:'_arrToNumber',value:function _arrToNumber(numArr){var arr=[];numArr.forEach(function(item){if(item.indexOf('-')!==-1){var tempArr=item.split('-');var begin=Number(tempArr[0]);var end=Number(tempArr[1]);for(var i=begin;i0)return false;}return true;}},{key:'render',value:function render(){if(!this.demo)return;return Omi.h('div',null,this.show&&Omi.h('iframe',{style:'height:'+(window.innerHeight-59)+'px',src:this.demo}),!this.show&&Omi.h('div',{'class':'switch code',onClick:this.onShow},Omi.h('img',{src:__webpack_require__(33)})),this.show&&Omi.h('div',{'class':'switch close',onClick:this.onClose},Omi.h('img',{src:__webpack_require__(34)})));}}]);return _class2;}(_omi.WeElement));\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\n var result = __webpack_require__(32);\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(1)(undefined);\n// imports\n\n\n// module\nexports.push([module.i, \"iframe{\\n width: 750px;\\n height: 100%;\\n top: 60px;\\n right: 0;\\n position: fixed;\\n border: none;\\n z-index: 9999;\\n border-left: 2px solid #24292E;\\n}\\n\\n.switch{\\n width: 40px;\\n height: 40px;\\n background-color: #AA0000;\\n border-radius: 50%;\\n position: fixed;\\n right: 50px;\\n bottom: 50px;\\n cursor: pointer;\\n text-align: center;\\n z-index: 10000;\\n}\\n\\n.switch img{\\n width: 30px;\\n height: 30px;\\n margin-top:5px;\\n}\\n\\n.switch.close img{\\n margin-top:10px;\\n width: 20px;\\n height: 20px;\\n}\\n\\n\\n@media only screen and (max-width: 800px) {\\n iframe{\\n width: 100%;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC\"\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==\"\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(exports,\"__esModule\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){params[pathArr[index].replace(':','')]=item;}});return params;}function route(path,callback){mapping[path]={callback:callback,reg:p2r(path)};}function getGlobal(){if((typeof global==='undefined'?'undefined':_typeof(global))!=='object'||!global||global.Math!==Math||global.Array!==Array){return self||window||global||function(){return this;}();}return global;}function getUrlParams(url){url=url.replace(/#.*$/,'');var queryArray=url.split(/[?&]/).slice(1);var i,args={};for(i=0;i [\"test\", \"\\d+\", undefined, \"?\"]\n// \"(\\\\d+)\" => [undefined, undefined, \"\\d+\", undefined]\n'(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'].join('|'),'g');/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */function parse(str,options){var tokens=[];var key=0;var index=0;var path='';var defaultDelimiter=options&&options.delimiter||DEFAULT_DELIMITER;var whitelist=options&&options.whitelist||undefined;var pathEscaped=false;var res;while((res=PATH_REGEXP.exec(str))!==null){var m=res[0];var escaped=res[1];var offset=res.index;path+=str.slice(index,offset);index=offset+m.length;// Ignore already escaped sequences.\nif(escaped){path+=escaped[1];pathEscaped=true;continue;}var prev='';var name=res[2];var capture=res[3];var group=res[4];var modifier=res[5];if(!pathEscaped&&path.length){var k=path.length-1;var c=path[k];var matches=whitelist?whitelist.indexOf(c)>-1:true;if(matches){prev=c;path=path.slice(0,k);}}// Push the current path onto the tokens.\nif(path){tokens.push(path);path='';pathEscaped=false;}var repeat=modifier==='+'||modifier==='*';var optional=modifier==='?'||modifier==='*';var pattern=capture||group;var delimiter=prev||defaultDelimiter;tokens.push({name:name||key++,prefix:prev,delimiter:delimiter,optional:optional,repeat:repeat,pattern:pattern?escapeGroup(pattern):'[^'+escapeString(delimiter===defaultDelimiter?delimiter:delimiter+defaultDelimiter)+']+?'});}// Push any remaining characters.\nif(path||indexHello!`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */\nfunction h(nodeName, attributes) {\n var children = [],\n lastSimple,\n child,\n simple,\n i;\n for (i = arguments.length; i-- > 2;) {\n stack.push(arguments[i]);\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children);\n delete attributes.children;\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--;) {\n stack.push(child[i]);\n }\n } else {\n if (typeof child === 'boolean') child = null;\n\n if (simple = typeof nodeName !== 'function') {\n if (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child;\n } else if (children.length === 0) {\n children = [child];\n } else {\n children.push(child);\n }\n\n lastSimple = simple;\n }\n }\n\n var p = new VNode();\n p.nodeName = nodeName;\n p.children = children;\n p.attributes = attributes == null ? undefined : attributes;\n p.key = attributes == null ? undefined : attributes.key;\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p);\n\n return p;\n}\n\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction assign(target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n}\n\nif (typeof Element !== 'undefined' && !Element.prototype.addEventListener) {\n var runListeners = function runListeners(oEvent) {\n if (!oEvent) {\n oEvent = window.event;\n }\n for (var iLstId = 0, iElId = 0, oEvtListeners = oListeners[oEvent.type]; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n for (iLstId; iLstId < oEvtListeners.aEvts[iElId].length; iLstId++) {\n oEvtListeners.aEvts[iElId][iLstId].call(this, oEvent);\n }\n break;\n }\n }\n };\n\n var oListeners = {};\n\n Element.prototype.addEventListener = function (sEventType, fListener /*, useCapture (will be ignored!) */) {\n if (oListeners.hasOwnProperty(sEventType)) {\n var oEvtListeners = oListeners[sEventType];\n for (var nElIdx = -1, iElId = 0; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n nElIdx = iElId;break;\n }\n }\n if (nElIdx === -1) {\n oEvtListeners.aEls.push(this);\n oEvtListeners.aEvts.push([fListener]);\n this[\"on\" + sEventType] = runListeners;\n } else {\n var aElListeners = oEvtListeners.aEvts[nElIdx];\n if (this[\"on\" + sEventType] !== runListeners) {\n aElListeners.splice(0);\n this[\"on\" + sEventType] = runListeners;\n }\n for (var iLstId = 0; iLstId < aElListeners.length; iLstId++) {\n if (aElListeners[iLstId] === fListener) {\n return;\n }\n }\n aElListeners.push(fListener);\n }\n } else {\n oListeners[sEventType] = { aEls: [this], aEvts: [[fListener]] };\n this[\"on\" + sEventType] = runListeners;\n }\n };\n Element.prototype.removeEventListener = function (sEventType, fListener /*, useCapture (will be ignored!) */) {\n if (!oListeners.hasOwnProperty(sEventType)) {\n return;\n }\n var oEvtListeners = oListeners[sEventType];\n for (var nElIdx = -1, iElId = 0; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n nElIdx = iElId;break;\n }\n }\n if (nElIdx === -1) {\n return;\n }\n for (var iLstId = 0, aElListeners = oEvtListeners.aEvts[nElIdx]; iLstId < aElListeners.length; iLstId++) {\n if (aElListeners[iLstId] === fListener) {\n aElListeners.splice(iLstId, 1);\n }\n }\n };\n}\n\nif (typeof Object.create !== 'function') {\n Object.create = function (proto, propertiesObject) {\n if (typeof proto !== 'object' && typeof proto !== 'function') {\n throw new TypeError('Object prototype may only be an Object: ' + proto);\n } else if (proto === null) {\n throw new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n }\n\n // if (typeof propertiesObject != 'undefined') {\n // throw new Error(\"This browser's implementation of Object.create is a shim and doesn't support a second argument.\");\n // }\n\n function F() {}\n F.prototype = proto;\n\n return new F();\n };\n}\n\nif (!String.prototype.trim) {\n String.prototype.trim = function () {\n return this.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n };\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {Object} obj\t\tObject onto which properties should be copied.\n * @param {Object} props\tObject from which to copy properties.\n * @returns obj\n * @private\n */\nfunction extend(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nfunction applyRef(ref, value) {\n if (ref) {\n if (typeof ref == 'function') ref(value);else ref.current = value;\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n *\n * @param {Function} callback\n */\n\nvar usePromise = typeof Promise == 'function';\n\n// for native\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\n if (global.__config__.platform === 'android') {\n usePromise = true;\n } else {\n var systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\n if (systemVersion > 8) {\n usePromise = true;\n }\n }\n}\n\nvar defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\nfunction isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n}\n\nfunction getUse(data, paths, out, name) {\n var obj = [];\n paths.forEach(function (path, index) {\n var isPath = typeof path === 'string';\n if (isPath) {\n obj[index] = getTargetByPath(data, path);\n } else {\n var key = Object.keys(path)[0];\n var value = path[key];\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value);\n } else {\n var tempPath = value[0];\n if (typeof tempPath === 'string') {\n var tempVal = getTargetByPath(data, tempPath);\n obj[index] = value[1] ? value[1](tempVal) : tempVal;\n } else {\n var args = [];\n tempPath.forEach(function (path) {\n args.push(getTargetByPath(data, path));\n });\n obj[index] = value[1].apply(null, args);\n }\n }\n obj[key] = obj[index];\n }\n });\n out && (out[name] = obj);\n return obj;\n}\n\nfunction getTargetByPath(origin, path) {\n var arr = path.replace(/]/g, '').replace(/\\[/g, '.').split('.');\n var current = origin;\n for (var i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]];\n }\n return current;\n}\n\nfunction getPath(obj, out, name) {\n\n var result = {};\n obj.forEach(function (item) {\n if (typeof item === 'string') {\n result[item] = true;\n } else {\n var tempPath = item[Object.keys(item)[0]];\n if (typeof tempPath === 'string') {\n result[tempPath] = true;\n } else {\n if (typeof tempPath[0] === 'string') {\n result[tempPath[0]] = true;\n } else {\n tempPath[0].forEach(function (path) {\n return result[path] = true;\n });\n }\n }\n }\n });\n out && (out[name] = result);\n return result;\n}\n\nfunction removeItem(item, arr) {\n for (var i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n break;\n }\n }\n}\n\nfunction Fragment(props) {\n return props.children;\n}\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nfunction cloneElement(vnode, props) {\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL$1 = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\n/** Managed queue of dirty components to be re-rendered */\n\nvar items = [];\n\nfunction enqueueRender(component) {\n if (items.push(component) == 1) {\n(options.debounceRendering || defer)(rerender);\n }\n}\n\n/** Rerender all enqueued dirty components */\nfunction rerender() {\n var p;\n while (p = items.pop()) {\n renderComponent(p);\n }\n}\n\nvar mapping = options.mapping;\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nfunction isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined;\n }\n if (typeof vnode.nodeName === 'string') {\n var ctor = mapping[vnode.nodeName];\n if (ctor) {\n return hydrating || node._componentConstructor === ctor;\n }\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n }\n return hydrating || node._componentConstructor === vnode.nodeName;\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nfunction isNamedNode(node, nodeName) {\n return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nfunction getNodeProps(vnode) {\n var props = extend({}, vnode.attributes);\n props.children = vnode.children;\n\n var defaultProps = vnode.nodeName.defaultProps;\n if (defaultProps !== undefined) {\n for (var i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i];\n }\n }\n }\n\n return props;\n}\n\n/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */\nfunction createNode(nodeName, isSvg) {\n var node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\n node.normalizedNodeName = nodeName;\n return node;\n}\n\nfunction parseCSSText(cssText) {\n var cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, ' ').replace(/\\s+/g, ' ');\n var style = {},\n _ref = cssTxt.match(/ ?(.*?) ?{([^}]*)}/) || [a, b, cssTxt],\n a = _ref[0],\n b = _ref[1],\n rule = _ref[2];\n\n var cssToJs = function cssToJs(s) {\n return s.replace(/\\W+\\w/g, function (match) {\n return match.slice(-1).toUpperCase();\n });\n };\n var properties = rule.split(';').map(function (o) {\n return o.split(':').map(function (x) {\n return x && x.trim();\n });\n });\n for (var i = properties, i = Array.isArray(i), i = 0, i = i ? i : i[Symbol.iterator]();;) {\n var _ref3;\n\n if (i) {\n if (i >= i.length) break;\n _ref3 = i[i++];\n } else {\n i = i.next();\n if (i.done) break;\n _ref3 = i.value;\n }\n\n var _ref2 = _ref3;\n var property = _ref2[0];\n var value = _ref2[1];\n style[cssToJs(property)] = value;\n }return style;\n}\n\n/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */\nfunction removeNode(node) {\n var parentNode = node.parentNode;\n if (parentNode) parentNode.removeChild(node);\n}\n\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */\nfunction setAccessor(node, name, old, value, isSvg) {\n if (name === 'className') name = 'class';\n\n if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null);\n applyRef(value, node);\n } else if (name === 'class' && !isSvg) {\n node.className = value || '';\n } else if (name === 'style') {\n if (options.isWeb) {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || '';\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (var i in old) {\n if (!(i in value)) node.style[i] = '';\n }\n }\n for (var i in value) {\n node.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL$1.test(i) === false ? value[i] + 'px' : value[i];\n }\n }\n } else {\n var oldJson = old,\n currentJson = value;\n if (typeof old === 'string') {\n oldJson = parseCSSText(old);\n }\n if (typeof value == 'string') {\n currentJson = parseCSSText(value);\n }\n\n var result = {},\n changed = false;\n\n if (oldJson) {\n for (var key in oldJson) {\n if (typeof currentJson == 'object' && !(key in currentJson)) {\n result[key] = '';\n changed = true;\n }\n }\n\n for (var ckey in currentJson) {\n if (currentJson[ckey] !== oldJson[ckey]) {\n result[ckey] = currentJson[ckey];\n changed = true;\n }\n }\n\n if (changed) {\n node.setStyles(result);\n }\n } else {\n node.setStyles(currentJson);\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || '';\n } else if (name[0] == 'o' && name[1] == 'n') {\n var useCapture = name !== (name = name.replace(/Capture$/, ''));\n var nameLower = name.toLowerCase();\n name = (nameLower in node ? nameLower : name).slice(2);\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture);\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture);\n node.addEventListener('touchend', touchEnd, useCapture);\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture);\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture);\n node.removeEventListener('touchend', touchEnd, useCapture);\n }\n }\n(node._listeners || (node._listeners = {}))[name] = value;\n } else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n setProperty(node, name, value == null ? '' : value);\n if (value == null || value === false) node.removeAttribute(name);\n } else {\n var ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n if (value == null || value === false) {\n if (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n } else if (typeof value !== 'function') {\n if (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n }\n }\n}\n\n/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */\nfunction setProperty(node, name, value) {\n try {\n node[name] = value;\n } catch (e) {}\n}\n\n/** Proxy an event to hooked event handlers\n *\t@private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type](options.event && options.event(e) || e);\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX;\n this.___touchY = e.touches[0].pageY;\n this.___scrollTop = document.body.scrollTop;\n}\n\nfunction touchEnd(e) {\n if (Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 && Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 && Math.abs(document.body.scrollTop - this.___scrollTop) < 30) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }));\n }\n}\n\nvar styleId = 0;\n\nfunction getCtorName(ctor) {\n for (var i = 0, len = options.styleCache.length; i < len; i++) {\n var item = options.styleCache[i];\n\n if (item.ctor === ctor) {\n return item.attrName;\n }\n }\n\n var attrName = 's' + styleId;\n options.styleCache.push({ ctor: ctor, attrName: attrName });\n styleId++;\n\n return attrName;\n}\n\n// many thanks to https://github.com/thomaspark/scoper/\nfunction scoper(css, prefix) {\n prefix = '[' + prefix.toLowerCase() + ']';\n // https://www.w3.org/TR/css-syntax-3/#lexical\n css = css.replace(/\\/\\*[^*]*\\*+([^/][^*]*\\*+)*\\//g, '');\n // eslint-disable-next-line\n var re = new RegExp('([^\\r\\n,{}:]+)(:[^\\r\\n,{}]+)?(,(?=[^{}]*{)|\\s*{)', 'g');\n /**\n * Example:\n *\n * .classname::pesudo { color:red }\n *\n * g1 is normal selector `.classname`\n * g2 is pesudo class or pesudo element\n * g3 is the suffix\n */\n css = css.replace(re, function (g0, g1, g2, g3) {\n if (typeof g2 === 'undefined') {\n g2 = '';\n }\n\n /* eslint-ignore-next-line */\n if (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\n return g1 + g2 + g3;\n }\n\n var appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\n //let prependClass = prefix + ' ' + g1.trim() + g2;\n\n return appendClass + g3;\n //return appendClass + ',' + prependClass + g3;\n });\n\n return css;\n}\n\nfunction addStyle(cssText, id) {\n id = id.toLowerCase();\n var ele = document.getElementById(id);\n var head = document.getElementsByTagName('head')[0];\n if (ele && ele.parentNode === head) {\n head.removeChild(ele);\n }\n\n var someThingStyles = document.createElement('style');\n head.appendChild(someThingStyles);\n someThingStyles.setAttribute('type', 'text/css');\n someThingStyles.setAttribute('id', id);\n if (window.ActiveXObject) {\n someThingStyles.styleSheet.cssText = cssText;\n } else {\n someThingStyles.textContent = cssText;\n }\n}\n\nfunction addStyleWithoutId(cssText) {\n var head = document.getElementsByTagName('head')[0];\n var someThingStyles = document.createElement('style');\n head.appendChild(someThingStyles);\n someThingStyles.setAttribute('type', 'text/css');\n\n if (window.ActiveXObject) {\n someThingStyles.styleSheet.cssText = cssText;\n } else {\n someThingStyles.textContent = cssText;\n }\n}\n\nfunction addScopedAttrStatic(vdom, attr) {\n if (options.scopedStyle) {\n scopeVdom(attr, vdom);\n }\n}\n\nfunction addStyleToHead(style, attr) {\n if (options.scopedStyle) {\n if (!options.staticStyleMapping[attr]) {\n addStyle(scoper(style, attr), attr);\n options.staticStyleMapping[attr] = true;\n }\n } else if (!options.staticStyleMapping[attr]) {\n addStyleWithoutId(style);\n options.staticStyleMapping[attr] = true;\n }\n}\n\nfunction scopeVdom(attr, vdom) {\n if (typeof vdom === 'object') {\n vdom.attributes = vdom.attributes || {};\n vdom.attributes[attr] = '';\n vdom.css = vdom.css || {};\n vdom.css[attr] = '';\n vdom.children.forEach(function (child) {\n return scopeVdom(attr, child);\n });\n }\n}\n\nfunction scopeHost(vdom, css) {\n if (typeof vdom === 'object' && css) {\n vdom.attributes = vdom.attributes || {};\n for (var key in css) {\n vdom.attributes[key] = '';\n }\n }\n}\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nvar mounts = [];\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar hydrating = false;\n\n/** Invoke queued componentDidMount lifecycle methods */\nfunction flushMounts() {\n var c;\n while (c = mounts.pop()) {\n if (options.afterMount) options.afterMount(c);\n if (c.installed) c.installed();\n if (c.constructor.css || c.css) {\n addStyleToHead(c.constructor.css ? c.constructor.css : typeof c.css === 'function' ? c.css() : c.css, '_s' + getCtorName(c.constructor));\n }\n }\n}\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nfunction diff(dom, vnode, store, mountAll, parent, componentRoot, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !('__omiattr_' in dom);\n }\n var ret;\n\n if (isArray(vnode)) {\n vnode = {\n nodeName: 'span',\n children: vnode\n };\n } else if (vnode && vnode.nodeName === Fragment) {\n vnode.nodeName = 'span';\n }\n\n ret = idiff(dom, vnode, store, mountAll, componentRoot, updateSelf);\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (! --diffLevel) {\n hydrating = false;\n // invoke queued componentDidMount lifecycle methods\n if (!componentRoot) flushMounts();\n }\n\n return ret;\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, store, mountAll, componentRoot, updateSelf) {\n var out = dom,\n prevSvgMode = isSvgMode;\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n // If the VNode represents a Component, perform a component diff:\n var vnodeName = vnode.nodeName;\n if (options.mapping[vnodeName]) {\n vnode.nodeName = options.mapping[vnodeName];\n return buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf);\n }\n if (typeof vnodeName == 'function') {\n return buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf);\n }\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode;\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode);\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n recollectNodeTree(dom, true);\n }\n }\n\n //ie8 error\n try {\n out['__omiattr_'] = true;\n } catch (e) {}\n\n return out;\n }\n\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName);\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode);\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) {\n out.appendChild(dom.firstChild);\n } // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true);\n }\n }\n\n var fc = out.firstChild,\n props = out['__omiattr_'],\n vchildren = vnode.children;\n\n if (props == null) {\n props = out['__omiattr_'] = {};\n for (var a = out.attributes, i = a.length; i--;) {\n props[a[i].name] = a[i].value;\n }\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0];\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if (vchildren && vchildren.length || fc != null) {\n innerDiffNode(out, vchildren, store, mountAll, hydrating || props.dangerouslySetInnerHTML != null, updateSelf);\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props);\n\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode;\n\n return out;\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Object} store\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\n *\t@param {Boolean} mountAll\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, store, mountAll, isHydrating, updateSelf) {\n var originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child;\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (var i = 0; i < len; i++) {\n var _child = originalChildren[i],\n props = _child['__omiattr_'],\n key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n if (key != null) {\n keyedLen++;\n keyed[key] = _child;\n } else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n children[childrenLen++] = _child;\n }\n }\n }\n\n if (vlen !== 0) {\n for (var i = 0; i < vlen; i++) {\n vchild = vchildren[i];\n child = null;\n\n // attempt to find a node based on key matching\n var key = vchild.key;\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key];\n keyed[key] = undefined;\n keyedLen--;\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n child = c;\n children[j] = undefined;\n if (j === childrenLen - 1) childrenLen--;\n if (j === min) min++;\n break;\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, store, mountAll, null, updateSelf);\n\n f = originalChildren[i];\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child);\n } else if (child === f.nextSibling) {\n removeNode(f);\n } else {\n dom.insertBefore(child, f);\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (var i in keyed) {\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n }\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nfunction recollectNodeTree(node, unmountOnly) {\n var component = node._component;\n if (component) {\n // if node is owned by a Component, unmount that component (ends up recursing back here)\n unmountComponent(component);\n } else {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node['__omiattr_'] != null) applyRef(node['__omiattr_'].ref, null);\n\n if (unmountOnly === false || node['__omiattr_'] == null) {\n removeNode(node);\n }\n\n removeChildren(node);\n }\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nfunction removeChildren(node) {\n node = node.lastChild;\n while (node) {\n var next = node.previousSibling;\n recollectNodeTree(node, true);\n node = next;\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old) {\n var name;\n\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n }\n }\n}\n\n/** Retains a pool of Components for re-use, keyed on component name.\n *\tNote: since component names are not unique or even necessarily available, these are primarily a form of sharding.\n *\t@private\n */\nvar components = {};\n\n/** Reclaim a component for later re-use by the recycler. */\nfunction collectComponent(component) {\n var name = component.constructor.name;(components[name] || (components[name] = [])).push(component);\n}\n\n/** Create a component. Normalizes differences between PFC's and classful Components. */\nfunction createComponent(Ctor, props, store, vnode) {\n var list = components[Ctor.name],\n inst;\n\n if (Ctor.prototype && Ctor.prototype.render) {\n inst = new Ctor(props, store);\n Component.call(inst, props, store);\n } else {\n inst = new Component(props, store);\n inst.constructor = Ctor;\n inst.render = doRender;\n }\n vnode && (inst.scopedCssAttr = vnode.css);\n\n if (inst.store) {\n if (inst.use) {\n var use = typeof inst.use === 'function' ? inst.use() : inst.use;\n\n if (options.isMultiStore) {\n var _updatePath = {};\n var using = {};\n for (var storeName in use) {\n _updatePath[storeName] = {};\n using[storeName] = {};\n getPath(use[storeName], _updatePath, storeName);\n getUse(inst.store[storeName].data, use[storeName], using, storeName);\n inst.store[storeName].instances.push(inst);\n }\n inst.using = using;\n inst._updatePath = _updatePath;\n } else {\n inst._updatePath = getPath(use);\n inst.using = getUse(inst.store.data, use);\n inst.store.instances.push(inst);\n }\n }\n\n if (inst.useSelf) {\n var _use = typeof inst.useSelf === 'function' ? inst.useSelf() : inst.useSelf;\n\n if (options.isMultiStore) {\n var _updatePath2 = {};\n var _using = {};\n for (var _storeName in _use) {\n getPath(_use[_storeName], _updatePath2, _storeName);\n getUse(inst.store[_storeName].data, _use[_storeName], _using, _storeName);\n inst.store[_storeName].updateSelfInstances.push(inst);\n }\n inst.usingSelf = _using;\n inst._updateSelfPath = _updatePath2;\n } else {\n inst._updateSelfPath = getPath(_use);\n inst.usingSelf = getUse(inst.store.data, _use);\n inst.store.updateSelfInstances.push(inst);\n }\n }\n\n if (inst.compute) {\n for (var key in inst.compute) {\n inst.computed[key] = inst.compute[key].call(options.isMultiStore ? inst.store : inst.store.data);\n }\n }\n }\n\n if (list) {\n for (var i = list.length; i--;) {\n if (list[i].constructor === Ctor) {\n inst.nextBase = list[i].nextBase;\n list.splice(i, 1);\n break;\n }\n }\n }\n return inst;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, store) {\n return this.constructor(props, store);\n}\n\n/** Set a component's `props` (generally derived from JSX attributes).\n *\t@param {Object} props\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\n */\nfunction setComponentProps(component, props, opts, store, mountAll) {\n if (component._disable) return;\n component._disable = true;\n\n if (component.__ref = props.ref) delete props.ref;\n if (component.__key = props.key) delete props.key;\n\n if (!component.base || mountAll) {\n if (component.beforeInstall) component.beforeInstall();\n if (component.install) component.install();\n }\n\n if (!component.prevProps) component.prevProps = component.props;\n component.props = props;\n\n component._disable = false;\n\n if (opts !== 0) {\n if (opts === 1 || options.syncComponentUpdates !== false || !component.base) {\n renderComponent(component, 1, mountAll);\n } else {\n enqueueRender(component);\n }\n }\n\n applyRef(component.__ref, component);\n}\n\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\n *\t@param {Component} component\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\n *\t@private\n */\nfunction renderComponent(component, opts, mountAll, isChild, updateSelf) {\n if (component._disable) return;\n\n var props = component.props,\n store = component.store,\n previousProps = component.prevProps || props,\n isUpdate = component.base,\n nextBase = component.nextBase,\n initialBase = isUpdate || nextBase,\n initialChildComponent = component._component,\n skip = false,\n rendered,\n inst,\n cbase;\n\n // if updating\n if (isUpdate) {\n component.props = previousProps;\n\n var receiveResult = true;\n if (component.receiveProps) {\n receiveResult = component.receiveProps(props, previousProps);\n }\n if (receiveResult !== false) {\n skip = false;\n if (component.beforeUpdate) {\n component.beforeUpdate(props, store);\n }\n } else {\n skip = true;\n }\n component.props = props;\n }\n\n component.prevProps = component.nextBase = null;\n\n if (!skip) {\n component.beforeRender && component.beforeRender();\n rendered = component.render(props, store);\n\n //don't rerender\n if (component.constructor.css || component.css) {\n addScopedAttrStatic(rendered, '_s' + getCtorName(component.constructor));\n }\n\n scopeHost(rendered, component.scopedCssAttr);\n\n var childComponent = rendered && rendered.nodeName,\n toUnmount,\n base,\n ctor = options.mapping[childComponent];\n\n if (ctor) {\n // set up high order component link\n\n var childProps = getNodeProps(rendered);\n inst = initialChildComponent;\n\n if (inst && inst.constructor === ctor && childProps.key == inst.__key) {\n setComponentProps(inst, childProps, 1, store, false);\n } else {\n toUnmount = inst;\n\n component._component = inst = createComponent(ctor, childProps, store);\n inst.nextBase = inst.nextBase || nextBase;\n inst._parentComponent = component;\n setComponentProps(inst, childProps, 0, store, false);\n renderComponent(inst, 1, mountAll, true);\n }\n\n base = inst.base;\n } else {\n cbase = initialBase;\n\n // destroy high order component link\n toUnmount = initialChildComponent;\n if (toUnmount) {\n cbase = component._component = null;\n }\n\n if (initialBase || opts === 1) {\n if (cbase) cbase._component = null;\n base = diff(cbase, rendered, store, mountAll || !isUpdate, initialBase && initialBase.parentNode, true, updateSelf);\n }\n }\n\n if (initialBase && base !== initialBase && inst !== initialChildComponent) {\n var baseParent = initialBase.parentNode;\n if (baseParent && base !== baseParent) {\n baseParent.replaceChild(base, initialBase);\n\n if (!toUnmount) {\n initialBase._component = null;\n recollectNodeTree(initialBase, false);\n }\n }\n }\n\n if (toUnmount) {\n unmountComponent(toUnmount);\n }\n\n component.base = base;\n if (base && !isChild) {\n var componentRef = component,\n t = component;\n while (t = t._parentComponent) {\n(componentRef = t).base = base;\n }\n base._component = componentRef;\n base._componentConstructor = componentRef.constructor;\n }\n }\n\n if (!isUpdate || mountAll) {\n mounts.unshift(component);\n } else if (!skip) {\n // Ensure that pending componentDidMount() hooks of child components\n // are called before the componentDidUpdate() hook in the parent.\n // Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\n // flushMounts();\n\n if (component.afterUpdate) {\n //deprecated\n component.afterUpdate(previousProps, store);\n }\n if (component.updated) {\n component.updated(previousProps, store);\n }\n if (options.afterUpdate) options.afterUpdate(component);\n }\n\n if (component._renderCallbacks != null) {\n while (component._renderCallbacks.length) {\n component._renderCallbacks.pop().call(component);\n }\n }\n\n if (!diffLevel && !isChild) flushMounts();\n}\n\n/** Apply the Component referenced by a VNode to the DOM.\n *\t@param {Element} dom\tThe DOM node to mutate\n *\t@param {VNode} vnode\tA Component-referencing VNode\n *\t@returns {Element} dom\tThe created/mutated element\n *\t@private\n */\nfunction buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf) {\n var c = dom && dom._component,\n originalComponent = c,\n oldDom = dom,\n isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n isOwner = isDirectOwner,\n props = getNodeProps(vnode);\n while (c && !isOwner && (c = c._parentComponent)) {\n isOwner = c.constructor === vnode.nodeName;\n }\n\n if (c && isOwner && (!mountAll || c._component)) {\n if (!updateSelf) {\n setComponentProps(c, props, 3, store, mountAll);\n }\n dom = c.base;\n } else {\n if (originalComponent && !isDirectOwner) {\n unmountComponent(originalComponent);\n dom = oldDom = null;\n }\n\n c = createComponent(vnode.nodeName, props, store, vnode);\n if (dom && !c.nextBase) {\n c.nextBase = dom;\n // passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\n oldDom = null;\n }\n setComponentProps(c, props, 1, store, mountAll);\n dom = c.base;\n\n if (oldDom && dom !== oldDom) {\n oldDom._component = null;\n recollectNodeTree(oldDom, false);\n }\n }\n\n return dom;\n}\n\n/** Remove a component from the DOM and recycle it.\n *\t@param {Component} component\tThe Component instance to unmount\n *\t@private\n */\nfunction unmountComponent(component) {\n if (options.beforeUnmount) options.beforeUnmount(component);\n\n var base = component.base;\n\n component._disable = true;\n\n if (component.uninstall) component.uninstall();\n\n if (component.store) {\n if (options.isMultiStore) {\n for (var key in component.store) {\n var current = component.store[key];\n current.instances && removeItem(component, current.instances);\n current.updateSelfInstances && removeItem(component, current.updateSelfInstances);\n }\n } else {\n component.store.instances && removeItem(component, component.store.instances);\n component.store.updateSelfInstances && removeItem(component, component.store.updateSelfInstances);\n }\n }\n\n component.base = null;\n\n // recursively tear down & recollect high-order component children:\n var inner = component._component;\n if (inner) {\n unmountComponent(inner);\n } else if (base) {\n if (base['__omiattr_'] != null) applyRef(base['__omiattr_'].ref, null);\n\n component.nextBase = base;\n\n removeNode(base);\n collectComponent(component);\n\n removeChildren(base);\n }\n\n applyRef(component.__ref, null);\n}\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar id = 0;\n\nvar Component = function () {\n function Component(props, store) {\n _classCallCheck(this, Component);\n\n this.props = assign({}, this.constructor.defaultProps, props);\n this.elementId = id++;\n\n this._preCss = null;\n\n this.store = store;\n this.computed = {};\n }\n\n Component.prototype.update = function update(ignoreAttrs, updateSelf, callback) {\n if (this._willUpdate) return;\n this._willUpdate = true;\n if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n renderComponent(this, 2);\n if (options.componentChange) options.componentChange(this, this.base);\n this._willUpdate = false;\n };\n\n Component.prototype.updateSelf = function updateSelf() {\n if (this._willUpdateSelf) return;\n this._willUpdateSelf = true;\n renderComponent(this, 2, null, null, true);\n this._willUpdateSelf = false;\n };\n\n Component.prototype.fire = function fire(type, data) {\n var _this = this;\n\n Object.keys(this.props).every(function (key) {\n if ('on' + type.toLowerCase() === key.toLowerCase()) {\n _this.props[key]({ detail: data });\n return false;\n }\n return true;\n });\n };\n\n Component.prototype.render = function render() {};\n\n return Component;\n}();\n\nComponent.is = 'WeElement';\n\n/*\n * obaa 2.1.0\n * By dntzhang\n * Github: https://github.com/Tencent/omi/tree/master/packages/obaa\n * MIT Licensed.\n */\n\n// $_r_: root\n// $_c_: prop change callback\n// $_p_: path\n\nfunction obaa(target, arr, callback) {\n\n\tvar eventPropArr = [];\n\tif (isArray$1(target)) {\n\t\tif (target.length === 0) {\n\t\t\ttarget.$_o_ = {\n\t\t\t\t$_r_: target,\n\t\t\t\t$_p_: '#'\n\t\t\t};\n\t\t}\n\t\tmock(target, target);\n\t}\n\tif (target && typeof target === 'object' && Object.keys(target).length === 0) {\n\t\ttrack(target);\n\t\ttarget.$_o_.$_r_ = target;\n\t}\n\tfor (var prop in target) {\n\t\tif (target.hasOwnProperty(prop)) {\n\t\t\tif (callback) {\n\t\t\t\tif (isArray$1(arr) && isInArray(arr, prop)) {\n\t\t\t\t\teventPropArr.push(prop);\n\t\t\t\t\twatch(target, prop, null, target);\n\t\t\t\t} else if (isString(arr) && prop == arr) {\n\t\t\t\t\teventPropArr.push(prop);\n\t\t\t\t\twatch(target, prop, null, target);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\teventPropArr.push(prop);\n\t\t\t\twatch(target, prop, null, target);\n\t\t\t}\n\t\t}\n\t}\n\tif (!target.$_c_) {\n\t\ttarget.$_c_ = [];\n\t}\n\tvar propChanged = callback ? callback : arr;\n\ttarget.$_c_.push({\n\t\tall: !callback,\n\t\tpropChanged: propChanged,\n\t\teventPropArr: eventPropArr\n\t});\n}\n\nvar triggerStr = ['concat', 'copyWithin', 'fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift', 'size'].join(',');\n\nvar methods = ['concat', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values', 'size'];\n\nfunction mock(target, root) {\n\tmethods.forEach(function (item) {\n\t\ttarget[item] = function () {\n\t\t\tvar old = Array.prototype.slice.call(this, 0);\n\t\t\tvar result = Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));\n\t\t\tif (new RegExp('\\\\b' + item + '\\\\b').test(triggerStr)) {\n\t\t\t\tfor (var cprop in this) {\n\t\t\t\t\tif (this.hasOwnProperty(cprop) && !isFunction(this[cprop])) {\n\t\t\t\t\t\twatch(this, cprop, this.$_o_.$_p_, root);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//todo\n\t\t\t\tonPropertyChanged('Array-' + item, this, old, this, this.$_o_.$_p_, root);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\ttarget['pure' + item.substring(0, 1).toUpperCase() + item.substring(1)] = function () {\n\t\t\treturn Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));\n\t\t};\n\t});\n}\n\nfunction watch(target, prop, path, root) {\n\tif (prop === '$_o_') return;\n\tif (isFunction(target[prop])) return;\n\tif (!target.$_o_) target.$_o_ = {\n\t\t$_r_: root\n\t};\n\tif (path !== undefined && path !== null) {\n\t\ttarget.$_o_.$_p_ = path;\n\t} else {\n\t\ttarget.$_o_.$_p_ = '#';\n\t}\n\n\tvar currentValue = target.$_o_[prop] = target[prop];\n\tObject.defineProperty(target, prop, {\n\t\tget: function get() {\n\t\t\treturn this.$_o_[prop];\n\t\t},\n\t\tset: function set(value) {\n\t\t\tvar old = this.$_o_[prop];\n\t\t\tthis.$_o_[prop] = value;\n\t\t\tonPropertyChanged(prop, value, old, this, target.$_o_.$_p_, root);\n\t\t},\n\t\tconfigurable: true,\n\t\tenumerable: true\n\t});\n\tif (typeof currentValue == 'object') {\n\t\tif (isArray$1(currentValue)) {\n\t\t\tmock(currentValue, root);\n\t\t\tif (currentValue.length === 0) {\n\t\t\t\ttrack(currentValue, prop, path);\n\t\t\t}\n\t\t}\n\t\tif (currentValue && Object.keys(currentValue).length === 0) {\n\t\t\ttrack(currentValue, prop, path);\n\t\t}\n\t\tfor (var cprop in currentValue) {\n\t\t\tif (currentValue.hasOwnProperty(cprop)) {\n\t\t\t\twatch(currentValue, cprop, target.$_o_.$_p_ + '-' + prop, root);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction track(obj, prop, path) {\n\tif (obj.$_o_) {\n\t\treturn;\n\t}\n\tobj.$_o_ = {};\n\tif (path !== undefined && path !== null) {\n\t\tobj.$_o_.$_p_ = path + '-' + prop;\n\t} else {\n\t\tif (prop !== undefined && prop !== null) {\n\t\t\tobj.$_o_.$_p_ = '#' + '-' + prop;\n\t\t} else {\n\t\t\tobj.$_o_.$_p_ = '#';\n\t\t}\n\t}\n}\n\nfunction onPropertyChanged(prop, value, oldValue, target, path, root) {\n\tif (value !== oldValue && !(nan(value) && nan(oldValue)) && root.$_c_) {\n\t\tvar rootName = getRootName(prop, path);\n\t\tfor (var i = 0, len = root.$_c_.length; i < len; i++) {\n\t\t\tvar handler = root.$_c_[i];\n\t\t\tif (handler.all || isInArray(handler.eventPropArr, rootName) || rootName.indexOf('Array-') === 0) {\n\t\t\t\thandler.propChanged.call(target, prop, value, oldValue, path);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (prop.indexOf('Array-') !== 0 && typeof value === 'object') {\n\t\twatch(target, prop, target.$_o_.$_p_, root);\n\t}\n}\n\nfunction isFunction(obj) {\n\treturn Object.prototype.toString.call(obj) == '[object Function]';\n}\n\nfunction nan(value) {\n\treturn typeof value === \"number\" && isNaN(value);\n}\n\nfunction isArray$1(obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Array]';\n}\n\nfunction isString(obj) {\n\treturn typeof obj === 'string';\n}\n\nfunction isInArray(arr, item) {\n\tfor (var i = arr.length; --i > -1;) {\n\t\tif (item === arr[i]) return true;\n\t}\n\treturn false;\n}\n\nfunction getRootName(prop, path) {\n\tif (path === '#') {\n\t\treturn prop;\n\t}\n\treturn path.split('-')[1];\n}\n\nobaa.add = function (obj, prop) {\n\twatch(obj, prop, obj.$_o_.$_p_, obj.$_o_.$_r_);\n};\n\nobaa.set = function (obj, prop, value) {\n\tif (obj[prop] === undefined) {\n\t\twatch(obj, prop, obj.$_o_.$_p_, obj.$_o_.$_r_);\n\t}\n\tobj[prop] = value;\n};\n\nArray.prototype.size = function (length) {\n\tthis.length = length;\n};\n\n/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {object} [store]\n *\t@public\n */\nfunction render(vnode, parent, store, empty, merge) {\n parent = typeof parent === 'string' ? document.querySelector(parent) : parent;\n\n if (store) {\n if (store.data) {\n obsStore(store);\n } else {\n options.isMultiStore = true;\n for (var key in store) {\n if (store[key].data) {\n obsStore(store[key], key);\n }\n }\n }\n }\n\n if (empty) {\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n }\n\n if (merge) {\n merge = typeof merge === 'string' ? document.querySelector(merge) : merge;\n }\n\n return diff(merge, vnode, store, false, parent, false);\n}\n\nfunction obsStore(store, storeName) {\n\n store.instances = [];\n store.updateSelfInstances = [];\n extendStoreUpate(store, storeName);\n\n obaa(store.data, function (prop, val, old, path) {\n var patchs = {};\n var key = fixPath(path + '-' + prop);\n patchs[key] = true;\n store.update(patchs);\n });\n}\n\nfunction merge(vnode, merge, store) {\n obsStore(store);\n\n merge = typeof merge === 'string' ? document.querySelector(merge) : merge;\n\n return diff(merge, vnode, store);\n}\n\nfunction extendStoreUpate(store, key) {\n store.update = function (patch) {\n if (Object.keys(patch).length > 0) {\n this.instances.forEach(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key])) {\n if (instance.use) {\n getUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key);\n }\n\n instance.update();\n }\n } else {\n if (instance._updatePath && needUpdate(patch, instance._updatePath)) {\n if (instance.use) {\n instance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use);\n }\n instance.update();\n }\n }\n });\n\n this.updateSelfInstances.forEach(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key])) {\n if (instance.useSelf) {\n getUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key);\n }\n\n instance.updateSelf();\n }\n } else {\n if (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n instance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf);\n instance.updateSelf();\n }\n }\n });\n\n this.onChange && this.onChange(patch);\n }\n };\n}\n\nfunction compute(instance, isMultiStore) {\n if (instance.compute) {\n for (var ck in instance.compute) {\n instance.computed[ck] = instance.compute[ck].call(isMultiStore ? instance.store : instance.store.data);\n }\n }\n}\n\nfunction needUpdate(diffResult, updatePath) {\n for (var keyA in diffResult) {\n if (updatePath[keyA]) {\n return true;\n }\n for (var keyB in updatePath) {\n if (includePath(keyA, keyB)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction includePath(pathA, pathB) {\n if (pathA.indexOf(pathB) === 0) {\n var next = pathA.substr(pathB.length, 1);\n if (next === '[' || next === '.') {\n return true;\n }\n }\n return false;\n}\n\nfunction fixPath(path) {\n var mpPath = '';\n var arr = path.replace('#-', '').split('-');\n arr.forEach(function (item, index) {\n if (index) {\n if (isNaN(Number(item))) {\n mpPath += '.' + item;\n } else {\n mpPath += '[' + item + ']';\n }\n } else {\n mpPath += item;\n }\n });\n return mpPath;\n}\n\nfunction _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar storeHelpers = ['use', 'useSelf'];\n\nfunction define(name, ctor, config) {\n\tif (ctor.is === 'WeElement') {\n\t\toptions.mapping[name] = ctor;\n\t} else {\n\n\t\tif (typeof config === 'string') {\n\t\t\tconfig = { css: config };\n\t\t} else {\n\t\t\tconfig = config || {};\n\t\t}\n\n\t\tvar Comp = function (_Component) {\n\t\t\t_inherits(Comp, _Component);\n\n\t\t\tfunction Comp() {\n\t\t\t\tvar _temp, _this, _ret;\n\n\t\t\t\t_classCallCheck$1(this, Comp);\n\n\t\t\t\tfor (var _len = arguments.length, args = Array(_len), key = 0; key < _len; key++) {\n\t\t\t\t\targs[key] = arguments[key];\n\t\t\t\t}\n\n\t\t\t\treturn _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.compute = config.compute, _temp), _possibleConstructorReturn(_this, _ret);\n\t\t\t}\n\n\t\t\tComp.prototype.render = function render() {\n\t\t\t\treturn ctor.call(this, this);\n\t\t\t};\n\n\t\t\treturn Comp;\n\t\t}(Component);\n\n\t\tComp.css = config.css;\n\t\tComp.propTypes = config.propTypes;\n\t\tComp.defaultProps = config.defaultProps;\n\n\t\tvar _loop = function _loop(key) {\n\t\t\tif (typeof config[key] === 'function') {\n\t\t\t\tComp.prototype[key] = function () {\n\t\t\t\t\treturn config[key].apply(this, arguments);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\tfor (var key in config) {\n\t\t\t_loop(key);\n\t\t}\n\n\t\tstoreHelpers.forEach(function (func) {\n\t\t\tif (config[func] && config[func] !== 'function') {\n\t\t\t\tComp.prototype[func] = function () {\n\t\t\t\t\treturn config[func];\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\n\t\toptions.mapping[name] = Comp;\n\t}\n}\n\nfunction rpx(str) {\n return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, function (a, b) {\n return window.innerWidth * Number(b) / 750 + 'px';\n });\n}\n\nfunction tag(name) {\n return function (target) {\n define(name, target);\n };\n}\n\n/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty;\n\nfunction classNames() {\n var classes = [];\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n if (!arg) continue;\n\n var argType = typeof arg;\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg);\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg);\n if (inner) {\n classes.push(inner);\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(' ');\n}\n\nfunction extractClass() {\n var _Array$prototype$slic = Array.prototype.slice.call(arguments, 0),\n props = _Array$prototype$slic[0],\n args = _Array$prototype$slic.slice(1);\n\n if (props) {\n if (props['class']) {\n args.unshift(props['class']);\n delete props['class'];\n } else if (props.className) {\n args.unshift(props.className);\n delete props.className;\n }\n }\n if (args.length > 0) {\n return { 'class': classNames.apply(null, args) };\n }\n}\n\nfunction getHost(component) {\n var base = component.base;\n if (base) {\n while (base.parentNode) {\n if (base.parentNode._component) {\n return base.parentNode._component;\n } else {\n base = base.parentNode;\n }\n }\n }\n}\n\n/**\n * preact-render-to-string based on preact-render-to-string\n * by Jason Miller\n * Licensed under the MIT License\n * https://github.com/developit/preact-render-to-string\n *\n * modified by dntzhang\n */\n\nvar encodeEntities = function encodeEntities(s) {\n return String(s).replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"');\n};\n\nvar indent = function indent(s, char) {\n return String(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n};\n\nvar mapping$1 = options.mapping;\n\nvar VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nvar isLargeString = function isLargeString(s, length, ignoreLines) {\n return String(s).length > (length || 40) || !ignoreLines && String(s).indexOf('\\n') !== -1 || String(s).indexOf('<') !== -1;\n};\n\nvar JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nfunction styleObjToCss(s) {\n var str = '';\n for (var prop in s) {\n var val = s[prop];\n if (val != null) {\n if (str) str += ' ';\n // str += jsToCss(prop);\n str += JS_TO_CSS[prop] || (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n str += ': ';\n str += val;\n if (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n str += 'px';\n }\n str += ';';\n }\n }\n return str || undefined;\n}\n\nfunction renderToString(vnode, opts, store, isSvgMode) {\n store = store || {};\n opts = Object.assign({\n scopedCSS: true\n }, opts);\n var css = {};\n var html = _renderToString(vnode, opts, store, isSvgMode, css);\n return {\n css: Object.values(css),\n html: html\n };\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, opts, store, isSvgMode, css) {\n if (vnode == null || typeof vnode === 'boolean') {\n return '';\n }\n\n var nodeName = vnode.nodeName,\n attributes = vnode.attributes,\n isComponent = false;\n\n var pretty = true && opts.pretty,\n indentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n // #text nodes\n if (typeof vnode !== 'object' && !nodeName) {\n return encodeEntities(vnode);\n }\n\n // components\n var ctor = mapping$1[nodeName];\n if (ctor) {\n isComponent = true;\n\n var props = getNodeProps$1(vnode),\n rendered;\n // class-based components\n var c = new ctor(props, store);\n // turn off stateful re-rendering:\n c._disable = c.__x = true;\n c.props = props;\n c.store = store;\n if (c.install) c.install();\n if (c.beforeRender) c.beforeRender();\n rendered = c.render(c.props, c.store);\n\n if (opts.scopedCSS) {\n\n if (c.constructor.css || c.css) {\n\n var cssStr = c.constructor.css ? c.constructor.css : typeof c.css === 'function' ? c.css() : c.css;\n var cssAttr = '_s' + getCtorName(c.constructor);\n css[cssAttr] = {\n id: cssAttr,\n css: scoper(cssStr, cssAttr)\n };\n addScopedAttrStatic(rendered, cssAttr);\n }\n\n c.scopedCSSAttr = vnode.css;\n scopeHost(rendered, c.scopedCSSAttr);\n }\n\n return _renderToString(rendered, opts, store, false, css);\n }\n\n // render JSX to HTML\n var s = '',\n html;\n\n if (attributes) {\n var attrs = Object.keys(attributes);\n\n // allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n if (opts && opts.sortAttributes === true) attrs.sort();\n\n for (var i = 0; i < attrs.length; i++) {\n var name = attrs[i],\n v = attributes[name];\n if (name === 'children') continue;\n\n if (name.match(/[\\s\\n\\\\/='\"\\0<>]/)) continue;\n\n if (!(opts && opts.allAttributes) && (name === 'key' || name === 'ref')) continue;\n\n if (name === 'className') {\n if (attributes['class']) continue;\n name = 'class';\n } else if (isSvgMode && name.match(/^xlink:?./)) {\n name = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n }\n\n if (name === 'style' && v && typeof v === 'object') {\n v = styleObjToCss(v);\n }\n\n var hooked = opts.attributeHook && opts.attributeHook(name, v, store, opts, isComponent);\n if (hooked || hooked === '') {\n s += hooked;\n continue;\n }\n\n if (name === 'dangerouslySetInnerHTML') {\n html = v && v.__html;\n } else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n if (v === true || v === '') {\n v = name;\n // in non-xml mode, allow boolean attributes\n if (!opts || !opts.xml) {\n s += ' ' + name;\n continue;\n }\n }\n s += ' ' + name + '=\"' + encodeEntities(v) + '\"';\n }\n }\n }\n\n // account for >1 multiline attribute\n if (pretty) {\n var sub = s.replace(/^\\n\\s*/, ' ');\n if (sub !== s && !~sub.indexOf('\\n')) s = sub;else if (pretty && ~s.indexOf('\\n')) s += '\\n';\n }\n\n s = '<' + nodeName + s + '>';\n if (String(nodeName).match(/[\\s\\n\\\\/='\"\\0<>]/)) throw s;\n\n var isVoid = String(nodeName).match(VOID_ELEMENTS);\n if (isVoid) s = s.replace(/>$/, ' />');\n\n var pieces = [];\n if (html) {\n // if multiline, indent.\n if (pretty && isLargeString(html)) {\n html = '\\n' + indentChar + indent(html, indentChar);\n }\n s += html;\n } else if (vnode.children) {\n var hasLarge = pretty && ~s.indexOf('\\n');\n for (var i = 0; i < vnode.children.length; i++) {\n var child = vnode.children[i];\n if (child != null && child !== false) {\n var childSvgMode = nodeName === 'svg' ? true : nodeName === 'foreignObject' ? false : isSvgMode,\n ret = _renderToString(child, opts, store, childSvgMode, css);\n if (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n if (ret) pieces.push(ret);\n }\n }\n if (pretty && hasLarge) {\n for (var i = pieces.length; i--;) {\n pieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n }\n }\n }\n\n if (pieces.length) {\n s += pieces.join('');\n } else if (opts && opts.xml) {\n return s.substring(0, s.length - 1) + ' />';\n }\n\n if (!isVoid) {\n if (pretty && ~s.indexOf('\\n')) s += '\\n';\n s += '';\n }\n\n return s;\n}\n\nfunction assign$1(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\nfunction getNodeProps$1(vnode) {\n var props = assign$1({}, vnode.attributes);\n props.children = vnode.children;\n\n var defaultProps = vnode.nodeName.defaultProps;\n if (defaultProps !== undefined) {\n for (var i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i];\n }\n }\n }\n\n return props;\n}\n\nh.f = Fragment;\n\nvar html = htm.bind(h);\n\nvar WeElement = Component;\nvar defineElement = define;\nfunction createRef() {\n return {};\n}\n\noptions.root.Omi = {\n h: h,\n createElement: h,\n cloneElement: cloneElement,\n createRef: createRef,\n Component: Component,\n render: render,\n rerender: rerender,\n options: options,\n WeElement: WeElement,\n define: define,\n rpx: rpx,\n defineElement: defineElement,\n classNames: classNames,\n extractClass: extractClass,\n getHost: getHost,\n renderToString: renderToString,\n tag: tag,\n merge: merge,\n html: html,\n htm: htm,\n obaa: obaa\n};\noptions.root.omi = options.root.Omi;\noptions.root.Omi.version = 'omio-2.8.0';\n\nvar omi = {\n h: h,\n createElement: h,\n cloneElement: cloneElement,\n createRef: createRef,\n Component: Component,\n render: render,\n rerender: rerender,\n options: options,\n WeElement: WeElement,\n define: define,\n rpx: rpx,\n defineElement: defineElement,\n classNames: classNames,\n extractClass: extractClass,\n getHost: getHost,\n renderToString: renderToString,\n tag: tag,\n merge: merge,\n html: html,\n htm: htm,\n obaa: obaa\n};\n\nexport default omi;\nexport { h, h as createElement, cloneElement, createRef, Component, render, rerender, options, WeElement, define, rpx, defineElement, classNames, extractClass, getHost, renderToString, tag, merge, html, obaa };\n//# sourceMappingURL=omi.esm.js.map\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/omio/dist/omi.esm.js","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/css-loader/lib/css-base.js","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n\n// WEBPACK FOOTER //\n// (webpack)/buildin/global.js","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/core.js","'use strict';\n\nif (typeof Promise === 'undefined') {\n // Rejection tracking prevents a common issue where React gets into an\n // inconsistent state due to an error, but it gets swallowed by a Promise,\n // and the user has no idea what causes React's erratic future behavior.\n require('promise/lib/rejection-tracking').enable();\n window.Promise = require('promise/lib/es6-extensions.js');\n}\n\n// fetch() polyfill for making API calls.\nrequire('whatwg-fetch');\n\n// Object.assign() is commonly used with React.\n// It will use the native implementation if it's present and isn't buggy.\nObject.assign = require('object-assign');\n\n// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.\n// We don't polyfill it in the browser--this is user's responsibility.\nif (process.env.NODE_ENV === 'test') {\n require('raf').polyfill(global);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./config/polyfills.js","'use strict';\n\nvar Promise = require('./core');\n\nvar DEFAULT_WHITELIST = [\n ReferenceError,\n TypeError,\n RangeError\n];\n\nvar enabled = false;\nexports.disable = disable;\nfunction disable() {\n enabled = false;\n Promise._47 = null;\n Promise._71 = null;\n}\n\nexports.enable = enable;\nfunction enable(options) {\n options = options || {};\n if (enabled) disable();\n enabled = true;\n var id = 0;\n var displayId = 0;\n var rejections = {};\n Promise._47 = function (promise) {\n if (\n promise._83 === 2 && // IS REJECTED\n rejections[promise._56]\n ) {\n if (rejections[promise._56].logged) {\n onHandled(promise._56);\n } else {\n clearTimeout(rejections[promise._56].timeout);\n }\n delete rejections[promise._56];\n }\n };\n Promise._71 = function (promise, err) {\n if (promise._75 === 0) { // not yet handled\n promise._56 = id++;\n rejections[promise._56] = {\n displayId: null,\n error: err,\n timeout: setTimeout(\n onUnhandled.bind(null, promise._56),\n // For reference errors and type errors, this almost always\n // means the programmer made a mistake, so log them after just\n // 100ms\n // otherwise, wait 2 seconds to see if they get handled\n matchWhitelist(err, DEFAULT_WHITELIST)\n ? 100\n : 2000\n ),\n logged: false\n };\n }\n };\n function onUnhandled(id) {\n if (\n options.allRejections ||\n matchWhitelist(\n rejections[id].error,\n options.whitelist || DEFAULT_WHITELIST\n )\n ) {\n rejections[id].displayId = displayId++;\n if (options.onUnhandled) {\n rejections[id].logged = true;\n options.onUnhandled(\n rejections[id].displayId,\n rejections[id].error\n );\n } else {\n rejections[id].logged = true;\n logError(\n rejections[id].displayId,\n rejections[id].error\n );\n }\n }\n }\n function onHandled(id) {\n if (rejections[id].logged) {\n if (options.onHandled) {\n options.onHandled(rejections[id].displayId, rejections[id].error);\n } else if (!rejections[id].onUnhandled) {\n console.warn(\n 'Promise Rejection Handled (id: ' + rejections[id].displayId + '):'\n );\n console.warn(\n ' This means you can ignore any previous messages of the form \"Possible Unhandled Promise Rejection\" with id ' +\n rejections[id].displayId + '.'\n );\n }\n }\n }\n}\n\nfunction logError(id, error) {\n console.warn('Possible Unhandled Promise Rejection (id: ' + id + '):');\n var errStr = (error && (error.stack || error)) + '';\n errStr.split('\\n').forEach(function (line) {\n console.warn(' ' + line);\n });\n}\n\nfunction matchWhitelist(error, list) {\n return list.some(function (cls) {\n return error instanceof cls;\n });\n}\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/rejection-tracking.js","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/asap/browser-raw.js","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/es6-extensions.js","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/whatwg-fetch/fetch.js","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/object-assign/index.js","var n=function(t,r,u,e){for(var p=1;p=5&&((e||!n&&5===u)&&(s.push(e,u,r),u=6),n&&(s.push(n,u,r),u=6)),e=\"\"},a=0;a\"===t?(u=1,e=\"\"):e=t+e[0]:p?t===p?p=\"\":e+=t:'\"'===t||\"'\"===t?p=t:\">\"===t?(h(),u=1):u&&(\"=\"===t?(u=5,r=e,e=\"\"):\"/\"===t&&(u<5||\">\"===n[a][f+1])?(h(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,2),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(h(),u=2):e+=t),3===u&&\"!--\"===e&&(u=4,s=s[0])}return h(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/htm/dist/htm.module.js","import { define, WeElement } from 'omi'\n\nimport './my-head'\nimport './my-content'\nimport './my-sidebar'\nimport './my-demo'\n\ndefine('my-frame', class extends WeElement {\n\n installed(){\n this.store.init()\n }\n\n render() {\n return (\n
\n \n
\n \n
\n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-frame.js","import { define, WeElement } from 'omi'\nimport logo from './omi-logo2019.svg'\n\ndefine('my-head', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position'\n ]\n\n toggleMenus = evt => {\n this.store.toogleSidebar()\n evt.stopPropagation()\n }\n\n hideSidebar = evt => {\n this.store.hideSidebar()\n }\n\n render() {\n return (\n
\n
\n \"\"\n
\n\n \n \n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-head/index.js","module.exports = __webpack_public_path__ + \"static/media/omi-logo2019.923166c3.svg\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/omi-logo2019.svg\n// module id = 14\n// module chunks = 8 9","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAqklEQVRoQ+2WQQ6AMAgE4f+Pxg+oSTNbDXR7Z5UZQpvR/GTz/w838LdBG7ABSMAjBAHichvACGHAXANVVRCOtDwzb2E/GnADUv4R5xkQA9wWN3cLbUMmDrYBMdDluLkGfJEtD8N7wXkXWfsREk/Atri5W2gbMnGwDYiBLsfNNdB+jbqB5Wn2U0KM7KO4uVvoI4D4MzaAEcIAG4AAcbkNYIQwwAYgQFze3sAFU6MwMZGH3LoAAAAASUVORK5CYII=\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/menu.png\n// module id = 15\n// module chunks = 8 9","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/_index.css\n// module id = 16\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".head{\\n position:fixed;\\n height:60px;\\n line-height: 60px;\\n border-bottom: 1px solid #eee;\\n width:100%;\\n background-color:#24292e;\\n z-index:100;\\n top: 0;\\n}\\n\\nul,li{\\n display: inline-block;\\n}\\n\\n.logo_box{\\n width:100px;\\n display: inline-block;\\n text-align:center;\\n line-height: 60px;\\n}\\n\\n.menu a,.logo_box a{\\n display: inline-block;\\n height:60px;\\n color: white;\\n}\\n\\n.menu{\\n position: absolute;\\n right:20px;\\n}\\n\\n.menu li{\\n margin-left:15px;\\n}\\n\\n.logo_box a{\\n font-size: 34px;\\n font-weight: bold;\\n color: #00bff3;\\n padding: 0px 15px;\\n line-height: 60px;\\n cursor: pointer;\\n}\\n\\n.menu a:hover{\\n color: white;\\n}\\n\\n.m_menu{\\n position:fixed;\\n display:none;\\n cursor: pointer;\\n}\\n\\n.menu li{\\n display:inline-block;\\n}\\n\\n.logo{\\n width: 40px;\\n height: 40px;\\n margin-left: 10px;\\n margin-top: 10px;\\n cursor: pointer;\\n}\\n\\n@media only screen and (max-width: 800px) {\\n\\n .logo_box{\\n display:inline-block;\\n }\\n\\n .logo{\\n display: none;\\n }\\n\\n .head{\\n text-align:center;\\n }\\n\\n .m_menu{\\n top:0;\\n left:0;\\n display:block;\\n width:50px;\\n height:50px;\\n padding-top: 6px;\\n }\\n\\n .m_menu img{\\n width:30px;\\n }\\n\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-head/_index.css\n// module id = 17\n// module chunks = 8 9","import { define, WeElement } from 'omi'\nimport '../my-footer'\n\ndefine('my-content', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'html'\n ]\n\n install() {\n this.store.myContent = this\n }\n\n installed() {\n this.initCodeStyle()\n }\n\n afterUpdate() {\n this.initCodeStyle()\n }\n\n touchEnd = () => {\n this.store.hideSidebar()\n }\n\n initCodeStyle() {\n let codes = document.querySelectorAll('code')\n\n let codesArr = Array.prototype.slice.call(codes);\n let codeHlNumArr = []\n codesArr.forEach(code => {\n let arr = code.className.match(/{([\\S\\s]*)}/)\n let pre = code.parentNode\n //bug!\n arr && pre.setAttribute('data-line', arr[1])\n if (code.className) {\n pre.className = code.className\n\n const temp = code.className.match(/language-\\w*/g)[0]\n if (temp) {\n code.innerHTML = Prism.highlight(code.innerText, Prism.languages[temp.split('-')[1]], temp.split('-')[1])\n }\n } else {\n let pre = code.parentNode\n code.className = 'language-markup'\n pre.className = 'language-markup'\n code.innerHTML = Prism.highlight(code.innerText, Prism.languages.markup, 'markup')\n }\n // let hllNums = null\n // if (arr) {\n // let numArr = arr[0].replace(/[{|}]/g, '').split(',')\n // hllNums = this._arrToNumber(numArr)\n // }\n //codeHlNumArr.push(hllNums)\n })\n\n // codesArr.forEach((code, index) => {\n // let newP = document.createElement('div')\n // newP.className = '_code-ctn'\n // let pre = code.parentNode\n // let ctn = pre.parentNode\n // if (pre.nodeName === 'PRE') {\n // ctn.insertBefore(newP, pre)\n\n // let hl = document.createElement('div')\n // hl.className = '_hl'\n // newP.appendChild(hl)\n // newP.appendChild(pre)\n // let nums = codeHlNumArr[index]\n\n // let max = Math.max.apply(null, nums)\n\n // let inner = ''\n // for (let i = 0; i <= max; i++) {\n // if (nums.indexOf(i) == -1) {\n // inner += '
'\n // } else {\n // inner += '
'\n // }\n // }\n // hl.innerHTML = inner\n // }\n // })\n //fix line-highlight\n window.dispatchEvent(new Event('resize'));\n }\n\n _arrToNumber(numArr) {\n let arr = []\n numArr.forEach(item => {\n if (item.indexOf('-') !== -1) {\n const tempArr = item.split('-')\n const begin = Number(tempArr[0])\n const end = Number(tempArr[1])\n for (let i = begin; i < end + 1; i++) {\n arr.push(i)\n }\n } else {\n arr.push(Number(item))\n }\n })\n return arr\n }\n\n render() {\n return (\n
\n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-content/index.js","import { define, WeElement } from 'omi'\n\ndefine('my-footer', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position',\n 'menu'\n ]\n\n render() {\n const [\n position,\n menus\n ] = this.using\n const pre = this.store.getPre()\n const next = this.store.getNext()\n\n return (\n
\n {pre &&← {pre.name}}\n {next &&}\n
\n )\n }\n\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-footer/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-footer/_index.css\n// module id = 20\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".ft{\\n position: relative;\\n margin-top: 20px\\n}\\n\\n.pre{\\n position: absolute;\\n left:15px;\\n}\\n\\n.next{\\n position: absolute;\\n right: 15px;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-footer/_index.css\n// module id = 21\n// module chunks = 8 9","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-content/_index.css\n// module id = 22\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".content{\\n position: relative;\\n padding: 70px 30px;\\n max-width: 900px;\\n margin: 0 auto;\\n\\n}\\n\\n@media screen and (max-width: 1500px){\\n .content {\\n margin-left: 290px;\\n }\\n}\\n\\nh3{\\n color:#444444;\\n}\\n\\npre{\\n border: 1px solid #eee;\\n width: 100%;\\n}\\nli{\\n text-indent: 20px;\\n list-style:disc inside ;\\n}\\n\\n@media only screen and (max-width: 800px) {\\n .content{\\n margin-left: 0;\\n border-left: none;\\n padding: 70px 10px 70px 10px;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-content/_index.css\n// module id = 23\n// module chunks = 8 9","import { define, WeElement } from 'omi'\nimport '../my-list'\n\ndefine('my-sidebar', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'menus',\n 'sideBarShow',\n 'lan'\n ]\n\n render() {\n const [menus, sideBarShow, lan] = this.using\n\n return (\n
\n {menus[lan].map((menu, index) => (\n \n ))}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-sidebar/index.js","import { define, WeElement } from 'omi'\n\ndefine('my-list', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position'\n ]\n\n render(props) {\n const [position] = this.using\n\n return (\n
    \n
  • {props.menu.title}
  • \n {props.menu.list &&\n props.menu.list.map((item, subIndex) => {\n const cls = position[0] === props.index && position[1] === subIndex ? { class: 'current' } : null\n return
  • \n \n {item.name}\n \n
  • \n })}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-list/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-list/_index.css\n// module id = 26\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"li.title{\\n font-size: 14px;\\n font-weight: bold;\\n margin-bottom:10px;\\n margin-top:10px;\\n text-indent: 23px;\\n}\\nli{\\n margin-bottom:1px;\\n text-indent: 33px;\\n}\\nli a{\\n display:block;\\n font-size:14px;\\n height:30px;\\n line-height:30px;\\n color: black;\\n background-color:#eee;\\n}\\nli a.current,li a.current:hover{\\n background-color:#24292e;\\n color: white;\\n cursor: default;\\n}\\nli a:hover{\\n background-color:#f0f8ff;\\n}\\n\\n\\nul,li{\\n list-style:none;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-list/_index.css\n// module id = 27\n// module chunks = 8 9","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-sidebar/_index.css\n// module id = 28\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"@media only screen and (max-width: 800px) {\\n .list{\\n transform: translateX(-100%);\\n background-color:white;\\n left:0 !important;\\n -moz-transition: all .6s ease;\\n -o-transition: all .6s ease;\\n -webkit-transition: all .6s ease;\\n transition: all .6s ease;\\n width: 70% !important;\\n z-index: 100000;\\n border-right: none !important;\\n }\\n\\n .list.show {\\n -moz-transform: translateX(0%) translateZ(0);\\n -ms-transform: translateX(0%) translateZ(0);\\n -o-transform: translateX(0%) translateZ(0);\\n -webkit-transform: translateX(0%) translateZ(0);\\n transform: translateX(0%) translateZ(0);\\n }\\n}\\n\\n.list{\\n width: 261px;\\n text-indent: 20px;\\n border-right: 1px solid #eee;\\n overflow-x: hidden;\\n overflow-y: auto;\\n position:fixed;\\n top:60px;\\n background-color: white;\\n height: 100%;\\n border-right: 1px solid #ccc;\\n padding-bottom: 100px;\\n}\\n.version{\\n height:20px;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-sidebar/_index.css\n// module id = 29\n// module chunks = 8 9","import { define, WeElement } from 'omi'\nimport css from './_index.css'\n\ndefine('my-demo', class extends WeElement {\n install() {\n this.store.myDemo = this\n if(this.checkPc())\n this.show = true\n else\n this.show = false\n this.demo = this.store.demo\n }\n\n css() {\n return css\n }\n\n checkPc() {\n let userAgentInfo = navigator.userAgent\n let mp = [\"Android\", \"iPhone\", \"SymbianOS\", \"Windows Phone\", \"iPad\", \"iPod\"]\n for (let i = 0; i < mp.length; i++)\n if (userAgentInfo.indexOf(mp[i]) > 0)\n return false\n return true\n }\n\n onShow = () => {\n this.show = true\n this.update()\n }\n\n onClose = () => {\n this.show = false\n this.update()\n }\n \n render() {\n if(!this.demo) return\n return (\n
\n { this.show && }\n\n {!this.show &&
\n \n
}\n\n {this.show &&
\n \n
}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-demo/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/_index.css\n// module id = 31\n// module chunks = 8 9","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"iframe{\\n width: 750px;\\n height: 100%;\\n top: 60px;\\n right: 0;\\n position: fixed;\\n border: none;\\n z-index: 9999;\\n border-left: 2px solid #24292E;\\n}\\n\\n.switch{\\n width: 40px;\\n height: 40px;\\n background-color: #AA0000;\\n border-radius: 50%;\\n position: fixed;\\n right: 50px;\\n bottom: 50px;\\n cursor: pointer;\\n text-align: center;\\n z-index: 10000;\\n}\\n\\n.switch img{\\n width: 30px;\\n height: 30px;\\n margin-top:5px;\\n}\\n\\n.switch.close img{\\n margin-top:10px;\\n width: 20px;\\n height: 20px;\\n}\\n\\n\\n@media only screen and (max-width: 800px) {\\n iframe{\\n width: 100%;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-demo/_index.css\n// module id = 32\n// module chunks = 8 9","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/code.png\n// module id = 33\n// module chunks = 8 9","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/close.png\n// module id = 34\n// module chunks = 8 9","import config from '../docs/config.js'\nimport 'omi-router'\n\nclass Store {\n constructor(data) {\n this.data = {\n position: [-1, -1],\n menus: config.menus,\n lan: data.lan,\n html: '',\n sideBarShow: false\n }\n let id = 0\n this.map = {}\n this.positionMap = {}\n config.menus[this.data.lan].forEach((menu, index) => {\n menu.list.forEach((item, subIndex) => {\n item.id = id++\n item.position = [index, subIndex]\n this.map[item.id] = item\n item.index = index\n item.subIndex = subIndex\n this.positionMap[index+'-'+subIndex] = item\n })\n })\n this.preIndex = 0\n this.preSubIndex = 0\n }\n\n getNext(){\n const item = this.positionMap[this.data.position.join('-')]\n if(item){\n return this.map[item.id+1]\n }\n }\n\n getPre(){\n const item = this.positionMap[this.data.position.join('-')]\n if(item){\n return this.map[item.id-1]\n }\n }\n\n init() {\n this.remarkable = new Remarkable({ html: true })\n if (location.hash === \"\") {\n this.data.position = [0, 0]\n this.getMarkDown(this.data.menus[this.data.lan][0].list[0].md, this.data.lan, m => {\n this.data.html = this.remarkable.render(m)\n })\n }\n this.initRouter()\n }\n\n toogleSidebar() {\n this.data.sideBarShow = !this.data.sideBarShow\n }\n\n hideSidebar() {\n this.data.sideBarShow = false\n }\n\n initRouter() {\n const menus = this.data.menus[this.data.lan]\n menus.forEach(item => {\n item.list.forEach(subItem => {\n route('/' + subItem.md, evt => {\n menus[this.preIndex].list[this.preSubIndex].selected = false\n this.preIndex = evt.query.index\n this.preSubIndex = evt.query.subIndex\n this.data.position = [Number(evt.query.index), Number(evt.query.subIndex)]\n this.data.sideBarShow = false\n\n this.getMarkDown(subItem.md, this.data.lan, m => {\n this.data.html = this.remarkable.render(m)\n document.body.scrollTop = 0\n document.documentElement.scrollTop = 0\n })\n })\n })\n })\n }\n\n getMarkDown(name, lan, callback) {\n import('../docs/' + lan + '/' + name + '.md').then(m => {\n callback(m)\n })\n }\n}\n\nexport default Store\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/index.js","const config = {\n menus: {\n 'zh-cn': [\n {\n title: 'OMIU',\n list: [\n { name: '简介', md: 'introduction' }\n ]\n },\n {\n title: '基础组件',\n list: [\n { name: 'Button 按钮', md: 'button' },\n { name: 'Tabs 选项卡', md: 'tabs' },\n { name: 'Radio 单选框', md: 'radio' }\n ]\n }\n\n ],\n en: [\n {\n title: 'OMIU',\n list: [\n { name: 'Introduction', md: 'introduction' }\n ]\n },\n {\n title: 'Base',\n list: [\n { name: 'Button', md: 'button' },\n { name: 'Tabs', md: 'tabs' },\n { name: 'Radio', md: 'radio' }\n ]\n }\n ]\n }\n}\n\nexport default config\n\n\n\n// WEBPACK FOOTER //\n// ./src/docs/config.js","/*!\n * omi-router v2.1.0 by dntzhang\n * Router for Omi.\n * Github: https://github.com/Tencent/omi\n * MIT Licensed.\n */\n\nvar p2r = require('path-to-regexp')\nvar mapping = {}\nvar root = getGlobal()\n\nroot.route = route\nroot.route.params = null\nroot.historyLength = 0\n\nroot.route.to = function (path, data) {\n root.route._routeByTo = true\n root.route.data = data\n if (path[0] === '#') {\n location.hash = path\n } else {\n location.hash = '#' + path\n }\n}\n\nwindow.addEventListener('hashchange', change)\n\nfunction change(evt) {\n var byNative = false\n //need to fix a line by omi-link\n if(window.history.length === root.historyLength && !root.route._routeByTo){\n //keep alive mode\n byNative = true\n }\n root.route._routeByTo = false\n root.historyLength = window.history.length\n var prevent = false\n if (evt.type === 'hashchange' && root.route.before) {\n prevent = root.route.before(evt) === false\n }\n if (prevent) return\n var path = window.location.hash.replace('#', '')\n if(path === '') path = '/'\n var notFound = true\n Object.keys(mapping).every(function(key){\n var toArr = path.split('?')[0].match(mapping[key].reg)\n if (toArr) {\n var pathArr = key.match(mapping[key].reg)\n root.route.params = getParams(toArr, pathArr)\n root.route.query = getUrlParams(path)\n mapping[key].callback({\n params: root.route.params,\n query: getUrlParams(path),\n data: root.route.data,\n byNative: byNative\n })\n root.route.data = null\n notFound = false\n return false\n }\n return true\n })\n\n if (notFound) {\n mapping['*'] && mapping['*'].callback({ byNative: byNative })\n }\n\n if (evt.type === 'hashchange' && root.route.after) {\n root.route.after(evt)\n }\n}\n\ndocument.addEventListener('DOMContentLoaded', change)\n\nfunction getParams(toArr, pathArr) {\n var params = {}\n toArr.forEach(function (item, index) {\n if (index > 0) {\n params[pathArr[index].replace(':', '')] = item\n }\n })\n return params\n}\n\n\nexport default function route(path, callback) {\n mapping[path] = {\n callback: callback,\n reg: p2r(path)\n }\n}\n\nfunction getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function () {\n return this\n })()\n )\n }\n return global\n}\n\nfunction getUrlParams(url) {\n url = url.replace(/#.*$/, '')\n var queryArray = url.split(/[?&]/).slice(1)\n var i, args = {}\n for (i = 0; i < queryArray.length; i++) {\n var match = queryArray[i].match(/([^=]+)=([^=]+)/)\n if (match !== null) {\n args[match[1]] = decodeURIComponent(match[2])\n }\n }\n return args\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/omi-router/index.js","/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.match = match\nmodule.exports.regexpToFunction = regexpToFunction\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * Default configs.\n */\nvar DEFAULT_DELIMITER = '/'\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \":test(\\\\d+)?\" => [\"test\", \"\\d+\", undefined, \"?\"]\n // \"(\\\\d+)\" => [undefined, undefined, \"\\d+\", undefined]\n '(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = (options && options.delimiter) || DEFAULT_DELIMITER\n var whitelist = (options && options.whitelist) || undefined\n var pathEscaped = false\n var res\n\n while ((res = PATH_REGEXP.exec(str)) !== null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n pathEscaped = true\n continue\n }\n\n var prev = ''\n var name = res[2]\n var capture = res[3]\n var group = res[4]\n var modifier = res[5]\n\n if (!pathEscaped && path.length) {\n var k = path.length - 1\n var c = path[k]\n var matches = whitelist ? whitelist.indexOf(c) > -1 : true\n\n if (matches) {\n prev = c\n path = path.slice(0, k)\n }\n }\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n pathEscaped = false\n }\n\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var pattern = capture || group\n var delimiter = prev || defaultDelimiter\n\n tokens.push({\n name: name || key++,\n prefix: prev,\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n pattern: pattern\n ? escapeGroup(pattern)\n : '[^' + escapeString(delimiter === defaultDelimiter ? delimiter : (delimiter + defaultDelimiter)) + ']+?'\n })\n }\n\n // Push any remaining characters.\n if (path || index < str.length) {\n tokens.push(path + str.substr(index))\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Create path match function from `path-to-regexp` spec.\n */\nfunction match (str, options) {\n var keys = []\n var re = pathToRegexp(str, keys, options)\n return regexpToFunction(re, keys)\n}\n\n/**\n * Create a path match function from `path-to-regexp` output.\n */\nfunction regexpToFunction (re, keys) {\n return function (pathname, options) {\n var m = re.exec(pathname)\n if (!m) return false\n\n var path = m[0]\n var index = m.index\n var params = {}\n var decode = (options && options.decode) || decodeURIComponent\n\n for (var i = 1; i < m.length; i++) {\n if (m[i] === undefined) continue\n\n var key = keys[i - 1]\n\n if (key.repeat) {\n params[key.name] = m[i].split(key.delimiter).map(function (value) {\n return decode(value, key)\n })\n } else {\n params[key.name] = decode(m[i], key)\n }\n }\n\n return { path: path, index: index, params: params }\n }\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))\n }\n }\n\n return function (data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n var validate = options ? options.validate !== false : true\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$/()])/g, '\\\\$1')\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {Array=} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n if (!keys) return path\n\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n pattern: null\n })\n }\n }\n\n return path\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n return new RegExp('(?:' + parts.join('|') + ')', flags(options))\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n options = options || {}\n\n var strict = options.strict\n var start = options.start !== false\n var end = options.end !== false\n var delimiter = options.delimiter || DEFAULT_DELIMITER\n var endsWith = [].concat(options.endsWith || []).map(escapeString).concat('$').join('|')\n var route = start ? '^' : ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var capture = token.repeat\n ? '(?:' + token.pattern + ')(?:' + escapeString(token.delimiter) + '(?:' + token.pattern + '))*'\n : token.pattern\n\n if (keys) keys.push(token)\n\n if (token.optional) {\n if (!token.prefix) {\n route += '(' + capture + ')?'\n } else {\n route += '(?:' + escapeString(token.prefix) + '(' + capture + '))?'\n }\n } else {\n route += escapeString(token.prefix) + '(' + capture + ')'\n }\n }\n }\n\n if (end) {\n if (!strict) route += '(?:' + escapeString(delimiter) + ')?'\n\n route += endsWith === '$' ? '$' : '(?=' + endsWith + ')'\n } else {\n var endToken = tokens[tokens.length - 1]\n var isEndDelimited = typeof endToken === 'string'\n ? endToken[endToken.length - 1] === delimiter\n : endToken === undefined\n\n if (!strict) route += '(?:' + escapeString(delimiter) + '(?=' + endsWith + '))?'\n if (!isEndDelimited) route += '(?=' + escapeString(delimiter) + '|' + endsWith + ')'\n }\n\n return new RegExp(route, flags(options))\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (path instanceof RegExp) {\n return regexpToRegexp(path, keys)\n }\n\n if (Array.isArray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), keys, options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), keys, options)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/path-to-regexp/index.js","var map = {\n\t\"./en/button.md\": [\n\t\t40,\n\t\t7\n\t],\n\t\"./en/introduction.md\": [\n\t\t41,\n\t\t6\n\t],\n\t\"./en/radio.md\": [\n\t\t42,\n\t\t5\n\t],\n\t\"./en/tabs.md\": [\n\t\t43,\n\t\t4\n\t],\n\t\"./zh-cn/button.md\": [\n\t\t44,\n\t\t3\n\t],\n\t\"./zh-cn/introduction.md\": [\n\t\t45,\n\t\t2\n\t],\n\t\"./zh-cn/radio.md\": [\n\t\t46,\n\t\t1\n\t],\n\t\"./zh-cn/tabs.md\": [\n\t\t47,\n\t\t0\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tvar ids = map[req];\n\tif(!ids)\n\t\treturn Promise.reject(new Error(\"Cannot find module '\" + req + \"'.\"));\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__(ids[0]);\n\t});\n};\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 39;\nmodule.exports = webpackAsyncContext;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs lazy ^\\.\\/.*\\.md$\n// module id = 39\n// module chunks = 8 9","import { render } from 'omi'\nimport './assets/index.css'\nimport './elements/my-frame.js'\nimport Store from './store'\n\nrender(, '#root', new Store({ lan: 'en' }))\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js"],"sourceRoot":""} \ No newline at end of file diff --git a/components/docs/static/js/index.10e894a1.js b/components/docs/static/js/index.10e894a1.js new file mode 100644 index 000000000..48e0f1da8 --- /dev/null +++ b/components/docs/static/js/index.10e894a1.js @@ -0,0 +1,2 @@ +!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,r,i){for(var a,s,u=0,c=[];u2;)Ie.push(arguments[a]);for(t&&null!=t.children&&(Ie.length||Ie.push(t.children),delete t.children);Ie.length;)if((r=Ie.pop())&&void 0!==r.pop)for(a=r.length;a--;)Ie.push(r[a]);else"boolean"===typeof r&&(r=null),(i="function"!==typeof e)&&(null==r?r="":"number"===typeof r?r=String(r):"string"!==typeof r&&(i=!1)),i&&n?s[s.length-1]+=r:0===s.length?s=[r]:s.push(r),n=i;var u=new o;return u.nodeName=e,u.children=s,u.attributes=null==t?void 0:t,u.key=null==t?void 0:t.key,void 0!==Ue.vnode&&Ue.vnode(u),u}function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function s(e,t){for(var n,r,o=a(e),i=1;i2?[].slice.call(arguments,2):e.children)}function b(e){1==Qe.push(e)&&(Ue.debounceRendering||Ge)(v)}function v(){for(var e;e=Qe.pop();)X(e)}function g(e,t,n){if("string"===typeof t||"number"===typeof t)return void 0!==e.splitText;if("string"===typeof t.nodeName){var r=qe[t.nodeName];return r?n||e._componentConstructor===r:!e._componentConstructor&&_(e,t.nodeName)}return n||e._componentConstructor===t.nodeName}function _(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function w(e){var t=u({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function A(e,t){var n=t?Ue.doc.createElementNS("http://www.w3.org/2000/svg",e):Ue.doc.createElement(e);return n.normalizedNodeName=e,n}function x(e){for(var t=e.replace(/\/\*(.|\s)*?\*\//g," ").replace(/\s+/g," "),n={},r=t.match(/ ?(.*?) ?{([^}]*)}/)||[o,i,t],o=r[0],i=r[1],a=r[2],s=a.split(";").map(function(e){return e.split(":").map(function(e){return e&&e.trim()})}),u=s,u=Array.isArray(u),u=0,u=u||u[Symbol.iterator]();;){var c;if(u){if(u>=u.length)break;c=u[u++]}else{if(u=u.next(),u.done)break;c=u.value}var l=c,f=l[0],p=l[1];n[function(e){return e.replace(/\W+\w/g,function(e){return e.slice(-1).toUpperCase()})}(f)]=p}return n}function O(e){var t=e.parentNode;t&&t.removeChild(e)}function E(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)c(n,null),c(r,e);else if("class"!==t||o)if("style"===t)if(Ue.isWeb){if(r&&"string"!==typeof r&&"string"!==typeof n||(e.style.cssText=r||""),r&&"object"===("undefined"===typeof r?"undefined":Be(r))){if("string"!==typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"===typeof r[i]&&!1===We.test(i)?r[i]+"px":r[i]}}else{var a=n,s=r;"string"===typeof n&&(a=x(n)),"string"==typeof r&&(s=x(r));var u={},l=!1;if(a){for(var f in a)"object"!=("undefined"===typeof s?"undefined":Be(s))||f in s||(u[f]="",l=!0);for(var p in s)s[p]!==a[p]&&(u[p]=s[p],l=!0);l&&e.setStyles(u)}else e.setStyles(s)}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var d=t!==(t=t.replace(/Capture$/,"")),h=t.toLowerCase();t=(h in e?h:t).slice(2),r?n||(e.addEventListener(t,j,d),"tap"==t&&(e.addEventListener("touchstart",k,d),e.addEventListener("touchend",T,d))):(e.removeEventListener(t,j,d),"tap"==t&&(e.removeEventListener("touchstart",k,d),e.removeEventListener("touchend",T,d))),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)S(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var y=o&&t!==(t=t.replace(/^xlink:?/,""));null==r||!1===r?y?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!==typeof r&&(y?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function S(e,t,n){try{e[t]=n}catch(e){}}function j(e){return this._listeners[e.type](Ue.event&&Ue.event(e)||e)}function k(e){this.___touchX=e.touches[0].pageX,this.___touchY=e.touches[0].pageY,this.___scrollTop=document.body.scrollTop}function T(e){Math.abs(e.changedTouches[0].pageX-this.___touchX)<30&&Math.abs(e.changedTouches[0].pageY-this.___touchY)<30&&Math.abs(document.body.scrollTop-this.___scrollTop)<30&&this.dispatchEvent(new CustomEvent("tap",{detail:e}))}function C(e){for(var t=0,n=Ue.styleCache.length;t-1;)if(t===e[n])return!0;return!1}function ce(e,t){return"#"===t?e:t.split("-")[1]}function le(e,t,n,r,o){if(t="string"===typeof t?document.querySelector(t):t,n)if(n.data)fe(n);else{Ue.isMultiStore=!0;for(var i in n)n[i].data&&fe(n[i],i)}if(r)for(;t.firstChild;)t.removeChild(t.firstChild);return o&&(o="string"===typeof o?document.querySelector(o):o),$(o,e,n,!1,t,!1)}function fe(e,t){e.instances=[],e.updateSelfInstances=[],de(e,t),K(e.data,function(t,n,r,o){var i={};i[be(o+"-"+t)]=!0,e.update(i)})}function pe(e,t,n){return fe(n),t="string"===typeof t?document.querySelector(t):t,$(t,e,n)}function de(e,t){e.update=function(n){Object.keys(n).length>0&&(this.instances.forEach(function(r){he(r,t),t?r._updatePath&&r._updatePath[t]&&ye(n,r._updatePath[t])&&(r.use&&f(e.data,("function"===typeof r.use?r.use():r.use)[t],r.using,t),r.update()):r._updatePath&&ye(n,r._updatePath)&&(r.use&&(r.using=f(e.data,"function"===typeof r.use?r.use():r.use)),r.update())}),this.updateSelfInstances.forEach(function(r){he(r,t),t?r._updateSelfPath&&r._updateSelfPath[t]&&ye(n,r._updateSelfPath[t])&&(r.useSelf&&f(e.data,("function"===typeof r.useSelf?r.useSelf():r.useSelf)[t],r.usingSelf,t),r.updateSelf()):r._updateSelfPath&&ye(n,r._updateSelfPath)&&(r.usingSelf=f(e.data,"function"===typeof r.useSelf?r.useSelf():r.useSelf),r.updateSelf())}),this.onChange&&this.onChange(n))}}function he(e,t){if(e.compute)for(var n in e.compute)e.computed[n]=e.compute[n].call(t?e.store:e.store.data)}function ye(e,t){for(var n in e){if(t[n])return!0;for(var r in t)if(me(n,r))return!0}return!1}function me(e,t){if(0===e.indexOf(t)){var n=e.substr(t.length,1);if("["===n||"."===n)return!0}return!1}function be(e){var t="";return e.replace("#-","").split("-").forEach(function(e,n){n?isNaN(Number(e))?t+="."+e:t+="["+e+"]":t+=e}),t}function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":Be(t))&&"function"!==typeof t?e:t}function _e(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":Be(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function we(e,t,n){if("WeElement"===t.is)Ue.mapping[e]=t;else{n="string"===typeof n?{css:n}:n||{};var r=function(e){function r(){var t,o,i;ve(this,r);for(var a=arguments.length,s=Array(a),u=0;u0)return{class:Oe.apply(null,n)}}function Se(e){var t=e.base;if(t)for(;t.parentNode;){if(t.parentNode._component)return t.parentNode._component;t=t.parentNode}}function je(e){var t="";for(var n in e){var r=e[n];null!=r&&(t&&(t+=" "),t+=pt[n]||(pt[n]=n.replace(/([A-Z])/g,"-$1").toLowerCase()),t+=": ",t+=r,"number"===typeof r&&!1===IS_NON_DIMENSIONAL.test(n)&&(t+="px"),t+=";")}return t||void 0}function ke(e,t,n,r){n=n||{},t=Object.assign({scopedCSS:!0},t);var o={},i=Te(e,t,n,r,o);return{css:Object.values(o),html:i}}function Te(e,t,n,r,o){if(null==e||"boolean"===typeof e)return"";var i=e.nodeName,a=e.attributes,s=!1,u=t.pretty,c=u&&"string"===typeof u?u:"\t";if("object"!==("undefined"===typeof e?"undefined":Be(e))&&!i)return st(e);var l=ct[i];if(l){s=!0;var f,p=Pe(e),d=new l(p,n);if(d._disable=d.__x=!0,d.props=p,d.store=n,d.install&&d.install(),d.beforeRender&&d.beforeRender(),f=d.render(d.props,d.store),t.scopedCSS){if(d.constructor.css||d.css){var h=d.constructor.css?d.constructor.css:"function"===typeof d.css?d.css():d.css,y="_s"+C(d.constructor);o[y]={id:y,css:P(h,y)},M(f,y)}d.scopedCSSAttr=e.css,I(f,d.scopedCSSAttr)}return Te(f,t,n,!1,o)}var m,b="";if(a){var v=Object.keys(a);t&&!0===t.sortAttributes&&v.sort();for(var g=0;g]/)&&(t&&t.allAttributes||"key"!==_&&"ref"!==_))){if("className"===_){if(a.class)continue;_="class"}else r&&_.match(/^xlink:?./)&&(_=_.toLowerCase().replace(/^xlink:?/,"xlink:"));"style"===_&&w&&"object"===("undefined"===typeof w?"undefined":Be(w))&&(w=je(w));var A=t.attributeHook&&t.attributeHook(_,w,n,t,s);if(A||""===A)b+=A;else if("dangerouslySetInnerHTML"===_)m=w&&w.__html;else if((w||0===w||""===w)&&"function"!==typeof w){if((!0===w||""===w)&&(w=_,!t||!t.xml)){b+=" "+_;continue}b+=" "+_+'="'+st(w)+'"'}}}}if(u){var x=b.replace(/^\n\s*/," ");x===b||~x.indexOf("\n")?u&&~b.indexOf("\n")&&(b+="\n"):b=x}if(b="<"+i+b+">",String(i).match(/[\s\n\\\/='"\0<>]/))throw b;var O=String(i).match(lt);O&&(b=b.replace(/>$/," />"));var E=[];if(m)u&&ft(m)&&(m="\n"+c+ut(m,c)),b+=m;else if(e.children){for(var S=u&&~b.indexOf("\n"),g=0;g";return O||(u&&~b.indexOf("\n")&&(b+="\n"),b+=""),b}function Ce(e,t){for(var n in t)e[n]=t[n];return e}function Pe(e){var t=Ce({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function Ne(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.obaa=t.html=t.merge=t.tag=t.renderToString=t.getHost=t.extractClass=t.classNames=t.defineElement=t.rpx=t.define=t.WeElement=t.options=t.rerender=t.render=t.Component=t.createRef=t.cloneElement=t.createElement=t.h=t.htm=void 0;var Be="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me=n(10);Object.defineProperty(t,"htm",{enumerable:!0,get:function(){return r(Me).default}});var Re=r(Me),Ue={scopedStyle:!0,mapping:{},isWeb:!0,staticStyleMapping:{},doc:"object"===("undefined"===typeof document?"undefined":Be(document))?document:null,root:function(){return"object"===("undefined"===typeof e?"undefined":Be(e))&&e&&e.Math===Math&&e.Array===Array?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof e?e:function(){return this}()}(),styleCache:[],isMultiStore:!1},Ie=[],Le=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable;if("undefined"!==typeof Element&&!Element.prototype.addEventListener){var Fe=function(e){e||(e=window.event);for(var t=0,n=0,r=ze[e.type];n8&&(He=!0)}var Ge=He?Promise.resolve().then.bind(Promise.resolve()):setTimeout,We=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Qe=[],qe=Ue.mapping,Xe=0,Ze=[],Je=0,Ye=!1,Ke=!1,et={},tt=0,nt=function(){function e(t,n){Y(this,e),this.props=s({},this.constructor.defaultProps,t),this.elementId=tt++,this._preCss=null,this.store=n,this.computed={}}return e.prototype.update=function(e,t,n){this._willUpdate||(this._willUpdate=!0,n&&(this._renderCallbacks=this._renderCallbacks||[]).push(n),X(this,2),Ue.componentChange&&Ue.componentChange(this,this.base),this._willUpdate=!1)},e.prototype.updateSelf=function(){this._willUpdateSelf||(this._willUpdateSelf=!0,X(this,2,null,null,!0),this._willUpdateSelf=!1)},e.prototype.fire=function(e,t){var n=this;Object.keys(this.props).every(function(r){return"on"+e.toLowerCase()!==r.toLowerCase()||(n.props[r]({detail:t}),!1)})},e.prototype.render=function(){},e}();nt.is="WeElement";var rt=["concat","copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift","size"].join(","),ot=["concat","copyWithin","entries","every","fill","filter","find","findIndex","forEach","includes","indexOf","join","keys","lastIndexOf","map","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","toLocaleString","toString","unshift","values","size"];K.add=function(e,t){te(e,t,e.$_o_.$_p_,e.$_o_.$_r_)},K.set=function(e,t,n){void 0===e[t]&&te(e,t,e.$_o_.$_p_,e.$_o_.$_r_),e[t]=n},Array.prototype.size=function(e){this.length=e};var it=["use","useSelf"],at={}.hasOwnProperty,st=function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},ut=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"\t"))},ct=Ue.mapping,lt=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,ft=function(e,t,n){return String(e).length>(t||40)||!n&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},pt={};i.f=y;var dt=Re.default.bind(i),ht=nt,yt=we;Ue.root.Omi={h:i,createElement:i,cloneElement:m,createRef:Ne,Component:nt,render:le,rerender:v,options:Ue,WeElement:ht,define:we,rpx:Ae,defineElement:yt,classNames:Oe,extractClass:Ee,getHost:Se,renderToString:ke,tag:xe,merge:pe,html:dt,htm:Re.default,obaa:K},Ue.root.omi=Ue.root.Omi,Ue.root.Omi.version="omio-2.8.0";var mt={h:i,createElement:i,cloneElement:m,createRef:Ne,Component:nt,render:le,rerender:v,options:Ue,WeElement:ht,define:we,rpx:Ae,defineElement:yt,classNames:Oe,extractClass:Ee,getHost:Se,renderToString:ke,tag:xe,merge:pe,html:dt,htm:Re.default,obaa:K};t.default=mt,t.h=i,t.createElement=i,t.cloneElement=m,t.createRef=Ne,t.Component=nt,t.render=le,t.rerender=v,t.options=Ue,t.WeElement=ht,t.define=we,t.rpx=Ae,t.defineElement=yt,t.classNames=Oe,t.extractClass=Ee,t.getHost=Se,t.renderToString=ke,t.tag=xe,t.merge=pe,t.html=dt,t.obaa=K}).call(t,n(2))},function(e,t,n){"use strict";function r(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"===typeof btoa){var i=o(r);return[n].concat(r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function o(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"===typeof e&&(e=[[null,e,""]]);for(var r={},o=0;oc){for(var t=0,n=a.length-u;t-1?t:e}function d(e,t){t=t||{};var n=t.body;if(e instanceof d){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function y(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function m(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var b={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(b.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=function(e){return e&&DataView.prototype.isPrototypeOf(e)},_=ArrayBuffer.isView||function(e){return e&&v.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},b.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},f.call(d.prototype),f.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];m.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=d,e.Response=m,e.fetch=function(e,t){return new Promise(function(n,r){var o=new d(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new m(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&b.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:void 0)},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;c1?t:t[0]};var r=function e(t,n,r,o){for(var i=1;i=5&&((o||!e&&5===r)&&(a.push(o,r,n),r=6),e&&(a.push(e,r,n),r=6)),o=""},u=0;u"===t?(r=1,o=""):o=t+o[0]:i?t===i?i="":o+=t:'"'===t||"'"===t?i=t:">"===t?(s(),r=1):r&&("="===t?(r=5,n=o,o=""):"/"===t&&(r<5||">"===e[u][c+1])?(s(),3===r&&(a=a[0]),r=a,(a=a[0]).push(r,2),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),r=2):o+=t),3===r&&"!--"===o&&(r=4,a=a[0])}return s(),a},i="function"==typeof Map,a=i?new Map:{},s=i?function(e){var t=a.get(e);return t||a.set(e,t=o(e)),t}:function(e){for(var t="",n=0;n0)return!1;return!0}},{key:"render",value:function(){if(this.demo)return Omi.h("div",null,this.show&&Omi.h("iframe",{style:"height:"+(window.innerHeight-59)+"px",src:this.demo}),!this.show&&Omi.h("div",{class:"switch code",onClick:this.onShow},Omi.h("img",{src:n(33)})),this.show&&Omi.h("div",{class:"switch close",onClick:this.onClose},Omi.h("img",{src:n(34)})))}}]),t}(s.WeElement))},function(e,t,n){var r=n(32);e.exports="string"===typeof r?r:r.toString()},function(e,t,n){t=e.exports=n(1)(void 0),t.push([e.i,"iframe{\n width: 750px;\n height: 100%;\n top: 60px;\n right: 0;\n position: fixed;\n border: none;\n z-index: 9999;\n border-left: 2px solid #24292E;\n}\n\n.switch{\n width: 40px;\n height: 40px;\n background-color: #AA0000;\n border-radius: 50%;\n position: fixed;\n right: 50px;\n bottom: 50px;\n cursor: pointer;\n text-align: center;\n z-index: 10000;\n}\n\n.switch img{\n width: 30px;\n height: 30px;\n margin-top:5px;\n}\n\n.switch.close img{\n margin-top:10px;\n width: 20px;\n height: 20px;\n}\n\n\n@media only screen and (max-width: 800px) {\n iframe{\n width: 100%;\n }\n}\n",""])},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0&&(n[t[r].replace(":","")]=e)}),n}function i(e,t){c[e]={callback:t,reg:u(e)}}function a(e){e=e.replace(/#.*$/,"");var t,n=e.split(/[?&]/).slice(1),r={};for(t=0;t-1)&&(y=x,a=a.slice(0,A))}a&&(r.push(a),a="",f=!1);var O="+"===w||"*"===w,E="?"===w||"*"===w,S=g||_,j=y||s;r.push({name:m||o++,prefix:y,delimiter:j,optional:E,repeat:O,pattern:S?c(S):"[^"+u(j===s?j:j+s)+"]+?"})}}return(a||iHello!`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */function h(nodeName,attributes){var children=[],lastSimple,child,simple,i;for(i=arguments.length;i-->2;){stack.push(arguments[i]);}if(attributes&&attributes.children!=null){if(!stack.length)stack.push(attributes.children);delete attributes.children;}while(stack.length){if((child=stack.pop())&&child.pop!==undefined){for(i=child.length;i--;){stack.push(child[i]);}}else{if(typeof child==='boolean')child=null;if(simple=typeof nodeName!=='function'){if(child==null)child='';else if(typeof child==='number')child=String(child);else if(typeof child!=='string')simple=false;}if(simple&&lastSimple){children[children.length-1]+=child;}else if(children.length===0){children=[child];}else{children.push(child);}lastSimple=simple;}}var p=new VNode();p.nodeName=nodeName;p.children=children;p.attributes=attributes==null?undefined:attributes;p.key=attributes==null?undefined:attributes.key;// if a \"vnode hook\" is defined, pass every created VNode to it\nif(options.vnode!==undefined)options.vnode(p);return p;}/* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError('Object.assign cannot be called with null or undefined');}return Object(val);}function assign(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s8){usePromise=true;}}}var defer=usePromise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function isArray(obj){return Object.prototype.toString.call(obj)==='[object Array]';}function getUse(data,paths,out,name){var obj=[];paths.forEach(function(path,index){var isPath=typeof path==='string';if(isPath){obj[index]=getTargetByPath(data,path);}else{var key=Object.keys(path)[0];var value=path[key];if(typeof value==='string'){obj[index]=getTargetByPath(data,value);}else{var tempPath=value[0];if(typeof tempPath==='string'){var tempVal=getTargetByPath(data,tempPath);obj[index]=value[1]?value[1](tempVal):tempVal;}else{var args=[];tempPath.forEach(function(path){args.push(getTargetByPath(data,path));});obj[index]=value[1].apply(null,args);}}obj[key]=obj[index];}});out&&(out[name]=obj);return obj;}function getTargetByPath(origin,path){var arr=path.replace(/]/g,'').replace(/\\[/g,'.').split('.');var current=origin;for(var i=0,len=arr.length;i2?[].slice.call(arguments,2):vnode.children);}// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL$1=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;/** Managed queue of dirty components to be re-rendered */var items=[];function enqueueRender(component){if(items.push(component)==1){(options.debounceRendering||defer)(rerender);}}/** Rerender all enqueued dirty components */function rerender(){var p;while(p=items.pop()){renderComponent(p);}}var mapping=options.mapping;/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */function isSameNodeType(node,vnode,hydrating){if(typeof vnode==='string'||typeof vnode==='number'){return node.splitText!==undefined;}if(typeof vnode.nodeName==='string'){var ctor=mapping[vnode.nodeName];if(ctor){return hydrating||node._componentConstructor===ctor;}return!node._componentConstructor&&isNamedNode(node,vnode.nodeName);}return hydrating||node._componentConstructor===vnode.nodeName;}/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */function isNamedNode(node,nodeName){return node.normalizedNodeName===nodeName||node.nodeName.toLowerCase()===nodeName.toLowerCase();}/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */function getNodeProps(vnode){var props=extend({},vnode.attributes);props.children=vnode.children;var defaultProps=vnode.nodeName.defaultProps;if(defaultProps!==undefined){for(var i in defaultProps){if(props[i]===undefined){props[i]=defaultProps[i];}}}return props;}/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */function createNode(nodeName,isSvg){var node=isSvg?options.doc.createElementNS('http://www.w3.org/2000/svg',nodeName):options.doc.createElement(nodeName);node.normalizedNodeName=nodeName;return node;}function parseCSSText(cssText){var cssTxt=cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g,' ').replace(/\\s+/g,' ');var style={},_ref=cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt],a=_ref[0],b=_ref[1],rule=_ref[2];var cssToJs=function cssToJs(s){return s.replace(/\\W+\\w/g,function(match){return match.slice(-1).toUpperCase();});};var properties=rule.split(';').map(function(o){return o.split(':').map(function(x){return x&&x.trim();});});for(var i=properties,i=Array.isArray(i),i=0,i=i?i:i[Symbol.iterator]();;){var _ref3;if(i){if(i>=i.length)break;_ref3=i[i++];}else{i=i.next();if(i.done)break;_ref3=i.value;}var _ref2=_ref3;var property=_ref2[0];var value=_ref2[1];style[cssToJs(property)]=value;}return style;}/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */function removeNode(node){var parentNode=node.parentNode;if(parentNode)parentNode.removeChild(node);}/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */function setAccessor(node,name,old,value,isSvg){if(name==='className')name='class';if(name==='key'){// ignore\n}else if(name==='ref'){applyRef(old,null);applyRef(value,node);}else if(name==='class'&&!isSvg){node.className=value||'';}else if(name==='style'){if(options.isWeb){if(!value||typeof value==='string'||typeof old==='string'){node.style.cssText=value||'';}if(value&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'){if(typeof old!=='string'){for(var i in old){if(!(i in value))node.style[i]='';}}for(var i in value){node.style[i]=typeof value[i]==='number'&&IS_NON_DIMENSIONAL$1.test(i)===false?value[i]+'px':value[i];}}}else{var oldJson=old,currentJson=value;if(typeof old==='string'){oldJson=parseCSSText(old);}if(typeof value=='string'){currentJson=parseCSSText(value);}var result={},changed=false;if(oldJson){for(var key in oldJson){if((typeof currentJson==='undefined'?'undefined':_typeof(currentJson))=='object'&&!(key in currentJson)){result[key]='';changed=true;}}for(var ckey in currentJson){if(currentJson[ckey]!==oldJson[ckey]){result[ckey]=currentJson[ckey];changed=true;}}if(changed){node.setStyles(result);}}else{node.setStyles(currentJson);}}}else if(name==='dangerouslySetInnerHTML'){if(value)node.innerHTML=value.__html||'';}else if(name[0]=='o'&&name[1]=='n'){var useCapture=name!==(name=name.replace(/Capture$/,''));var nameLower=name.toLowerCase();name=(nameLower in node?nameLower:name).slice(2);if(value){if(!old){node.addEventListener(name,eventProxy,useCapture);if(name=='tap'){node.addEventListener('touchstart',touchStart,useCapture);node.addEventListener('touchend',touchEnd,useCapture);}}}else{node.removeEventListener(name,eventProxy,useCapture);if(name=='tap'){node.removeEventListener('touchstart',touchStart,useCapture);node.removeEventListener('touchend',touchEnd,useCapture);}}(node._listeners||(node._listeners={}))[name]=value;}else if(name!=='list'&&name!=='type'&&!isSvg&&name in node){setProperty(node,name,value==null?'':value);if(value==null||value===false)node.removeAttribute(name);}else{var ns=isSvg&&name!==(name=name.replace(/^xlink:?/,''));if(value==null||value===false){if(ns)node.removeAttributeNS('http://www.w3.org/1999/xlink',name.toLowerCase());else node.removeAttribute(name);}else if(typeof value!=='function'){if(ns)node.setAttributeNS('http://www.w3.org/1999/xlink',name.toLowerCase(),value);else node.setAttribute(name,value);}}}/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */function setProperty(node,name,value){try{node[name]=value;}catch(e){}}/** Proxy an event to hooked event handlers\n *\t@private\n */function eventProxy(e){return this._listeners[e.type](options.event&&options.event(e)||e);}function touchStart(e){this.___touchX=e.touches[0].pageX;this.___touchY=e.touches[0].pageY;this.___scrollTop=document.body.scrollTop;}function touchEnd(e){if(Math.abs(e.changedTouches[0].pageX-this.___touchX)<30&&Math.abs(e.changedTouches[0].pageY-this.___touchY)<30&&Math.abs(document.body.scrollTop-this.___scrollTop)<30){this.dispatchEvent(new CustomEvent('tap',{detail:e}));}}var styleId=0;function getCtorName(ctor){for(var i=0,len=options.styleCache.length;i-1;){if(item===arr[i])return true;}return false;}function getRootName(prop,path){if(path==='#'){return prop;}return path.split('-')[1];}obaa.add=function(obj,prop){watch(obj,prop,obj.$_o_.$_p_,obj.$_o_.$_r_);};obaa.set=function(obj,prop,value){if(obj[prop]===undefined){watch(obj,prop,obj.$_o_.$_p_,obj.$_o_.$_r_);}obj[prop]=value;};Array.prototype.size=function(length){this.length=length;};/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {object} [store]\n *\t@public\n */function render(vnode,parent,store,empty,merge){parent=typeof parent==='string'?document.querySelector(parent):parent;if(store){if(store.data){obsStore(store);}else{options.isMultiStore=true;for(var key in store){if(store[key].data){obsStore(store[key],key);}}}}if(empty){while(parent.firstChild){parent.removeChild(parent.firstChild);}}if(merge){merge=typeof merge==='string'?document.querySelector(merge):merge;}return diff(merge,vnode,store,false,parent,false);}function obsStore(store,storeName){store.instances=[];store.updateSelfInstances=[];extendStoreUpate(store,storeName);obaa(store.data,function(prop,val,old,path){var patchs={};var key=fixPath(path+'-'+prop);patchs[key]=true;store.update(patchs);});}function merge(vnode,merge,store){obsStore(store);merge=typeof merge==='string'?document.querySelector(merge):merge;return diff(merge,vnode,store);}function extendStoreUpate(store,key){store.update=function(patch){if(Object.keys(patch).length>0){this.instances.forEach(function(instance){compute(instance,key);if(key){if(instance._updatePath&&instance._updatePath[key]&&needUpdate(patch,instance._updatePath[key])){if(instance.use){getUse(store.data,(typeof instance.use==='function'?instance.use():instance.use)[key],instance.using,key);}instance.update();}}else{if(instance._updatePath&&needUpdate(patch,instance._updatePath)){if(instance.use){instance.using=getUse(store.data,typeof instance.use==='function'?instance.use():instance.use);}instance.update();}}});this.updateSelfInstances.forEach(function(instance){compute(instance,key);if(key){if(instance._updateSelfPath&&instance._updateSelfPath[key]&&needUpdate(patch,instance._updateSelfPath[key])){if(instance.useSelf){getUse(store.data,(typeof instance.useSelf==='function'?instance.useSelf():instance.useSelf)[key],instance.usingSelf,key);}instance.updateSelf();}}else{if(instance._updateSelfPath&&needUpdate(patch,instance._updateSelfPath)){instance.usingSelf=getUse(store.data,typeof instance.useSelf==='function'?instance.useSelf():instance.useSelf);instance.updateSelf();}}});this.onChange&&this.onChange(patch);}};}function compute(instance,isMultiStore){if(instance.compute){for(var ck in instance.compute){instance.computed[ck]=instance.compute[ck].call(isMultiStore?instance.store:instance.store.data);}}}function needUpdate(diffResult,updatePath){for(var keyA in diffResult){if(updatePath[keyA]){return true;}for(var keyB in updatePath){if(includePath(keyA,keyB)){return true;}}}return false;}function includePath(pathA,pathB){if(pathA.indexOf(pathB)===0){var next=pathA.substr(pathB.length,1);if(next==='['||next==='.'){return true;}}return false;}function fixPath(path){var mpPath='';var arr=path.replace('#-','').split('-');arr.forEach(function(item,index){if(index){if(isNaN(Number(item))){mpPath+='.'+item;}else{mpPath+='['+item+']';}}else{mpPath+=item;}});return mpPath;}function _classCallCheck$1(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");}return call&&((typeof call==='undefined'?'undefined':_typeof(call))===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+(typeof superClass==='undefined'?'undefined':_typeof(superClass)));}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var storeHelpers=['use','useSelf'];function define(name,ctor,config){if(ctor.is==='WeElement'){options.mapping[name]=ctor;}else{if(typeof config==='string'){config={css:config};}else{config=config||{};}var Comp=function(_Component){_inherits(Comp,_Component);function Comp(){var _temp,_this,_ret;_classCallCheck$1(this,Comp);for(var _len=arguments.length,args=Array(_len),key=0;key<_len;key++){args[key]=arguments[key];}return _ret=(_temp=(_this=_possibleConstructorReturn(this,_Component.call.apply(_Component,[this].concat(args))),_this),_this.compute=config.compute,_temp),_possibleConstructorReturn(_this,_ret);}Comp.prototype.render=function render(){return ctor.call(this,this);};return Comp;}(Component);Comp.css=config.css;Comp.propTypes=config.propTypes;Comp.defaultProps=config.defaultProps;var _loop=function _loop(key){if(typeof config[key]==='function'){Comp.prototype[key]=function(){return config[key].apply(this,arguments);};}};for(var key in config){_loop(key);}storeHelpers.forEach(function(func){if(config[func]&&config[func]!=='function'){Comp.prototype[func]=function(){return config[func];};}});options.mapping[name]=Comp;}}function rpx(str){return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g,function(a,b){return window.innerWidth*Number(b)/750+'px';});}function tag(name){return function(target){define(name,target);};}/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */var hasOwn={}.hasOwnProperty;function classNames(){var classes=[];for(var i=0;i0){return{'class':classNames.apply(null,args)};}}function getHost(component){var base=component.base;if(base){while(base.parentNode){if(base.parentNode._component){return base.parentNode._component;}else{base=base.parentNode;}}}}/**\n * preact-render-to-string based on preact-render-to-string\n * by Jason Miller\n * Licensed under the MIT License\n * https://github.com/developit/preact-render-to-string\n *\n * modified by dntzhang\n */var encodeEntities=function encodeEntities(s){return String(s).replace(/&/g,'&').replace(//g,'>').replace(/\"/g,'"');};var indent=function indent(s,char){return String(s).replace(/(\\n+)/g,'$1'+(char||'\\t'));};var mapping$1=options.mapping;var VOID_ELEMENTS=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;var isLargeString=function isLargeString(s,length,ignoreLines){return String(s).length>(length||40)||!ignoreLines&&String(s).indexOf('\\n')!==-1||String(s).indexOf('<')!==-1;};var JS_TO_CSS={};// Convert an Object style to a CSSText string\nfunction styleObjToCss(s){var str='';for(var prop in s){var val=s[prop];if(val!=null){if(str)str+=' ';// str += jsToCss(prop);\nstr+=JS_TO_CSS[prop]||(JS_TO_CSS[prop]=prop.replace(/([A-Z])/g,'-$1').toLowerCase());str+=': ';str+=val;if(typeof val==='number'&&IS_NON_DIMENSIONAL.test(prop)===false){str+='px';}str+=';';}}return str||undefined;}function renderToString(vnode,opts,store,isSvgMode){store=store||{};opts=Object.assign({scopedCSS:true},opts);var css={};var html=_renderToString(vnode,opts,store,isSvgMode,css);return{css:Object.values(css),html:html};}/** The default export is an alias of `render()`. */function _renderToString(vnode,opts,store,isSvgMode,css){if(vnode==null||typeof vnode==='boolean'){return'';}var nodeName=vnode.nodeName,attributes=vnode.attributes,isComponent=false;var pretty=true&&opts.pretty,indentChar=pretty&&typeof pretty==='string'?pretty:'\\t';// #text nodes\nif((typeof vnode==='undefined'?'undefined':_typeof(vnode))!=='object'&&!nodeName){return encodeEntities(vnode);}// components\nvar ctor=mapping$1[nodeName];if(ctor){isComponent=true;var props=getNodeProps$1(vnode),rendered;// class-based components\nvar c=new ctor(props,store);// turn off stateful re-rendering:\nc._disable=c.__x=true;c.props=props;c.store=store;if(c.install)c.install();if(c.beforeRender)c.beforeRender();rendered=c.render(c.props,c.store);if(opts.scopedCSS){if(c.constructor.css||c.css){var cssStr=c.constructor.css?c.constructor.css:typeof c.css==='function'?c.css():c.css;var cssAttr='_s'+getCtorName(c.constructor);css[cssAttr]={id:cssAttr,css:scoper(cssStr,cssAttr)};addScopedAttrStatic(rendered,cssAttr);}c.scopedCSSAttr=vnode.css;scopeHost(rendered,c.scopedCSSAttr);}return _renderToString(rendered,opts,store,false,css);}// render JSX to HTML\nvar s='',html;if(attributes){var attrs=Object.keys(attributes);// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\nif(opts&&opts.sortAttributes===true)attrs.sort();for(var i=0;i]/))continue;if(!(opts&&opts.allAttributes)&&(name==='key'||name==='ref'))continue;if(name==='className'){if(attributes['class'])continue;name='class';}else if(isSvgMode&&name.match(/^xlink:?./)){name=name.toLowerCase().replace(/^xlink:?/,'xlink:');}if(name==='style'&&v&&(typeof v==='undefined'?'undefined':_typeof(v))==='object'){v=styleObjToCss(v);}var hooked=opts.attributeHook&&opts.attributeHook(name,v,store,opts,isComponent);if(hooked||hooked===''){s+=hooked;continue;}if(name==='dangerouslySetInnerHTML'){html=v&&v.__html;}else if((v||v===0||v==='')&&typeof v!=='function'){if(v===true||v===''){v=name;// in non-xml mode, allow boolean attributes\nif(!opts||!opts.xml){s+=' '+name;continue;}}s+=' '+name+'=\"'+encodeEntities(v)+'\"';}}}// account for >1 multiline attribute\nif(pretty){var sub=s.replace(/^\\n\\s*/,' ');if(sub!==s&&!~sub.indexOf('\\n'))s=sub;else if(pretty&&~s.indexOf('\\n'))s+='\\n';}s='<'+nodeName+s+'>';if(String(nodeName).match(/[\\s\\n\\\\/='\"\\0<>]/))throw s;var isVoid=String(nodeName).match(VOID_ELEMENTS);if(isVoid)s=s.replace(/>$/,' />');var pieces=[];if(html){// if multiline, indent.\nif(pretty&&isLargeString(html)){html='\\n'+indentChar+indent(html,indentChar);}s+=html;}else if(vnode.children){var hasLarge=pretty&&~s.indexOf('\\n');for(var i=0;i';}if(!isVoid){if(pretty&&~s.indexOf('\\n'))s+='\\n';s+='';}return s;}function assign$1(obj,props){for(var i in props){obj[i]=props[i];}return obj;}function getNodeProps$1(vnode){var props=assign$1({},vnode.attributes);props.children=vnode.children;var defaultProps=vnode.nodeName.defaultProps;if(defaultProps!==undefined){for(var i in defaultProps){if(props[i]===undefined){props[i]=defaultProps[i];}}}return props;}h.f=Fragment;var html=_htm2.default.bind(h);var WeElement=Component;var defineElement=define;function createRef(){return{};}options.root.Omi={h:h,createElement:h,cloneElement:cloneElement,createRef:createRef,Component:Component,render:render,rerender:rerender,options:options,WeElement:WeElement,define:define,rpx:rpx,defineElement:defineElement,classNames:classNames,extractClass:extractClass,getHost:getHost,renderToString:renderToString,tag:tag,merge:merge,html:html,htm:_htm2.default,obaa:obaa};options.root.omi=options.root.Omi;options.root.Omi.version='omio-2.8.0';var omi={h:h,createElement:h,cloneElement:cloneElement,createRef:createRef,Component:Component,render:render,rerender:rerender,options:options,WeElement:WeElement,define:define,rpx:rpx,defineElement:defineElement,classNames:classNames,extractClass:extractClass,getHost:getHost,renderToString:renderToString,tag:tag,merge:merge,html:html,htm:_htm2.default,obaa:obaa};exports.default=omi;exports.h=h;exports.createElement=h;exports.cloneElement=cloneElement;exports.createRef=createRef;exports.Component=Component;exports.render=render;exports.rerender=rerender;exports.options=options;exports.WeElement=WeElement;exports.define=define;exports.rpx=rpx;exports.defineElement=defineElement;exports.classNames=classNames;exports.extractClass=extractClass;exports.getHost=getHost;exports.renderToString=renderToString;exports.tag=tag;exports.merge=merge;exports.html=html;exports.obaa=obaa;//# sourceMappingURL=omi.esm.js.map\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/// css base code, injected by the css-loader\nmodule.exports=function(useSourceMap){var list=[];// return the list of modules as css string\nlist.toString=function toString(){return this.map(function(item){var content=cssWithMappingToString(item,useSourceMap);if(item[2]){return\"@media \"+item[2]+\"{\"+content+\"}\";}else{return content;}}).join(\"\");};// import a list of modules into the list\nlist.i=function(modules,mediaQuery){if(typeof modules===\"string\")modules=[[null,modules,\"\"]];var alreadyImportedModules={};for(var i=0;icapacity){// Manually shift all values starting at the index back to the\n// beginning of the queue.\nfor(var scan=0,newLength=queue.length-index;scan-1;};}function normalizeName(name){if(typeof name!=='string'){name=String(name);}if(/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)){throw new TypeError('Invalid character in header field name');}return name.toLowerCase();}function normalizeValue(value){if(typeof value!=='string'){value=String(value);}return value;}// Build a destructive iterator for the value list\nfunction iteratorFor(items){var iterator={next:function next(){var value=items.shift();return{done:value===undefined,value:value};}};if(support.iterable){iterator[Symbol.iterator]=function(){return iterator;};}return iterator;}function Headers(headers){this.map={};if(headers instanceof Headers){headers.forEach(function(value,name){this.append(name,value);},this);}else if(Array.isArray(headers)){headers.forEach(function(header){this.append(header[0],header[1]);},this);}else if(headers){Object.getOwnPropertyNames(headers).forEach(function(name){this.append(name,headers[name]);},this);}}Headers.prototype.append=function(name,value){name=normalizeName(name);value=normalizeValue(value);var oldValue=this.map[name];this.map[name]=oldValue?oldValue+','+value:value;};Headers.prototype['delete']=function(name){delete this.map[normalizeName(name)];};Headers.prototype.get=function(name){name=normalizeName(name);return this.has(name)?this.map[name]:null;};Headers.prototype.has=function(name){return this.map.hasOwnProperty(normalizeName(name));};Headers.prototype.set=function(name,value){this.map[normalizeName(name)]=normalizeValue(value);};Headers.prototype.forEach=function(callback,thisArg){for(var name in this.map){if(this.map.hasOwnProperty(name)){callback.call(thisArg,this.map[name],name,this);}}};Headers.prototype.keys=function(){var items=[];this.forEach(function(value,name){items.push(name);});return iteratorFor(items);};Headers.prototype.values=function(){var items=[];this.forEach(function(value){items.push(value);});return iteratorFor(items);};Headers.prototype.entries=function(){var items=[];this.forEach(function(value,name){items.push([name,value]);});return iteratorFor(items);};if(support.iterable){Headers.prototype[Symbol.iterator]=Headers.prototype.entries;}function consumed(body){if(body.bodyUsed){return Promise.reject(new TypeError('Already read'));}body.bodyUsed=true;}function fileReaderReady(reader){return new Promise(function(resolve,reject){reader.onload=function(){resolve(reader.result);};reader.onerror=function(){reject(reader.error);};});}function readBlobAsArrayBuffer(blob){var reader=new FileReader();var promise=fileReaderReady(reader);reader.readAsArrayBuffer(blob);return promise;}function readBlobAsText(blob){var reader=new FileReader();var promise=fileReaderReady(reader);reader.readAsText(blob);return promise;}function readArrayBufferAsText(buf){var view=new Uint8Array(buf);var chars=new Array(view.length);for(var i=0;i-1?upcased:method;}function Request(input,options){options=options||{};var body=options.body;if(input instanceof Request){if(input.bodyUsed){throw new TypeError('Already read');}this.url=input.url;this.credentials=input.credentials;if(!options.headers){this.headers=new Headers(input.headers);}this.method=input.method;this.mode=input.mode;if(!body&&input._bodyInit!=null){body=input._bodyInit;input.bodyUsed=true;}}else{this.url=String(input);}this.credentials=options.credentials||this.credentials||'omit';if(options.headers||!this.headers){this.headers=new Headers(options.headers);}this.method=normalizeMethod(options.method||this.method||'GET');this.mode=options.mode||this.mode||null;this.referrer=null;if((this.method==='GET'||this.method==='HEAD')&&body){throw new TypeError('Body not allowed for GET or HEAD requests');}this._initBody(body);}Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit});};function decode(body){var form=new FormData();body.trim().split('&').forEach(function(bytes){if(bytes){var split=bytes.split('=');var name=split.shift().replace(/\\+/g,' ');var value=split.join('=').replace(/\\+/g,' ');form.append(decodeURIComponent(name),decodeURIComponent(value));}});return form;}function parseHeaders(rawHeaders){var headers=new Headers();rawHeaders.split(/\\r?\\n/).forEach(function(line){var parts=line.split(':');var key=parts.shift().trim();if(key){var value=parts.join(':').trim();headers.append(key,value);}});return headers;}Body.call(Request.prototype);function Response(bodyInit,options){if(!options){options={};}this.type='default';this.status='status'in options?options.status:200;this.ok=this.status>=200&&this.status<300;this.statusText='statusText'in options?options.statusText:'OK';this.headers=new Headers(options.headers);this.url=options.url||'';this._initBody(bodyInit);}Body.call(Response.prototype);Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url});};Response.error=function(){var response=new Response(null,{status:0,statusText:''});response.type='error';return response;};var redirectStatuses=[301,302,303,307,308];Response.redirect=function(url,status){if(redirectStatuses.indexOf(status)===-1){throw new RangeError('Invalid status code');}return new Response(null,{status:status,headers:{location:url}});};self.Headers=Headers;self.Request=Request;self.Response=Response;self.fetch=function(input,init){return new Promise(function(resolve,reject){var request=new Request(input,init);var xhr=new XMLHttpRequest();xhr.onload=function(){var options={status:xhr.status,statusText:xhr.statusText,headers:parseHeaders(xhr.getAllResponseHeaders()||'')};options.url='responseURL'in xhr?xhr.responseURL:options.headers.get('X-Request-URL');var body='response'in xhr?xhr.response:xhr.responseText;resolve(new Response(body,options));};xhr.onerror=function(){reject(new TypeError('Network request failed'));};xhr.ontimeout=function(){reject(new TypeError('Network request failed'));};xhr.open(request.method,request.url,true);if(request.credentials==='include'){xhr.withCredentials=true;}if('responseType'in xhr&&support.blob){xhr.responseType='blob';}request.headers.forEach(function(value,name){xhr.setRequestHeader(name,value);});xhr.send(typeof request._bodyInit==='undefined'?null:request._bodyInit);});};self.fetch.polyfill=true;})(typeof self!=='undefined'?self:undefined);\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*//* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError('Object.assign cannot be called with null or undefined');}return Object(val);}function shouldUseNative(){try{if(!Object.assign){return false;}// Detect buggy property enumeration order in older V8 versions.\n// https://bugs.chromium.org/p/v8/issues/detail?id=4118\nvar test1=new String('abc');// eslint-disable-line no-new-wrappers\ntest1[5]='de';if(Object.getOwnPropertyNames(test1)[0]==='5'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056\nvar test2={};for(var i=0;i<10;i++){test2['_'+String.fromCharCode(i)]=i;}var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n];});if(order2.join('')!=='0123456789'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056\nvar test3={};'abcdefghijklmnopqrst'.split('').forEach(function(letter){test3[letter]=letter;});if(Object.keys(Object.assign({},test3)).join('')!=='abcdefghijklmnopqrst'){return false;}return true;}catch(err){// We don't expect any of the above to throw, but better to be safe.\nreturn false;}}module.exports=shouldUseNative()?Object.assign:function(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s1?r:r[0];};var n=function n(t,r,u,e){for(var p=1;p=5&&((e||!n&&5===u)&&(s.push(e,u,r),u=6),n&&(s.push(n,u,r),u=6)),e=\"\";},a=0;a\"===t?(u=1,e=\"\"):e=t+e[0]:p?t===p?p=\"\":e+=t:'\"'===t||\"'\"===t?p=t:\">\"===t?(h(),u=1):u&&(\"=\"===t?(u=5,r=e,e=\"\"):\"/\"===t&&(u<5||\">\"===n[a][f+1])?(h(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,2),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(h(),u=2):e+=t),3===u&&\"!--\"===e&&(u=4,s=s[0]);}}return h(),s;},r=\"function\"==typeof Map,u=r?new Map():{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r;}:function(n){for(var r=\"\",e=0;e {\n// let newP = document.createElement('div')\n// newP.className = '_code-ctn'\n// let pre = code.parentNode\n// let ctn = pre.parentNode\n// if (pre.nodeName === 'PRE') {\n// ctn.insertBefore(newP, pre)\n// let hl = document.createElement('div')\n// hl.className = '_hl'\n// newP.appendChild(hl)\n// newP.appendChild(pre)\n// let nums = codeHlNumArr[index]\n// let max = Math.max.apply(null, nums)\n// let inner = ''\n// for (let i = 0; i <= max; i++) {\n// if (nums.indexOf(i) == -1) {\n// inner += '
'\n// } else {\n// inner += '
'\n// }\n// }\n// hl.innerHTML = inner\n// }\n// })\n//fix line-highlight\nwindow.dispatchEvent(new Event('resize'));}},{key:'_arrToNumber',value:function _arrToNumber(numArr){var arr=[];numArr.forEach(function(item){if(item.indexOf('-')!==-1){var tempArr=item.split('-');var begin=Number(tempArr[0]);var end=Number(tempArr[1]);for(var i=begin;i0)return false;}return true;}},{key:'render',value:function render(){if(!this.demo)return;return Omi.h('div',null,this.show&&Omi.h('iframe',{style:'height:'+(window.innerHeight-59)+'px',src:this.demo}),!this.show&&Omi.h('div',{'class':'switch code',onClick:this.onShow},Omi.h('img',{src:__webpack_require__(33)})),this.show&&Omi.h('div',{'class':'switch close',onClick:this.onClose},Omi.h('img',{src:__webpack_require__(34)})));}}]);return _class2;}(_omi.WeElement));\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\n var result = __webpack_require__(32);\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(1)(undefined);\n// imports\n\n\n// module\nexports.push([module.i, \"iframe{\\n width: 750px;\\n height: 100%;\\n top: 60px;\\n right: 0;\\n position: fixed;\\n border: none;\\n z-index: 9999;\\n border-left: 2px solid #24292E;\\n}\\n\\n.switch{\\n width: 40px;\\n height: 40px;\\n background-color: #AA0000;\\n border-radius: 50%;\\n position: fixed;\\n right: 50px;\\n bottom: 50px;\\n cursor: pointer;\\n text-align: center;\\n z-index: 10000;\\n}\\n\\n.switch img{\\n width: 30px;\\n height: 30px;\\n margin-top:5px;\\n}\\n\\n.switch.close img{\\n margin-top:10px;\\n width: 20px;\\n height: 20px;\\n}\\n\\n\\n@media only screen and (max-width: 800px) {\\n iframe{\\n width: 100%;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC\"\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==\"\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(exports,\"__esModule\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){params[pathArr[index].replace(':','')]=item;}});return params;}function route(path,callback){mapping[path]={callback:callback,reg:p2r(path)};}function getGlobal(){if((typeof global==='undefined'?'undefined':_typeof(global))!=='object'||!global||global.Math!==Math||global.Array!==Array){return self||window||global||function(){return this;}();}return global;}function getUrlParams(url){url=url.replace(/#.*$/,'');var queryArray=url.split(/[?&]/).slice(1);var i,args={};for(i=0;i [\"test\", \"\\d+\", undefined, \"?\"]\n// \"(\\\\d+)\" => [undefined, undefined, \"\\d+\", undefined]\n'(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'].join('|'),'g');/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */function parse(str,options){var tokens=[];var key=0;var index=0;var path='';var defaultDelimiter=options&&options.delimiter||DEFAULT_DELIMITER;var whitelist=options&&options.whitelist||undefined;var pathEscaped=false;var res;while((res=PATH_REGEXP.exec(str))!==null){var m=res[0];var escaped=res[1];var offset=res.index;path+=str.slice(index,offset);index=offset+m.length;// Ignore already escaped sequences.\nif(escaped){path+=escaped[1];pathEscaped=true;continue;}var prev='';var name=res[2];var capture=res[3];var group=res[4];var modifier=res[5];if(!pathEscaped&&path.length){var k=path.length-1;var c=path[k];var matches=whitelist?whitelist.indexOf(c)>-1:true;if(matches){prev=c;path=path.slice(0,k);}}// Push the current path onto the tokens.\nif(path){tokens.push(path);path='';pathEscaped=false;}var repeat=modifier==='+'||modifier==='*';var optional=modifier==='?'||modifier==='*';var pattern=capture||group;var delimiter=prev||defaultDelimiter;tokens.push({name:name||key++,prefix:prev,delimiter:delimiter,optional:optional,repeat:repeat,pattern:pattern?escapeGroup(pattern):'[^'+escapeString(delimiter===defaultDelimiter?delimiter:delimiter+defaultDelimiter)+']+?'});}// Push any remaining characters.\nif(path||indexHello!`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */\nfunction h(nodeName, attributes) {\n var children = [],\n lastSimple,\n child,\n simple,\n i;\n for (i = arguments.length; i-- > 2;) {\n stack.push(arguments[i]);\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children);\n delete attributes.children;\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--;) {\n stack.push(child[i]);\n }\n } else {\n if (typeof child === 'boolean') child = null;\n\n if (simple = typeof nodeName !== 'function') {\n if (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child;\n } else if (children.length === 0) {\n children = [child];\n } else {\n children.push(child);\n }\n\n lastSimple = simple;\n }\n }\n\n var p = new VNode();\n p.nodeName = nodeName;\n p.children = children;\n p.attributes = attributes == null ? undefined : attributes;\n p.key = attributes == null ? undefined : attributes.key;\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p);\n\n return p;\n}\n\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction assign(target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n}\n\nif (typeof Element !== 'undefined' && !Element.prototype.addEventListener) {\n var runListeners = function runListeners(oEvent) {\n if (!oEvent) {\n oEvent = window.event;\n }\n for (var iLstId = 0, iElId = 0, oEvtListeners = oListeners[oEvent.type]; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n for (iLstId; iLstId < oEvtListeners.aEvts[iElId].length; iLstId++) {\n oEvtListeners.aEvts[iElId][iLstId].call(this, oEvent);\n }\n break;\n }\n }\n };\n\n var oListeners = {};\n\n Element.prototype.addEventListener = function (sEventType, fListener /*, useCapture (will be ignored!) */) {\n if (oListeners.hasOwnProperty(sEventType)) {\n var oEvtListeners = oListeners[sEventType];\n for (var nElIdx = -1, iElId = 0; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n nElIdx = iElId;break;\n }\n }\n if (nElIdx === -1) {\n oEvtListeners.aEls.push(this);\n oEvtListeners.aEvts.push([fListener]);\n this[\"on\" + sEventType] = runListeners;\n } else {\n var aElListeners = oEvtListeners.aEvts[nElIdx];\n if (this[\"on\" + sEventType] !== runListeners) {\n aElListeners.splice(0);\n this[\"on\" + sEventType] = runListeners;\n }\n for (var iLstId = 0; iLstId < aElListeners.length; iLstId++) {\n if (aElListeners[iLstId] === fListener) {\n return;\n }\n }\n aElListeners.push(fListener);\n }\n } else {\n oListeners[sEventType] = { aEls: [this], aEvts: [[fListener]] };\n this[\"on\" + sEventType] = runListeners;\n }\n };\n Element.prototype.removeEventListener = function (sEventType, fListener /*, useCapture (will be ignored!) */) {\n if (!oListeners.hasOwnProperty(sEventType)) {\n return;\n }\n var oEvtListeners = oListeners[sEventType];\n for (var nElIdx = -1, iElId = 0; iElId < oEvtListeners.aEls.length; iElId++) {\n if (oEvtListeners.aEls[iElId] === this) {\n nElIdx = iElId;break;\n }\n }\n if (nElIdx === -1) {\n return;\n }\n for (var iLstId = 0, aElListeners = oEvtListeners.aEvts[nElIdx]; iLstId < aElListeners.length; iLstId++) {\n if (aElListeners[iLstId] === fListener) {\n aElListeners.splice(iLstId, 1);\n }\n }\n };\n}\n\nif (typeof Object.create !== 'function') {\n Object.create = function (proto, propertiesObject) {\n if (typeof proto !== 'object' && typeof proto !== 'function') {\n throw new TypeError('Object prototype may only be an Object: ' + proto);\n } else if (proto === null) {\n throw new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n }\n\n // if (typeof propertiesObject != 'undefined') {\n // throw new Error(\"This browser's implementation of Object.create is a shim and doesn't support a second argument.\");\n // }\n\n function F() {}\n F.prototype = proto;\n\n return new F();\n };\n}\n\nif (!String.prototype.trim) {\n String.prototype.trim = function () {\n return this.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n };\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {Object} obj\t\tObject onto which properties should be copied.\n * @param {Object} props\tObject from which to copy properties.\n * @returns obj\n * @private\n */\nfunction extend(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nfunction applyRef(ref, value) {\n if (ref) {\n if (typeof ref == 'function') ref(value);else ref.current = value;\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n *\n * @param {Function} callback\n */\n\nvar usePromise = typeof Promise == 'function';\n\n// for native\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\n if (global.__config__.platform === 'android') {\n usePromise = true;\n } else {\n var systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\n if (systemVersion > 8) {\n usePromise = true;\n }\n }\n}\n\nvar defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\nfunction isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n}\n\nfunction getUse(data, paths, out, name) {\n var obj = [];\n paths.forEach(function (path, index) {\n var isPath = typeof path === 'string';\n if (isPath) {\n obj[index] = getTargetByPath(data, path);\n } else {\n var key = Object.keys(path)[0];\n var value = path[key];\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value);\n } else {\n var tempPath = value[0];\n if (typeof tempPath === 'string') {\n var tempVal = getTargetByPath(data, tempPath);\n obj[index] = value[1] ? value[1](tempVal) : tempVal;\n } else {\n var args = [];\n tempPath.forEach(function (path) {\n args.push(getTargetByPath(data, path));\n });\n obj[index] = value[1].apply(null, args);\n }\n }\n obj[key] = obj[index];\n }\n });\n out && (out[name] = obj);\n return obj;\n}\n\nfunction getTargetByPath(origin, path) {\n var arr = path.replace(/]/g, '').replace(/\\[/g, '.').split('.');\n var current = origin;\n for (var i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]];\n }\n return current;\n}\n\nfunction getPath(obj, out, name) {\n\n var result = {};\n obj.forEach(function (item) {\n if (typeof item === 'string') {\n result[item] = true;\n } else {\n var tempPath = item[Object.keys(item)[0]];\n if (typeof tempPath === 'string') {\n result[tempPath] = true;\n } else {\n if (typeof tempPath[0] === 'string') {\n result[tempPath[0]] = true;\n } else {\n tempPath[0].forEach(function (path) {\n return result[path] = true;\n });\n }\n }\n }\n });\n out && (out[name] = result);\n return result;\n}\n\nfunction removeItem(item, arr) {\n for (var i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n break;\n }\n }\n}\n\nfunction Fragment(props) {\n return props.children;\n}\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nfunction cloneElement(vnode, props) {\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL$1 = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\n/** Managed queue of dirty components to be re-rendered */\n\nvar items = [];\n\nfunction enqueueRender(component) {\n if (items.push(component) == 1) {\n(options.debounceRendering || defer)(rerender);\n }\n}\n\n/** Rerender all enqueued dirty components */\nfunction rerender() {\n var p;\n while (p = items.pop()) {\n renderComponent(p);\n }\n}\n\nvar mapping = options.mapping;\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nfunction isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined;\n }\n if (typeof vnode.nodeName === 'string') {\n var ctor = mapping[vnode.nodeName];\n if (ctor) {\n return hydrating || node._componentConstructor === ctor;\n }\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n }\n return hydrating || node._componentConstructor === vnode.nodeName;\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nfunction isNamedNode(node, nodeName) {\n return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nfunction getNodeProps(vnode) {\n var props = extend({}, vnode.attributes);\n props.children = vnode.children;\n\n var defaultProps = vnode.nodeName.defaultProps;\n if (defaultProps !== undefined) {\n for (var i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i];\n }\n }\n }\n\n return props;\n}\n\n/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */\nfunction createNode(nodeName, isSvg) {\n var node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\n node.normalizedNodeName = nodeName;\n return node;\n}\n\nfunction parseCSSText(cssText) {\n var cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, ' ').replace(/\\s+/g, ' ');\n var style = {},\n _ref = cssTxt.match(/ ?(.*?) ?{([^}]*)}/) || [a, b, cssTxt],\n a = _ref[0],\n b = _ref[1],\n rule = _ref[2];\n\n var cssToJs = function cssToJs(s) {\n return s.replace(/\\W+\\w/g, function (match) {\n return match.slice(-1).toUpperCase();\n });\n };\n var properties = rule.split(';').map(function (o) {\n return o.split(':').map(function (x) {\n return x && x.trim();\n });\n });\n for (var i = properties, i = Array.isArray(i), i = 0, i = i ? i : i[Symbol.iterator]();;) {\n var _ref3;\n\n if (i) {\n if (i >= i.length) break;\n _ref3 = i[i++];\n } else {\n i = i.next();\n if (i.done) break;\n _ref3 = i.value;\n }\n\n var _ref2 = _ref3;\n var property = _ref2[0];\n var value = _ref2[1];\n style[cssToJs(property)] = value;\n }return style;\n}\n\n/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */\nfunction removeNode(node) {\n var parentNode = node.parentNode;\n if (parentNode) parentNode.removeChild(node);\n}\n\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */\nfunction setAccessor(node, name, old, value, isSvg) {\n if (name === 'className') name = 'class';\n\n if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null);\n applyRef(value, node);\n } else if (name === 'class' && !isSvg) {\n node.className = value || '';\n } else if (name === 'style') {\n if (options.isWeb) {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || '';\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (var i in old) {\n if (!(i in value)) node.style[i] = '';\n }\n }\n for (var i in value) {\n node.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL$1.test(i) === false ? value[i] + 'px' : value[i];\n }\n }\n } else {\n var oldJson = old,\n currentJson = value;\n if (typeof old === 'string') {\n oldJson = parseCSSText(old);\n }\n if (typeof value == 'string') {\n currentJson = parseCSSText(value);\n }\n\n var result = {},\n changed = false;\n\n if (oldJson) {\n for (var key in oldJson) {\n if (typeof currentJson == 'object' && !(key in currentJson)) {\n result[key] = '';\n changed = true;\n }\n }\n\n for (var ckey in currentJson) {\n if (currentJson[ckey] !== oldJson[ckey]) {\n result[ckey] = currentJson[ckey];\n changed = true;\n }\n }\n\n if (changed) {\n node.setStyles(result);\n }\n } else {\n node.setStyles(currentJson);\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || '';\n } else if (name[0] == 'o' && name[1] == 'n') {\n var useCapture = name !== (name = name.replace(/Capture$/, ''));\n var nameLower = name.toLowerCase();\n name = (nameLower in node ? nameLower : name).slice(2);\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture);\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture);\n node.addEventListener('touchend', touchEnd, useCapture);\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture);\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture);\n node.removeEventListener('touchend', touchEnd, useCapture);\n }\n }\n(node._listeners || (node._listeners = {}))[name] = value;\n } else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n setProperty(node, name, value == null ? '' : value);\n if (value == null || value === false) node.removeAttribute(name);\n } else {\n var ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n if (value == null || value === false) {\n if (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n } else if (typeof value !== 'function') {\n if (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n }\n }\n}\n\n/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */\nfunction setProperty(node, name, value) {\n try {\n node[name] = value;\n } catch (e) {}\n}\n\n/** Proxy an event to hooked event handlers\n *\t@private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type](options.event && options.event(e) || e);\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX;\n this.___touchY = e.touches[0].pageY;\n this.___scrollTop = document.body.scrollTop;\n}\n\nfunction touchEnd(e) {\n if (Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 && Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 && Math.abs(document.body.scrollTop - this.___scrollTop) < 30) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }));\n }\n}\n\nvar styleId = 0;\n\nfunction getCtorName(ctor) {\n for (var i = 0, len = options.styleCache.length; i < len; i++) {\n var item = options.styleCache[i];\n\n if (item.ctor === ctor) {\n return item.attrName;\n }\n }\n\n var attrName = 's' + styleId;\n options.styleCache.push({ ctor: ctor, attrName: attrName });\n styleId++;\n\n return attrName;\n}\n\n// many thanks to https://github.com/thomaspark/scoper/\nfunction scoper(css, prefix) {\n prefix = '[' + prefix.toLowerCase() + ']';\n // https://www.w3.org/TR/css-syntax-3/#lexical\n css = css.replace(/\\/\\*[^*]*\\*+([^/][^*]*\\*+)*\\//g, '');\n // eslint-disable-next-line\n var re = new RegExp('([^\\r\\n,{}:]+)(:[^\\r\\n,{}]+)?(,(?=[^{}]*{)|\\s*{)', 'g');\n /**\n * Example:\n *\n * .classname::pesudo { color:red }\n *\n * g1 is normal selector `.classname`\n * g2 is pesudo class or pesudo element\n * g3 is the suffix\n */\n css = css.replace(re, function (g0, g1, g2, g3) {\n if (typeof g2 === 'undefined') {\n g2 = '';\n }\n\n /* eslint-ignore-next-line */\n if (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\n return g1 + g2 + g3;\n }\n\n var appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\n //let prependClass = prefix + ' ' + g1.trim() + g2;\n\n return appendClass + g3;\n //return appendClass + ',' + prependClass + g3;\n });\n\n return css;\n}\n\nfunction addStyle(cssText, id) {\n id = id.toLowerCase();\n var ele = document.getElementById(id);\n var head = document.getElementsByTagName('head')[0];\n if (ele && ele.parentNode === head) {\n head.removeChild(ele);\n }\n\n var someThingStyles = document.createElement('style');\n head.appendChild(someThingStyles);\n someThingStyles.setAttribute('type', 'text/css');\n someThingStyles.setAttribute('id', id);\n if (window.ActiveXObject) {\n someThingStyles.styleSheet.cssText = cssText;\n } else {\n someThingStyles.textContent = cssText;\n }\n}\n\nfunction addStyleWithoutId(cssText) {\n var head = document.getElementsByTagName('head')[0];\n var someThingStyles = document.createElement('style');\n head.appendChild(someThingStyles);\n someThingStyles.setAttribute('type', 'text/css');\n\n if (window.ActiveXObject) {\n someThingStyles.styleSheet.cssText = cssText;\n } else {\n someThingStyles.textContent = cssText;\n }\n}\n\nfunction addScopedAttrStatic(vdom, attr) {\n if (options.scopedStyle) {\n scopeVdom(attr, vdom);\n }\n}\n\nfunction addStyleToHead(style, attr) {\n if (options.scopedStyle) {\n if (!options.staticStyleMapping[attr]) {\n addStyle(scoper(style, attr), attr);\n options.staticStyleMapping[attr] = true;\n }\n } else if (!options.staticStyleMapping[attr]) {\n addStyleWithoutId(style);\n options.staticStyleMapping[attr] = true;\n }\n}\n\nfunction scopeVdom(attr, vdom) {\n if (typeof vdom === 'object') {\n vdom.attributes = vdom.attributes || {};\n vdom.attributes[attr] = '';\n vdom.css = vdom.css || {};\n vdom.css[attr] = '';\n vdom.children.forEach(function (child) {\n return scopeVdom(attr, child);\n });\n }\n}\n\nfunction scopeHost(vdom, css) {\n if (typeof vdom === 'object' && css) {\n vdom.attributes = vdom.attributes || {};\n for (var key in css) {\n vdom.attributes[key] = '';\n }\n }\n}\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nvar mounts = [];\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar hydrating = false;\n\n/** Invoke queued componentDidMount lifecycle methods */\nfunction flushMounts() {\n var c;\n while (c = mounts.pop()) {\n if (options.afterMount) options.afterMount(c);\n if (c.installed) c.installed();\n if (c.constructor.css || c.css) {\n addStyleToHead(c.constructor.css ? c.constructor.css : typeof c.css === 'function' ? c.css() : c.css, '_s' + getCtorName(c.constructor));\n }\n }\n}\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nfunction diff(dom, vnode, store, mountAll, parent, componentRoot, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !('__omiattr_' in dom);\n }\n var ret;\n\n if (isArray(vnode)) {\n vnode = {\n nodeName: 'span',\n children: vnode\n };\n } else if (vnode && vnode.nodeName === Fragment) {\n vnode.nodeName = 'span';\n }\n\n ret = idiff(dom, vnode, store, mountAll, componentRoot, updateSelf);\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (! --diffLevel) {\n hydrating = false;\n // invoke queued componentDidMount lifecycle methods\n if (!componentRoot) flushMounts();\n }\n\n return ret;\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, store, mountAll, componentRoot, updateSelf) {\n var out = dom,\n prevSvgMode = isSvgMode;\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n // If the VNode represents a Component, perform a component diff:\n var vnodeName = vnode.nodeName;\n if (options.mapping[vnodeName]) {\n vnode.nodeName = options.mapping[vnodeName];\n return buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf);\n }\n if (typeof vnodeName == 'function') {\n return buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf);\n }\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode;\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode);\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n recollectNodeTree(dom, true);\n }\n }\n\n //ie8 error\n try {\n out['__omiattr_'] = true;\n } catch (e) {}\n\n return out;\n }\n\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName);\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode);\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) {\n out.appendChild(dom.firstChild);\n } // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true);\n }\n }\n\n var fc = out.firstChild,\n props = out['__omiattr_'],\n vchildren = vnode.children;\n\n if (props == null) {\n props = out['__omiattr_'] = {};\n for (var a = out.attributes, i = a.length; i--;) {\n props[a[i].name] = a[i].value;\n }\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0];\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if (vchildren && vchildren.length || fc != null) {\n innerDiffNode(out, vchildren, store, mountAll, hydrating || props.dangerouslySetInnerHTML != null, updateSelf);\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props);\n\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode;\n\n return out;\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Object} store\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\n *\t@param {Boolean} mountAll\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, store, mountAll, isHydrating, updateSelf) {\n var originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child;\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (var i = 0; i < len; i++) {\n var _child = originalChildren[i],\n props = _child['__omiattr_'],\n key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n if (key != null) {\n keyedLen++;\n keyed[key] = _child;\n } else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n children[childrenLen++] = _child;\n }\n }\n }\n\n if (vlen !== 0) {\n for (var i = 0; i < vlen; i++) {\n vchild = vchildren[i];\n child = null;\n\n // attempt to find a node based on key matching\n var key = vchild.key;\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key];\n keyed[key] = undefined;\n keyedLen--;\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n child = c;\n children[j] = undefined;\n if (j === childrenLen - 1) childrenLen--;\n if (j === min) min++;\n break;\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, store, mountAll, null, updateSelf);\n\n f = originalChildren[i];\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child);\n } else if (child === f.nextSibling) {\n removeNode(f);\n } else {\n dom.insertBefore(child, f);\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (var i in keyed) {\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n }\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nfunction recollectNodeTree(node, unmountOnly) {\n var component = node._component;\n if (component) {\n // if node is owned by a Component, unmount that component (ends up recursing back here)\n unmountComponent(component);\n } else {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node['__omiattr_'] != null) applyRef(node['__omiattr_'].ref, null);\n\n if (unmountOnly === false || node['__omiattr_'] == null) {\n removeNode(node);\n }\n\n removeChildren(node);\n }\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nfunction removeChildren(node) {\n node = node.lastChild;\n while (node) {\n var next = node.previousSibling;\n recollectNodeTree(node, true);\n node = next;\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old) {\n var name;\n\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n }\n }\n}\n\n/** Retains a pool of Components for re-use, keyed on component name.\n *\tNote: since component names are not unique or even necessarily available, these are primarily a form of sharding.\n *\t@private\n */\nvar components = {};\n\n/** Reclaim a component for later re-use by the recycler. */\nfunction collectComponent(component) {\n var name = component.constructor.name;(components[name] || (components[name] = [])).push(component);\n}\n\n/** Create a component. Normalizes differences between PFC's and classful Components. */\nfunction createComponent(Ctor, props, store, vnode) {\n var list = components[Ctor.name],\n inst;\n\n if (Ctor.prototype && Ctor.prototype.render) {\n inst = new Ctor(props, store);\n Component.call(inst, props, store);\n } else {\n inst = new Component(props, store);\n inst.constructor = Ctor;\n inst.render = doRender;\n }\n vnode && (inst.scopedCssAttr = vnode.css);\n\n if (inst.store) {\n if (inst.use) {\n var use = typeof inst.use === 'function' ? inst.use() : inst.use;\n\n if (options.isMultiStore) {\n var _updatePath = {};\n var using = {};\n for (var storeName in use) {\n _updatePath[storeName] = {};\n using[storeName] = {};\n getPath(use[storeName], _updatePath, storeName);\n getUse(inst.store[storeName].data, use[storeName], using, storeName);\n inst.store[storeName].instances.push(inst);\n }\n inst.using = using;\n inst._updatePath = _updatePath;\n } else {\n inst._updatePath = getPath(use);\n inst.using = getUse(inst.store.data, use);\n inst.store.instances.push(inst);\n }\n }\n\n if (inst.useSelf) {\n var _use = typeof inst.useSelf === 'function' ? inst.useSelf() : inst.useSelf;\n\n if (options.isMultiStore) {\n var _updatePath2 = {};\n var _using = {};\n for (var _storeName in _use) {\n getPath(_use[_storeName], _updatePath2, _storeName);\n getUse(inst.store[_storeName].data, _use[_storeName], _using, _storeName);\n inst.store[_storeName].updateSelfInstances.push(inst);\n }\n inst.usingSelf = _using;\n inst._updateSelfPath = _updatePath2;\n } else {\n inst._updateSelfPath = getPath(_use);\n inst.usingSelf = getUse(inst.store.data, _use);\n inst.store.updateSelfInstances.push(inst);\n }\n }\n\n if (inst.compute) {\n for (var key in inst.compute) {\n inst.computed[key] = inst.compute[key].call(options.isMultiStore ? inst.store : inst.store.data);\n }\n }\n }\n\n if (list) {\n for (var i = list.length; i--;) {\n if (list[i].constructor === Ctor) {\n inst.nextBase = list[i].nextBase;\n list.splice(i, 1);\n break;\n }\n }\n }\n return inst;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, store) {\n return this.constructor(props, store);\n}\n\n/** Set a component's `props` (generally derived from JSX attributes).\n *\t@param {Object} props\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\n */\nfunction setComponentProps(component, props, opts, store, mountAll) {\n if (component._disable) return;\n component._disable = true;\n\n if (component.__ref = props.ref) delete props.ref;\n if (component.__key = props.key) delete props.key;\n\n if (!component.base || mountAll) {\n if (component.beforeInstall) component.beforeInstall();\n if (component.install) component.install();\n }\n\n if (!component.prevProps) component.prevProps = component.props;\n component.props = props;\n\n component._disable = false;\n\n if (opts !== 0) {\n if (opts === 1 || options.syncComponentUpdates !== false || !component.base) {\n renderComponent(component, 1, mountAll);\n } else {\n enqueueRender(component);\n }\n }\n\n applyRef(component.__ref, component);\n}\n\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\n *\t@param {Component} component\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\n *\t@private\n */\nfunction renderComponent(component, opts, mountAll, isChild, updateSelf) {\n if (component._disable) return;\n\n var props = component.props,\n store = component.store,\n previousProps = component.prevProps || props,\n isUpdate = component.base,\n nextBase = component.nextBase,\n initialBase = isUpdate || nextBase,\n initialChildComponent = component._component,\n skip = false,\n rendered,\n inst,\n cbase;\n\n // if updating\n if (isUpdate) {\n component.props = previousProps;\n\n var receiveResult = true;\n if (component.receiveProps) {\n receiveResult = component.receiveProps(props, previousProps);\n }\n if (receiveResult !== false) {\n skip = false;\n if (component.beforeUpdate) {\n component.beforeUpdate(props, store);\n }\n } else {\n skip = true;\n }\n component.props = props;\n }\n\n component.prevProps = component.nextBase = null;\n\n if (!skip) {\n component.beforeRender && component.beforeRender();\n rendered = component.render(props, store);\n\n //don't rerender\n if (component.constructor.css || component.css) {\n addScopedAttrStatic(rendered, '_s' + getCtorName(component.constructor));\n }\n\n scopeHost(rendered, component.scopedCssAttr);\n\n var childComponent = rendered && rendered.nodeName,\n toUnmount,\n base,\n ctor = options.mapping[childComponent];\n\n if (ctor) {\n // set up high order component link\n\n var childProps = getNodeProps(rendered);\n inst = initialChildComponent;\n\n if (inst && inst.constructor === ctor && childProps.key == inst.__key) {\n setComponentProps(inst, childProps, 1, store, false);\n } else {\n toUnmount = inst;\n\n component._component = inst = createComponent(ctor, childProps, store);\n inst.nextBase = inst.nextBase || nextBase;\n inst._parentComponent = component;\n setComponentProps(inst, childProps, 0, store, false);\n renderComponent(inst, 1, mountAll, true);\n }\n\n base = inst.base;\n } else {\n cbase = initialBase;\n\n // destroy high order component link\n toUnmount = initialChildComponent;\n if (toUnmount) {\n cbase = component._component = null;\n }\n\n if (initialBase || opts === 1) {\n if (cbase) cbase._component = null;\n base = diff(cbase, rendered, store, mountAll || !isUpdate, initialBase && initialBase.parentNode, true, updateSelf);\n }\n }\n\n if (initialBase && base !== initialBase && inst !== initialChildComponent) {\n var baseParent = initialBase.parentNode;\n if (baseParent && base !== baseParent) {\n baseParent.replaceChild(base, initialBase);\n\n if (!toUnmount) {\n initialBase._component = null;\n recollectNodeTree(initialBase, false);\n }\n }\n }\n\n if (toUnmount) {\n unmountComponent(toUnmount);\n }\n\n component.base = base;\n if (base && !isChild) {\n var componentRef = component,\n t = component;\n while (t = t._parentComponent) {\n(componentRef = t).base = base;\n }\n base._component = componentRef;\n base._componentConstructor = componentRef.constructor;\n }\n }\n\n if (!isUpdate || mountAll) {\n mounts.unshift(component);\n } else if (!skip) {\n // Ensure that pending componentDidMount() hooks of child components\n // are called before the componentDidUpdate() hook in the parent.\n // Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\n // flushMounts();\n\n if (component.afterUpdate) {\n //deprecated\n component.afterUpdate(previousProps, store);\n }\n if (component.updated) {\n component.updated(previousProps, store);\n }\n if (options.afterUpdate) options.afterUpdate(component);\n }\n\n if (component._renderCallbacks != null) {\n while (component._renderCallbacks.length) {\n component._renderCallbacks.pop().call(component);\n }\n }\n\n if (!diffLevel && !isChild) flushMounts();\n}\n\n/** Apply the Component referenced by a VNode to the DOM.\n *\t@param {Element} dom\tThe DOM node to mutate\n *\t@param {VNode} vnode\tA Component-referencing VNode\n *\t@returns {Element} dom\tThe created/mutated element\n *\t@private\n */\nfunction buildComponentFromVNode(dom, vnode, store, mountAll, updateSelf) {\n var c = dom && dom._component,\n originalComponent = c,\n oldDom = dom,\n isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n isOwner = isDirectOwner,\n props = getNodeProps(vnode);\n while (c && !isOwner && (c = c._parentComponent)) {\n isOwner = c.constructor === vnode.nodeName;\n }\n\n if (c && isOwner && (!mountAll || c._component)) {\n if (!updateSelf) {\n setComponentProps(c, props, 3, store, mountAll);\n }\n dom = c.base;\n } else {\n if (originalComponent && !isDirectOwner) {\n unmountComponent(originalComponent);\n dom = oldDom = null;\n }\n\n c = createComponent(vnode.nodeName, props, store, vnode);\n if (dom && !c.nextBase) {\n c.nextBase = dom;\n // passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\n oldDom = null;\n }\n setComponentProps(c, props, 1, store, mountAll);\n dom = c.base;\n\n if (oldDom && dom !== oldDom) {\n oldDom._component = null;\n recollectNodeTree(oldDom, false);\n }\n }\n\n return dom;\n}\n\n/** Remove a component from the DOM and recycle it.\n *\t@param {Component} component\tThe Component instance to unmount\n *\t@private\n */\nfunction unmountComponent(component) {\n if (options.beforeUnmount) options.beforeUnmount(component);\n\n var base = component.base;\n\n component._disable = true;\n\n if (component.uninstall) component.uninstall();\n\n if (component.store) {\n if (options.isMultiStore) {\n for (var key in component.store) {\n var current = component.store[key];\n current.instances && removeItem(component, current.instances);\n current.updateSelfInstances && removeItem(component, current.updateSelfInstances);\n }\n } else {\n component.store.instances && removeItem(component, component.store.instances);\n component.store.updateSelfInstances && removeItem(component, component.store.updateSelfInstances);\n }\n }\n\n component.base = null;\n\n // recursively tear down & recollect high-order component children:\n var inner = component._component;\n if (inner) {\n unmountComponent(inner);\n } else if (base) {\n if (base['__omiattr_'] != null) applyRef(base['__omiattr_'].ref, null);\n\n component.nextBase = base;\n\n removeNode(base);\n collectComponent(component);\n\n removeChildren(base);\n }\n\n applyRef(component.__ref, null);\n}\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar id = 0;\n\nvar Component = function () {\n function Component(props, store) {\n _classCallCheck(this, Component);\n\n this.props = assign({}, this.constructor.defaultProps, props);\n this.elementId = id++;\n\n this._preCss = null;\n\n this.store = store;\n this.computed = {};\n }\n\n Component.prototype.update = function update(ignoreAttrs, updateSelf, callback) {\n if (this._willUpdate) return;\n this._willUpdate = true;\n if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n renderComponent(this, 2);\n if (options.componentChange) options.componentChange(this, this.base);\n this._willUpdate = false;\n };\n\n Component.prototype.updateSelf = function updateSelf() {\n if (this._willUpdateSelf) return;\n this._willUpdateSelf = true;\n renderComponent(this, 2, null, null, true);\n this._willUpdateSelf = false;\n };\n\n Component.prototype.fire = function fire(type, data) {\n var _this = this;\n\n Object.keys(this.props).every(function (key) {\n if ('on' + type.toLowerCase() === key.toLowerCase()) {\n _this.props[key]({ detail: data });\n return false;\n }\n return true;\n });\n };\n\n Component.prototype.render = function render() {};\n\n return Component;\n}();\n\nComponent.is = 'WeElement';\n\n/*\n * obaa 2.1.0\n * By dntzhang\n * Github: https://github.com/Tencent/omi/tree/master/packages/obaa\n * MIT Licensed.\n */\n\n// $_r_: root\n// $_c_: prop change callback\n// $_p_: path\n\nfunction obaa(target, arr, callback) {\n\n\tvar eventPropArr = [];\n\tif (isArray$1(target)) {\n\t\tif (target.length === 0) {\n\t\t\ttarget.$_o_ = {\n\t\t\t\t$_r_: target,\n\t\t\t\t$_p_: '#'\n\t\t\t};\n\t\t}\n\t\tmock(target, target);\n\t}\n\tif (target && typeof target === 'object' && Object.keys(target).length === 0) {\n\t\ttrack(target);\n\t\ttarget.$_o_.$_r_ = target;\n\t}\n\tfor (var prop in target) {\n\t\tif (target.hasOwnProperty(prop)) {\n\t\t\tif (callback) {\n\t\t\t\tif (isArray$1(arr) && isInArray(arr, prop)) {\n\t\t\t\t\teventPropArr.push(prop);\n\t\t\t\t\twatch(target, prop, null, target);\n\t\t\t\t} else if (isString(arr) && prop == arr) {\n\t\t\t\t\teventPropArr.push(prop);\n\t\t\t\t\twatch(target, prop, null, target);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\teventPropArr.push(prop);\n\t\t\t\twatch(target, prop, null, target);\n\t\t\t}\n\t\t}\n\t}\n\tif (!target.$_c_) {\n\t\ttarget.$_c_ = [];\n\t}\n\tvar propChanged = callback ? callback : arr;\n\ttarget.$_c_.push({\n\t\tall: !callback,\n\t\tpropChanged: propChanged,\n\t\teventPropArr: eventPropArr\n\t});\n}\n\nvar triggerStr = ['concat', 'copyWithin', 'fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift', 'size'].join(',');\n\nvar methods = ['concat', 'copyWithin', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'map', 'pop', 'push', 'reduce', 'reduceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleString', 'toString', 'unshift', 'values', 'size'];\n\nfunction mock(target, root) {\n\tmethods.forEach(function (item) {\n\t\ttarget[item] = function () {\n\t\t\tvar old = Array.prototype.slice.call(this, 0);\n\t\t\tvar result = Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));\n\t\t\tif (new RegExp('\\\\b' + item + '\\\\b').test(triggerStr)) {\n\t\t\t\tfor (var cprop in this) {\n\t\t\t\t\tif (this.hasOwnProperty(cprop) && !isFunction(this[cprop])) {\n\t\t\t\t\t\twatch(this, cprop, this.$_o_.$_p_, root);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//todo\n\t\t\t\tonPropertyChanged('Array-' + item, this, old, this, this.$_o_.$_p_, root);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\ttarget['pure' + item.substring(0, 1).toUpperCase() + item.substring(1)] = function () {\n\t\t\treturn Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));\n\t\t};\n\t});\n}\n\nfunction watch(target, prop, path, root) {\n\tif (prop === '$_o_') return;\n\tif (isFunction(target[prop])) return;\n\tif (!target.$_o_) target.$_o_ = {\n\t\t$_r_: root\n\t};\n\tif (path !== undefined && path !== null) {\n\t\ttarget.$_o_.$_p_ = path;\n\t} else {\n\t\ttarget.$_o_.$_p_ = '#';\n\t}\n\n\tvar currentValue = target.$_o_[prop] = target[prop];\n\tObject.defineProperty(target, prop, {\n\t\tget: function get() {\n\t\t\treturn this.$_o_[prop];\n\t\t},\n\t\tset: function set(value) {\n\t\t\tvar old = this.$_o_[prop];\n\t\t\tthis.$_o_[prop] = value;\n\t\t\tonPropertyChanged(prop, value, old, this, target.$_o_.$_p_, root);\n\t\t},\n\t\tconfigurable: true,\n\t\tenumerable: true\n\t});\n\tif (typeof currentValue == 'object') {\n\t\tif (isArray$1(currentValue)) {\n\t\t\tmock(currentValue, root);\n\t\t\tif (currentValue.length === 0) {\n\t\t\t\ttrack(currentValue, prop, path);\n\t\t\t}\n\t\t}\n\t\tif (currentValue && Object.keys(currentValue).length === 0) {\n\t\t\ttrack(currentValue, prop, path);\n\t\t}\n\t\tfor (var cprop in currentValue) {\n\t\t\tif (currentValue.hasOwnProperty(cprop)) {\n\t\t\t\twatch(currentValue, cprop, target.$_o_.$_p_ + '-' + prop, root);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction track(obj, prop, path) {\n\tif (obj.$_o_) {\n\t\treturn;\n\t}\n\tobj.$_o_ = {};\n\tif (path !== undefined && path !== null) {\n\t\tobj.$_o_.$_p_ = path + '-' + prop;\n\t} else {\n\t\tif (prop !== undefined && prop !== null) {\n\t\t\tobj.$_o_.$_p_ = '#' + '-' + prop;\n\t\t} else {\n\t\t\tobj.$_o_.$_p_ = '#';\n\t\t}\n\t}\n}\n\nfunction onPropertyChanged(prop, value, oldValue, target, path, root) {\n\tif (value !== oldValue && !(nan(value) && nan(oldValue)) && root.$_c_) {\n\t\tvar rootName = getRootName(prop, path);\n\t\tfor (var i = 0, len = root.$_c_.length; i < len; i++) {\n\t\t\tvar handler = root.$_c_[i];\n\t\t\tif (handler.all || isInArray(handler.eventPropArr, rootName) || rootName.indexOf('Array-') === 0) {\n\t\t\t\thandler.propChanged.call(target, prop, value, oldValue, path);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (prop.indexOf('Array-') !== 0 && typeof value === 'object') {\n\t\twatch(target, prop, target.$_o_.$_p_, root);\n\t}\n}\n\nfunction isFunction(obj) {\n\treturn Object.prototype.toString.call(obj) == '[object Function]';\n}\n\nfunction nan(value) {\n\treturn typeof value === \"number\" && isNaN(value);\n}\n\nfunction isArray$1(obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Array]';\n}\n\nfunction isString(obj) {\n\treturn typeof obj === 'string';\n}\n\nfunction isInArray(arr, item) {\n\tfor (var i = arr.length; --i > -1;) {\n\t\tif (item === arr[i]) return true;\n\t}\n\treturn false;\n}\n\nfunction getRootName(prop, path) {\n\tif (path === '#') {\n\t\treturn prop;\n\t}\n\treturn path.split('-')[1];\n}\n\nobaa.add = function (obj, prop) {\n\twatch(obj, prop, obj.$_o_.$_p_, obj.$_o_.$_r_);\n};\n\nobaa.set = function (obj, prop, value) {\n\tif (obj[prop] === undefined) {\n\t\twatch(obj, prop, obj.$_o_.$_p_, obj.$_o_.$_r_);\n\t}\n\tobj[prop] = value;\n};\n\nArray.prototype.size = function (length) {\n\tthis.length = length;\n};\n\n/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {object} [store]\n *\t@public\n */\nfunction render(vnode, parent, store, empty, merge) {\n parent = typeof parent === 'string' ? document.querySelector(parent) : parent;\n\n if (store) {\n if (store.data) {\n obsStore(store);\n } else {\n options.isMultiStore = true;\n for (var key in store) {\n if (store[key].data) {\n obsStore(store[key], key);\n }\n }\n }\n }\n\n if (empty) {\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n }\n\n if (merge) {\n merge = typeof merge === 'string' ? document.querySelector(merge) : merge;\n }\n\n return diff(merge, vnode, store, false, parent, false);\n}\n\nfunction obsStore(store, storeName) {\n\n store.instances = [];\n store.updateSelfInstances = [];\n extendStoreUpate(store, storeName);\n\n obaa(store.data, function (prop, val, old, path) {\n var patchs = {};\n var key = fixPath(path + '-' + prop);\n patchs[key] = true;\n store.update(patchs);\n });\n}\n\nfunction merge(vnode, merge, store) {\n obsStore(store);\n\n merge = typeof merge === 'string' ? document.querySelector(merge) : merge;\n\n return diff(merge, vnode, store);\n}\n\nfunction extendStoreUpate(store, key) {\n store.update = function (patch) {\n if (Object.keys(patch).length > 0) {\n this.instances.forEach(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key])) {\n if (instance.use) {\n getUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key);\n }\n\n instance.update();\n }\n } else {\n if (instance._updatePath && needUpdate(patch, instance._updatePath)) {\n if (instance.use) {\n instance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use);\n }\n instance.update();\n }\n }\n });\n\n this.updateSelfInstances.forEach(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key])) {\n if (instance.useSelf) {\n getUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key);\n }\n\n instance.updateSelf();\n }\n } else {\n if (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n instance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf);\n instance.updateSelf();\n }\n }\n });\n\n this.onChange && this.onChange(patch);\n }\n };\n}\n\nfunction compute(instance, isMultiStore) {\n if (instance.compute) {\n for (var ck in instance.compute) {\n instance.computed[ck] = instance.compute[ck].call(isMultiStore ? instance.store : instance.store.data);\n }\n }\n}\n\nfunction needUpdate(diffResult, updatePath) {\n for (var keyA in diffResult) {\n if (updatePath[keyA]) {\n return true;\n }\n for (var keyB in updatePath) {\n if (includePath(keyA, keyB)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction includePath(pathA, pathB) {\n if (pathA.indexOf(pathB) === 0) {\n var next = pathA.substr(pathB.length, 1);\n if (next === '[' || next === '.') {\n return true;\n }\n }\n return false;\n}\n\nfunction fixPath(path) {\n var mpPath = '';\n var arr = path.replace('#-', '').split('-');\n arr.forEach(function (item, index) {\n if (index) {\n if (isNaN(Number(item))) {\n mpPath += '.' + item;\n } else {\n mpPath += '[' + item + ']';\n }\n } else {\n mpPath += item;\n }\n });\n return mpPath;\n}\n\nfunction _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar storeHelpers = ['use', 'useSelf'];\n\nfunction define(name, ctor, config) {\n\tif (ctor.is === 'WeElement') {\n\t\toptions.mapping[name] = ctor;\n\t} else {\n\n\t\tif (typeof config === 'string') {\n\t\t\tconfig = { css: config };\n\t\t} else {\n\t\t\tconfig = config || {};\n\t\t}\n\n\t\tvar Comp = function (_Component) {\n\t\t\t_inherits(Comp, _Component);\n\n\t\t\tfunction Comp() {\n\t\t\t\tvar _temp, _this, _ret;\n\n\t\t\t\t_classCallCheck$1(this, Comp);\n\n\t\t\t\tfor (var _len = arguments.length, args = Array(_len), key = 0; key < _len; key++) {\n\t\t\t\t\targs[key] = arguments[key];\n\t\t\t\t}\n\n\t\t\t\treturn _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.compute = config.compute, _temp), _possibleConstructorReturn(_this, _ret);\n\t\t\t}\n\n\t\t\tComp.prototype.render = function render() {\n\t\t\t\treturn ctor.call(this, this);\n\t\t\t};\n\n\t\t\treturn Comp;\n\t\t}(Component);\n\n\t\tComp.css = config.css;\n\t\tComp.propTypes = config.propTypes;\n\t\tComp.defaultProps = config.defaultProps;\n\n\t\tvar _loop = function _loop(key) {\n\t\t\tif (typeof config[key] === 'function') {\n\t\t\t\tComp.prototype[key] = function () {\n\t\t\t\t\treturn config[key].apply(this, arguments);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\tfor (var key in config) {\n\t\t\t_loop(key);\n\t\t}\n\n\t\tstoreHelpers.forEach(function (func) {\n\t\t\tif (config[func] && config[func] !== 'function') {\n\t\t\t\tComp.prototype[func] = function () {\n\t\t\t\t\treturn config[func];\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\n\t\toptions.mapping[name] = Comp;\n\t}\n}\n\nfunction rpx(str) {\n return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, function (a, b) {\n return window.innerWidth * Number(b) / 750 + 'px';\n });\n}\n\nfunction tag(name) {\n return function (target) {\n define(name, target);\n };\n}\n\n/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty;\n\nfunction classNames() {\n var classes = [];\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n if (!arg) continue;\n\n var argType = typeof arg;\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg);\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg);\n if (inner) {\n classes.push(inner);\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(' ');\n}\n\nfunction extractClass() {\n var _Array$prototype$slic = Array.prototype.slice.call(arguments, 0),\n props = _Array$prototype$slic[0],\n args = _Array$prototype$slic.slice(1);\n\n if (props) {\n if (props['class']) {\n args.unshift(props['class']);\n delete props['class'];\n } else if (props.className) {\n args.unshift(props.className);\n delete props.className;\n }\n }\n if (args.length > 0) {\n return { 'class': classNames.apply(null, args) };\n }\n}\n\nfunction getHost(component) {\n var base = component.base;\n if (base) {\n while (base.parentNode) {\n if (base.parentNode._component) {\n return base.parentNode._component;\n } else {\n base = base.parentNode;\n }\n }\n }\n}\n\n/**\n * preact-render-to-string based on preact-render-to-string\n * by Jason Miller\n * Licensed under the MIT License\n * https://github.com/developit/preact-render-to-string\n *\n * modified by dntzhang\n */\n\nvar encodeEntities = function encodeEntities(s) {\n return String(s).replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"');\n};\n\nvar indent = function indent(s, char) {\n return String(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n};\n\nvar mapping$1 = options.mapping;\n\nvar VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nvar isLargeString = function isLargeString(s, length, ignoreLines) {\n return String(s).length > (length || 40) || !ignoreLines && String(s).indexOf('\\n') !== -1 || String(s).indexOf('<') !== -1;\n};\n\nvar JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nfunction styleObjToCss(s) {\n var str = '';\n for (var prop in s) {\n var val = s[prop];\n if (val != null) {\n if (str) str += ' ';\n // str += jsToCss(prop);\n str += JS_TO_CSS[prop] || (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n str += ': ';\n str += val;\n if (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n str += 'px';\n }\n str += ';';\n }\n }\n return str || undefined;\n}\n\nfunction renderToString(vnode, opts, store, isSvgMode) {\n store = store || {};\n opts = Object.assign({\n scopedCSS: true\n }, opts);\n var css = {};\n var html = _renderToString(vnode, opts, store, isSvgMode, css);\n return {\n css: Object.values(css),\n html: html\n };\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, opts, store, isSvgMode, css) {\n if (vnode == null || typeof vnode === 'boolean') {\n return '';\n }\n\n var nodeName = vnode.nodeName,\n attributes = vnode.attributes,\n isComponent = false;\n\n var pretty = true && opts.pretty,\n indentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n // #text nodes\n if (typeof vnode !== 'object' && !nodeName) {\n return encodeEntities(vnode);\n }\n\n // components\n var ctor = mapping$1[nodeName];\n if (ctor) {\n isComponent = true;\n\n var props = getNodeProps$1(vnode),\n rendered;\n // class-based components\n var c = new ctor(props, store);\n // turn off stateful re-rendering:\n c._disable = c.__x = true;\n c.props = props;\n c.store = store;\n if (c.install) c.install();\n if (c.beforeRender) c.beforeRender();\n rendered = c.render(c.props, c.store);\n\n if (opts.scopedCSS) {\n\n if (c.constructor.css || c.css) {\n\n var cssStr = c.constructor.css ? c.constructor.css : typeof c.css === 'function' ? c.css() : c.css;\n var cssAttr = '_s' + getCtorName(c.constructor);\n css[cssAttr] = {\n id: cssAttr,\n css: scoper(cssStr, cssAttr)\n };\n addScopedAttrStatic(rendered, cssAttr);\n }\n\n c.scopedCSSAttr = vnode.css;\n scopeHost(rendered, c.scopedCSSAttr);\n }\n\n return _renderToString(rendered, opts, store, false, css);\n }\n\n // render JSX to HTML\n var s = '',\n html;\n\n if (attributes) {\n var attrs = Object.keys(attributes);\n\n // allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n if (opts && opts.sortAttributes === true) attrs.sort();\n\n for (var i = 0; i < attrs.length; i++) {\n var name = attrs[i],\n v = attributes[name];\n if (name === 'children') continue;\n\n if (name.match(/[\\s\\n\\\\/='\"\\0<>]/)) continue;\n\n if (!(opts && opts.allAttributes) && (name === 'key' || name === 'ref')) continue;\n\n if (name === 'className') {\n if (attributes['class']) continue;\n name = 'class';\n } else if (isSvgMode && name.match(/^xlink:?./)) {\n name = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n }\n\n if (name === 'style' && v && typeof v === 'object') {\n v = styleObjToCss(v);\n }\n\n var hooked = opts.attributeHook && opts.attributeHook(name, v, store, opts, isComponent);\n if (hooked || hooked === '') {\n s += hooked;\n continue;\n }\n\n if (name === 'dangerouslySetInnerHTML') {\n html = v && v.__html;\n } else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n if (v === true || v === '') {\n v = name;\n // in non-xml mode, allow boolean attributes\n if (!opts || !opts.xml) {\n s += ' ' + name;\n continue;\n }\n }\n s += ' ' + name + '=\"' + encodeEntities(v) + '\"';\n }\n }\n }\n\n // account for >1 multiline attribute\n if (pretty) {\n var sub = s.replace(/^\\n\\s*/, ' ');\n if (sub !== s && !~sub.indexOf('\\n')) s = sub;else if (pretty && ~s.indexOf('\\n')) s += '\\n';\n }\n\n s = '<' + nodeName + s + '>';\n if (String(nodeName).match(/[\\s\\n\\\\/='\"\\0<>]/)) throw s;\n\n var isVoid = String(nodeName).match(VOID_ELEMENTS);\n if (isVoid) s = s.replace(/>$/, ' />');\n\n var pieces = [];\n if (html) {\n // if multiline, indent.\n if (pretty && isLargeString(html)) {\n html = '\\n' + indentChar + indent(html, indentChar);\n }\n s += html;\n } else if (vnode.children) {\n var hasLarge = pretty && ~s.indexOf('\\n');\n for (var i = 0; i < vnode.children.length; i++) {\n var child = vnode.children[i];\n if (child != null && child !== false) {\n var childSvgMode = nodeName === 'svg' ? true : nodeName === 'foreignObject' ? false : isSvgMode,\n ret = _renderToString(child, opts, store, childSvgMode, css);\n if (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n if (ret) pieces.push(ret);\n }\n }\n if (pretty && hasLarge) {\n for (var i = pieces.length; i--;) {\n pieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n }\n }\n }\n\n if (pieces.length) {\n s += pieces.join('');\n } else if (opts && opts.xml) {\n return s.substring(0, s.length - 1) + ' />';\n }\n\n if (!isVoid) {\n if (pretty && ~s.indexOf('\\n')) s += '\\n';\n s += '';\n }\n\n return s;\n}\n\nfunction assign$1(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\nfunction getNodeProps$1(vnode) {\n var props = assign$1({}, vnode.attributes);\n props.children = vnode.children;\n\n var defaultProps = vnode.nodeName.defaultProps;\n if (defaultProps !== undefined) {\n for (var i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i];\n }\n }\n }\n\n return props;\n}\n\nh.f = Fragment;\n\nvar html = htm.bind(h);\n\nvar WeElement = Component;\nvar defineElement = define;\nfunction createRef() {\n return {};\n}\n\noptions.root.Omi = {\n h: h,\n createElement: h,\n cloneElement: cloneElement,\n createRef: createRef,\n Component: Component,\n render: render,\n rerender: rerender,\n options: options,\n WeElement: WeElement,\n define: define,\n rpx: rpx,\n defineElement: defineElement,\n classNames: classNames,\n extractClass: extractClass,\n getHost: getHost,\n renderToString: renderToString,\n tag: tag,\n merge: merge,\n html: html,\n htm: htm,\n obaa: obaa\n};\noptions.root.omi = options.root.Omi;\noptions.root.Omi.version = 'omio-2.8.0';\n\nvar omi = {\n h: h,\n createElement: h,\n cloneElement: cloneElement,\n createRef: createRef,\n Component: Component,\n render: render,\n rerender: rerender,\n options: options,\n WeElement: WeElement,\n define: define,\n rpx: rpx,\n defineElement: defineElement,\n classNames: classNames,\n extractClass: extractClass,\n getHost: getHost,\n renderToString: renderToString,\n tag: tag,\n merge: merge,\n html: html,\n htm: htm,\n obaa: obaa\n};\n\nexport default omi;\nexport { h, h as createElement, cloneElement, createRef, Component, render, rerender, options, WeElement, define, rpx, defineElement, classNames, extractClass, getHost, renderToString, tag, merge, html, obaa };\n//# sourceMappingURL=omi.esm.js.map\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/omio/dist/omi.esm.js","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/css-loader/lib/css-base.js","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n\n// WEBPACK FOOTER //\n// (webpack)/buildin/global.js","'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._75 = 0;\n this._83 = 0;\n this._18 = null;\n this._38 = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._47 = null;\nPromise._71 = null;\nPromise._44 = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._83 === 3) {\n self = self._18;\n }\n if (Promise._47) {\n Promise._47(self);\n }\n if (self._83 === 0) {\n if (self._75 === 0) {\n self._75 = 1;\n self._38 = deferred;\n return;\n }\n if (self._75 === 1) {\n self._75 = 2;\n self._38 = [self._38, deferred];\n return;\n }\n self._38.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._83 === 1) {\n resolve(deferred.promise, self._18);\n } else {\n reject(deferred.promise, self._18);\n }\n return;\n }\n var ret = tryCallOne(cb, self._18);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._83 = 3;\n self._18 = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._83 = 1;\n self._18 = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._83 = 2;\n self._18 = newValue;\n if (Promise._71) {\n Promise._71(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._75 === 1) {\n handle(self, self._38);\n self._38 = null;\n }\n if (self._75 === 2) {\n for (var i = 0; i < self._38.length; i++) {\n handle(self, self._38[i]);\n }\n self._38 = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/core.js","'use strict';\n\nif (typeof Promise === 'undefined') {\n // Rejection tracking prevents a common issue where React gets into an\n // inconsistent state due to an error, but it gets swallowed by a Promise,\n // and the user has no idea what causes React's erratic future behavior.\n require('promise/lib/rejection-tracking').enable();\n window.Promise = require('promise/lib/es6-extensions.js');\n}\n\n// fetch() polyfill for making API calls.\nrequire('whatwg-fetch');\n\n// Object.assign() is commonly used with React.\n// It will use the native implementation if it's present and isn't buggy.\nObject.assign = require('object-assign');\n\n// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.\n// We don't polyfill it in the browser--this is user's responsibility.\nif (process.env.NODE_ENV === 'test') {\n require('raf').polyfill(global);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./config/polyfills.js","'use strict';\n\nvar Promise = require('./core');\n\nvar DEFAULT_WHITELIST = [\n ReferenceError,\n TypeError,\n RangeError\n];\n\nvar enabled = false;\nexports.disable = disable;\nfunction disable() {\n enabled = false;\n Promise._47 = null;\n Promise._71 = null;\n}\n\nexports.enable = enable;\nfunction enable(options) {\n options = options || {};\n if (enabled) disable();\n enabled = true;\n var id = 0;\n var displayId = 0;\n var rejections = {};\n Promise._47 = function (promise) {\n if (\n promise._83 === 2 && // IS REJECTED\n rejections[promise._56]\n ) {\n if (rejections[promise._56].logged) {\n onHandled(promise._56);\n } else {\n clearTimeout(rejections[promise._56].timeout);\n }\n delete rejections[promise._56];\n }\n };\n Promise._71 = function (promise, err) {\n if (promise._75 === 0) { // not yet handled\n promise._56 = id++;\n rejections[promise._56] = {\n displayId: null,\n error: err,\n timeout: setTimeout(\n onUnhandled.bind(null, promise._56),\n // For reference errors and type errors, this almost always\n // means the programmer made a mistake, so log them after just\n // 100ms\n // otherwise, wait 2 seconds to see if they get handled\n matchWhitelist(err, DEFAULT_WHITELIST)\n ? 100\n : 2000\n ),\n logged: false\n };\n }\n };\n function onUnhandled(id) {\n if (\n options.allRejections ||\n matchWhitelist(\n rejections[id].error,\n options.whitelist || DEFAULT_WHITELIST\n )\n ) {\n rejections[id].displayId = displayId++;\n if (options.onUnhandled) {\n rejections[id].logged = true;\n options.onUnhandled(\n rejections[id].displayId,\n rejections[id].error\n );\n } else {\n rejections[id].logged = true;\n logError(\n rejections[id].displayId,\n rejections[id].error\n );\n }\n }\n }\n function onHandled(id) {\n if (rejections[id].logged) {\n if (options.onHandled) {\n options.onHandled(rejections[id].displayId, rejections[id].error);\n } else if (!rejections[id].onUnhandled) {\n console.warn(\n 'Promise Rejection Handled (id: ' + rejections[id].displayId + '):'\n );\n console.warn(\n ' This means you can ignore any previous messages of the form \"Possible Unhandled Promise Rejection\" with id ' +\n rejections[id].displayId + '.'\n );\n }\n }\n }\n}\n\nfunction logError(id, error) {\n console.warn('Possible Unhandled Promise Rejection (id: ' + id + '):');\n var errStr = (error && (error.stack || error)) + '';\n errStr.split('\\n').forEach(function (line) {\n console.warn(' ' + line);\n });\n}\n\nfunction matchWhitelist(error, list) {\n return list.some(function (cls) {\n return error instanceof cls;\n });\n}\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/rejection-tracking.js","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/asap/browser-raw.js","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/promise/lib/es6-extensions.js","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/whatwg-fetch/fetch.js","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/object-assign/index.js","var n=function(t,r,u,e){for(var p=1;p=5&&((e||!n&&5===u)&&(s.push(e,u,r),u=6),n&&(s.push(n,u,r),u=6)),e=\"\"},a=0;a\"===t?(u=1,e=\"\"):e=t+e[0]:p?t===p?p=\"\":e+=t:'\"'===t||\"'\"===t?p=t:\">\"===t?(h(),u=1):u&&(\"=\"===t?(u=5,r=e,e=\"\"):\"/\"===t&&(u<5||\">\"===n[a][f+1])?(h(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,2),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(h(),u=2):e+=t),3===u&&\"!--\"===e&&(u=4,s=s[0])}return h(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/htm/dist/htm.module.js","import { define, WeElement } from 'omi'\n\nimport './my-head'\nimport './my-content'\nimport './my-sidebar'\nimport './my-demo'\n\ndefine('my-frame', class extends WeElement {\n\n installed(){\n this.store.init()\n }\n\n render() {\n return (\n
\n \n
\n \n
\n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-frame.js","import { define, WeElement } from 'omi'\nimport logo from './omi-logo2019.svg'\n\ndefine('my-head', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position'\n ]\n\n toggleMenus = evt => {\n this.store.toogleSidebar()\n evt.stopPropagation()\n }\n\n hideSidebar = evt => {\n this.store.hideSidebar()\n }\n\n render() {\n return (\n
\n
\n \"\"\n
\n\n \n \n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-head/index.js","module.exports = __webpack_public_path__ + \"static/media/omi-logo2019.923166c3.svg\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/omi-logo2019.svg\n// module id = 14\n// module chunks = 10 11","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAqklEQVRoQ+2WQQ6AMAgE4f+Pxg+oSTNbDXR7Z5UZQpvR/GTz/w838LdBG7ABSMAjBAHichvACGHAXANVVRCOtDwzb2E/GnADUv4R5xkQA9wWN3cLbUMmDrYBMdDluLkGfJEtD8N7wXkXWfsREk/Atri5W2gbMnGwDYiBLsfNNdB+jbqB5Wn2U0KM7KO4uVvoI4D4MzaAEcIAG4AAcbkNYIQwwAYgQFze3sAFU6MwMZGH3LoAAAAASUVORK5CYII=\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/menu.png\n// module id = 15\n// module chunks = 10 11","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-head/_index.css\n// module id = 16\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".head{\\n position:fixed;\\n height:60px;\\n line-height: 60px;\\n border-bottom: 1px solid #eee;\\n width:100%;\\n background-color:#24292e;\\n z-index:100;\\n top: 0;\\n}\\n\\nul,li{\\n display: inline-block;\\n}\\n\\n.logo_box{\\n width:100px;\\n display: inline-block;\\n text-align:center;\\n line-height: 60px;\\n}\\n\\n.menu a,.logo_box a{\\n display: inline-block;\\n height:60px;\\n color: white;\\n}\\n\\n.menu{\\n position: absolute;\\n right:20px;\\n}\\n\\n.menu li{\\n margin-left:15px;\\n}\\n\\n.logo_box a{\\n font-size: 34px;\\n font-weight: bold;\\n color: #00bff3;\\n padding: 0px 15px;\\n line-height: 60px;\\n cursor: pointer;\\n}\\n\\n.menu a:hover{\\n color: white;\\n}\\n\\n.m_menu{\\n position:fixed;\\n display:none;\\n cursor: pointer;\\n}\\n\\n.menu li{\\n display:inline-block;\\n}\\n\\n.logo{\\n width: 40px;\\n height: 40px;\\n margin-left: 10px;\\n margin-top: 10px;\\n cursor: pointer;\\n}\\n\\n@media only screen and (max-width: 800px) {\\n\\n .logo_box{\\n display:inline-block;\\n }\\n\\n .logo{\\n display: none;\\n }\\n\\n .head{\\n text-align:center;\\n }\\n\\n .m_menu{\\n top:0;\\n left:0;\\n display:block;\\n width:50px;\\n height:50px;\\n padding-top: 6px;\\n }\\n\\n .m_menu img{\\n width:30px;\\n }\\n\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-head/_index.css\n// module id = 17\n// module chunks = 10 11","import { define, WeElement } from 'omi'\nimport '../my-footer'\n\ndefine('my-content', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'html'\n ]\n\n install() {\n this.store.myContent = this\n }\n\n installed() {\n this.initCodeStyle()\n }\n\n afterUpdate() {\n this.initCodeStyle()\n }\n\n touchEnd = () => {\n this.store.hideSidebar()\n }\n\n initCodeStyle() {\n let codes = document.querySelectorAll('code')\n\n let codesArr = Array.prototype.slice.call(codes);\n let codeHlNumArr = []\n codesArr.forEach(code => {\n let arr = code.className.match(/{([\\S\\s]*)}/)\n let pre = code.parentNode\n //bug!\n arr && pre.setAttribute('data-line', arr[1])\n if (code.className) {\n pre.className = code.className\n\n const temp = code.className.match(/language-\\w*/g)[0]\n if (temp) {\n code.innerHTML = Prism.highlight(code.innerText, Prism.languages[temp.split('-')[1]], temp.split('-')[1])\n }\n } else {\n let pre = code.parentNode\n code.className = 'language-markup'\n pre.className = 'language-markup'\n code.innerHTML = Prism.highlight(code.innerText, Prism.languages.markup, 'markup')\n }\n // let hllNums = null\n // if (arr) {\n // let numArr = arr[0].replace(/[{|}]/g, '').split(',')\n // hllNums = this._arrToNumber(numArr)\n // }\n //codeHlNumArr.push(hllNums)\n })\n\n // codesArr.forEach((code, index) => {\n // let newP = document.createElement('div')\n // newP.className = '_code-ctn'\n // let pre = code.parentNode\n // let ctn = pre.parentNode\n // if (pre.nodeName === 'PRE') {\n // ctn.insertBefore(newP, pre)\n\n // let hl = document.createElement('div')\n // hl.className = '_hl'\n // newP.appendChild(hl)\n // newP.appendChild(pre)\n // let nums = codeHlNumArr[index]\n\n // let max = Math.max.apply(null, nums)\n\n // let inner = ''\n // for (let i = 0; i <= max; i++) {\n // if (nums.indexOf(i) == -1) {\n // inner += '
'\n // } else {\n // inner += '
'\n // }\n // }\n // hl.innerHTML = inner\n // }\n // })\n //fix line-highlight\n window.dispatchEvent(new Event('resize'));\n }\n\n _arrToNumber(numArr) {\n let arr = []\n numArr.forEach(item => {\n if (item.indexOf('-') !== -1) {\n const tempArr = item.split('-')\n const begin = Number(tempArr[0])\n const end = Number(tempArr[1])\n for (let i = begin; i < end + 1; i++) {\n arr.push(i)\n }\n } else {\n arr.push(Number(item))\n }\n })\n return arr\n }\n\n render() {\n return (\n
\n \n \n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-content/index.js","import { define, WeElement } from 'omi'\n\ndefine('my-footer', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position',\n 'menu'\n ]\n\n render() {\n const [\n position,\n menus\n ] = this.using\n const pre = this.store.getPre()\n const next = this.store.getNext()\n\n return (\n
\n {pre &&← {pre.name}}\n {next &&}\n
\n )\n }\n\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-footer/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-footer/_index.css\n// module id = 20\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".ft{\\n position: relative;\\n margin-top: 20px\\n}\\n\\n.pre{\\n position: absolute;\\n left:15px;\\n}\\n\\n.next{\\n position: absolute;\\n right: 15px;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-footer/_index.css\n// module id = 21\n// module chunks = 10 11","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-content/_index.css\n// module id = 22\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \".content{\\n position: relative;\\n padding: 70px 30px;\\n max-width: 900px;\\n margin: 0 auto;\\n\\n}\\n\\n@media screen and (max-width: 1500px){\\n .content {\\n margin-left: 290px;\\n }\\n}\\n\\nh3{\\n color:#444444;\\n}\\n\\npre{\\n border: 1px solid #eee;\\n width: 100%;\\n}\\nli{\\n text-indent: 20px;\\n list-style:disc inside ;\\n}\\n\\n@media only screen and (max-width: 800px) {\\n .content{\\n margin-left: 0;\\n border-left: none;\\n padding: 70px 10px 70px 10px;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-content/_index.css\n// module id = 23\n// module chunks = 10 11","import { define, WeElement } from 'omi'\nimport '../my-list'\n\ndefine('my-sidebar', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'menus',\n 'sideBarShow',\n 'lan'\n ]\n\n render() {\n const [menus, sideBarShow, lan] = this.using\n\n return (\n
\n {menus[lan].map((menu, index) => (\n \n ))}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-sidebar/index.js","import { define, WeElement } from 'omi'\n\ndefine('my-list', class extends WeElement {\n static css = require('./_index.css')\n\n use = [\n 'position'\n ]\n\n render(props) {\n const [position] = this.using\n\n return (\n
    \n
  • {props.menu.title}
  • \n {props.menu.list &&\n props.menu.list.map((item, subIndex) => {\n const cls = position[0] === props.index && position[1] === subIndex ? { class: 'current' } : null\n return
  • \n \n {item.name}\n \n
  • \n })}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-list/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-list/_index.css\n// module id = 26\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"li.title{\\n font-size: 14px;\\n font-weight: bold;\\n margin-bottom:10px;\\n margin-top:10px;\\n text-indent: 23px;\\n}\\nli{\\n margin-bottom:1px;\\n text-indent: 33px;\\n}\\nli a{\\n display:block;\\n font-size:14px;\\n height:30px;\\n line-height:30px;\\n color: black;\\n background-color:#eee;\\n}\\nli a.current,li a.current:hover{\\n background-color:#24292e;\\n color: white;\\n cursor: default;\\n}\\nli a:hover{\\n background-color:#f0f8ff;\\n}\\n\\n\\nul,li{\\n list-style:none;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-list/_index.css\n// module id = 27\n// module chunks = 10 11","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-sidebar/_index.css\n// module id = 28\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"@media only screen and (max-width: 800px) {\\n .list{\\n transform: translateX(-100%);\\n background-color:white;\\n left:0 !important;\\n -moz-transition: all .6s ease;\\n -o-transition: all .6s ease;\\n -webkit-transition: all .6s ease;\\n transition: all .6s ease;\\n width: 70% !important;\\n z-index: 100000;\\n border-right: none !important;\\n }\\n\\n .list.show {\\n -moz-transform: translateX(0%) translateZ(0);\\n -ms-transform: translateX(0%) translateZ(0);\\n -o-transform: translateX(0%) translateZ(0);\\n -webkit-transform: translateX(0%) translateZ(0);\\n transform: translateX(0%) translateZ(0);\\n }\\n}\\n\\n.list{\\n width: 261px;\\n text-indent: 20px;\\n border-right: 1px solid #eee;\\n overflow-x: hidden;\\n overflow-y: auto;\\n position:fixed;\\n top:60px;\\n background-color: white;\\n height: 100%;\\n border-right: 1px solid #ccc;\\n padding-bottom: 100px;\\n}\\n.version{\\n height:20px;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-sidebar/_index.css\n// module id = 29\n// module chunks = 10 11","import { define, WeElement } from 'omi'\nimport css from './_index.css'\n\ndefine('my-demo', class extends WeElement {\n install() {\n this.store.myDemo = this\n if(this.checkPc())\n this.show = true\n else\n this.show = false\n this.demo = this.store.demo\n }\n\n css() {\n return css\n }\n\n checkPc() {\n let userAgentInfo = navigator.userAgent\n let mp = [\"Android\", \"iPhone\", \"SymbianOS\", \"Windows Phone\", \"iPad\", \"iPod\"]\n for (let i = 0; i < mp.length; i++)\n if (userAgentInfo.indexOf(mp[i]) > 0)\n return false\n return true\n }\n\n onShow = () => {\n this.show = true\n this.update()\n }\n\n onClose = () => {\n this.show = false\n this.update()\n }\n \n render() {\n if(!this.demo) return\n return (\n
\n { this.show && }\n\n {!this.show &&
\n \n
}\n\n {this.show &&
\n \n
}\n
\n )\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/elements/my-demo/index.js","\n var result = require(\"!!../../../node_modules/css-loader/index.js!./_index.css\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n \n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/_index.css\n// module id = 31\n// module chunks = 10 11","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(undefined);\n// imports\n\n\n// module\nexports.push([module.id, \"iframe{\\n width: 750px;\\n height: 100%;\\n top: 60px;\\n right: 0;\\n position: fixed;\\n border: none;\\n z-index: 9999;\\n border-left: 2px solid #24292E;\\n}\\n\\n.switch{\\n width: 40px;\\n height: 40px;\\n background-color: #AA0000;\\n border-radius: 50%;\\n position: fixed;\\n right: 50px;\\n bottom: 50px;\\n cursor: pointer;\\n text-align: center;\\n z-index: 10000;\\n}\\n\\n.switch img{\\n width: 30px;\\n height: 30px;\\n margin-top:5px;\\n}\\n\\n.switch.close img{\\n margin-top:10px;\\n width: 20px;\\n height: 20px;\\n}\\n\\n\\n@media only screen and (max-width: 800px) {\\n iframe{\\n width: 100%;\\n }\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader!./src/elements/my-demo/_index.css\n// module id = 32\n// module chunks = 10 11","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfiDBQMEgYVXhFiAAABVklEQVRIx+3UsU4UURSA4TNARoiJcR9BCwwJNNpRU0hjpS+hDTTyGkAD1UJnRzCbYKRAKzt9AaMxJoR+Ewho8dEMm5nZOzObbfVUM+ec/79n7uTeiP8xUfjiq6Xp8Ufg6fSCN7iQpasztebcttVaz3pEnGQirNqWt62VG2CoV8rNu8TLCD1DDBoVBc5BeVzr+OthhMwBjQq59wVe+Sy7+FQ8Z/bBB/MT4hG+4+3oLa0Y4f0x/AlYLmUyezVFMx5hE79ruaqiDY9wir2xbFnhqAW/7xovEpUZfXCUwEqxFvfiJs5ae+SO0/sfYR8fE8zdvzi524UGhV/Y6MCbp7ACFjvxiuKd2VFuCz/GNu8wgacVPmNnQrxQlA6TB/7geWX4tsNUUgz1IrzClYVStes4F4riQtHHoFbtulAq457j9UTNScEz8Li7c64hfxXf4jr7OfUE/1TcAoyIn6j/RilHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTEyLTIwVDExOjE4OjA2KzAxOjAwT3khJwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMi0yMFQxMToxODowNiswMTowMD4kmZsAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/code.png\n// module id = 33\n// module chunks = 10 11","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfiDBQMERzDEbvbAAAArElEQVQ4y6XVOw6DMBBFUSf7SmGy2ZCNBerIJN2lAQn/34ArZHFsi3mDHW9mvDMOPDOjYwKCjeMJwGd/MPBI8OALBJ4S3d8e0okuz6jOi1TjVdrnTdrmXVrnEi1zmebcRGNupgf+YzHTjS8A/Ov0Lqxzs+97PLbUMukHG2wd59LimHheHJmX6yrxeiS6vJ2mJu8Hscq1DBe5Hv+M2zon4pd++teum5Hp5EX3WgGu+8eCI/n/bQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMi0yMFQxMToxNzoyOCswMTowMKxoBooAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTItMjBUMTE6MTc6MjgrMDE6MDDdNb42AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/elements/my-demo/close.png\n// module id = 34\n// module chunks = 10 11","import config from '../docs/config.js'\nimport 'omi-router'\n\nclass Store {\n constructor(data) {\n this.data = {\n position: [-1, -1],\n menus: config.menus,\n lan: data.lan,\n html: '',\n sideBarShow: false\n }\n let id = 0\n this.map = {}\n this.positionMap = {}\n config.menus[this.data.lan].forEach((menu, index) => {\n menu.list.forEach((item, subIndex) => {\n item.id = id++\n item.position = [index, subIndex]\n this.map[item.id] = item\n item.index = index\n item.subIndex = subIndex\n this.positionMap[index+'-'+subIndex] = item\n })\n })\n this.preIndex = 0\n this.preSubIndex = 0\n }\n\n getNext(){\n const item = this.positionMap[this.data.position.join('-')]\n if(item){\n return this.map[item.id+1]\n }\n }\n\n getPre(){\n const item = this.positionMap[this.data.position.join('-')]\n if(item){\n return this.map[item.id-1]\n }\n }\n\n init() {\n this.remarkable = new Remarkable({ html: true })\n if (location.hash === \"\") {\n this.data.position = [0, 0]\n this.getMarkDown(this.data.menus[this.data.lan][0].list[0].md, this.data.lan, m => {\n this.data.html = this.remarkable.render(m)\n })\n }\n this.initRouter()\n }\n\n toogleSidebar() {\n this.data.sideBarShow = !this.data.sideBarShow\n }\n\n hideSidebar() {\n this.data.sideBarShow = false\n }\n\n initRouter() {\n const menus = this.data.menus[this.data.lan]\n menus.forEach(item => {\n item.list.forEach(subItem => {\n route('/' + subItem.md, evt => {\n menus[this.preIndex].list[this.preSubIndex].selected = false\n this.preIndex = evt.query.index\n this.preSubIndex = evt.query.subIndex\n this.data.position = [Number(evt.query.index), Number(evt.query.subIndex)]\n this.data.sideBarShow = false\n\n this.getMarkDown(subItem.md, this.data.lan, m => {\n this.data.html = this.remarkable.render(m)\n document.body.scrollTop = 0\n document.documentElement.scrollTop = 0\n })\n })\n })\n })\n }\n\n getMarkDown(name, lan, callback) {\n import('../docs/' + lan + '/' + name + '.md').then(m => {\n callback(m)\n })\n }\n}\n\nexport default Store\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/index.js","const config = {\n menus: {\n 'zh-cn': [\n {\n title: 'OMIU',\n list: [\n { name: '简介', md: 'introduction' }\n ]\n },\n {\n title: '基础组件',\n list: [\n { name: 'Button 按钮', md: 'button' },\n { name: 'Tabs 选项卡', md: 'tabs' },\n { name: 'Radio 单选框', md: 'radio' },\n { name: 'Link 文字链接', md: 'link' }\n ]\n }\n\n ],\n en: [\n {\n title: 'OMIU',\n list: [\n { name: 'Introduction', md: 'introduction' }\n ]\n },\n {\n title: 'Base',\n list: [\n { name: 'Button', md: 'button' },\n { name: 'Tabs', md: 'tabs' },\n { name: 'Radio', md: 'radio' },\n { name: 'Link', md: 'link' }\n ]\n }\n ]\n }\n}\n\nexport default config\n\n\n\n// WEBPACK FOOTER //\n// ./src/docs/config.js","/*!\n * omi-router v2.1.0 by dntzhang\n * Router for Omi.\n * Github: https://github.com/Tencent/omi\n * MIT Licensed.\n */\n\nvar p2r = require('path-to-regexp')\nvar mapping = {}\nvar root = getGlobal()\n\nroot.route = route\nroot.route.params = null\nroot.historyLength = 0\n\nroot.route.to = function (path, data) {\n root.route._routeByTo = true\n root.route.data = data\n if (path[0] === '#') {\n location.hash = path\n } else {\n location.hash = '#' + path\n }\n}\n\nwindow.addEventListener('hashchange', change)\n\nfunction change(evt) {\n var byNative = false\n //need to fix a line by omi-link\n if(window.history.length === root.historyLength && !root.route._routeByTo){\n //keep alive mode\n byNative = true\n }\n root.route._routeByTo = false\n root.historyLength = window.history.length\n var prevent = false\n if (evt.type === 'hashchange' && root.route.before) {\n prevent = root.route.before(evt) === false\n }\n if (prevent) return\n var path = window.location.hash.replace('#', '')\n if(path === '') path = '/'\n var notFound = true\n Object.keys(mapping).every(function(key){\n var toArr = path.split('?')[0].match(mapping[key].reg)\n if (toArr) {\n var pathArr = key.match(mapping[key].reg)\n root.route.params = getParams(toArr, pathArr)\n root.route.query = getUrlParams(path)\n mapping[key].callback({\n params: root.route.params,\n query: getUrlParams(path),\n data: root.route.data,\n byNative: byNative\n })\n root.route.data = null\n notFound = false\n return false\n }\n return true\n })\n\n if (notFound) {\n mapping['*'] && mapping['*'].callback({ byNative: byNative })\n }\n\n if (evt.type === 'hashchange' && root.route.after) {\n root.route.after(evt)\n }\n}\n\ndocument.addEventListener('DOMContentLoaded', change)\n\nfunction getParams(toArr, pathArr) {\n var params = {}\n toArr.forEach(function (item, index) {\n if (index > 0) {\n params[pathArr[index].replace(':', '')] = item\n }\n })\n return params\n}\n\n\nexport default function route(path, callback) {\n mapping[path] = {\n callback: callback,\n reg: p2r(path)\n }\n}\n\nfunction getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function () {\n return this\n })()\n )\n }\n return global\n}\n\nfunction getUrlParams(url) {\n url = url.replace(/#.*$/, '')\n var queryArray = url.split(/[?&]/).slice(1)\n var i, args = {}\n for (i = 0; i < queryArray.length; i++) {\n var match = queryArray[i].match(/([^=]+)=([^=]+)/)\n if (match !== null) {\n args[match[1]] = decodeURIComponent(match[2])\n }\n }\n return args\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/omi-router/index.js","/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.match = match\nmodule.exports.regexpToFunction = regexpToFunction\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * Default configs.\n */\nvar DEFAULT_DELIMITER = '/'\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \":test(\\\\d+)?\" => [\"test\", \"\\d+\", undefined, \"?\"]\n // \"(\\\\d+)\" => [undefined, undefined, \"\\d+\", undefined]\n '(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = (options && options.delimiter) || DEFAULT_DELIMITER\n var whitelist = (options && options.whitelist) || undefined\n var pathEscaped = false\n var res\n\n while ((res = PATH_REGEXP.exec(str)) !== null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n pathEscaped = true\n continue\n }\n\n var prev = ''\n var name = res[2]\n var capture = res[3]\n var group = res[4]\n var modifier = res[5]\n\n if (!pathEscaped && path.length) {\n var k = path.length - 1\n var c = path[k]\n var matches = whitelist ? whitelist.indexOf(c) > -1 : true\n\n if (matches) {\n prev = c\n path = path.slice(0, k)\n }\n }\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n pathEscaped = false\n }\n\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var pattern = capture || group\n var delimiter = prev || defaultDelimiter\n\n tokens.push({\n name: name || key++,\n prefix: prev,\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n pattern: pattern\n ? escapeGroup(pattern)\n : '[^' + escapeString(delimiter === defaultDelimiter ? delimiter : (delimiter + defaultDelimiter)) + ']+?'\n })\n }\n\n // Push any remaining characters.\n if (path || index < str.length) {\n tokens.push(path + str.substr(index))\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Create path match function from `path-to-regexp` spec.\n */\nfunction match (str, options) {\n var keys = []\n var re = pathToRegexp(str, keys, options)\n return regexpToFunction(re, keys)\n}\n\n/**\n * Create a path match function from `path-to-regexp` output.\n */\nfunction regexpToFunction (re, keys) {\n return function (pathname, options) {\n var m = re.exec(pathname)\n if (!m) return false\n\n var path = m[0]\n var index = m.index\n var params = {}\n var decode = (options && options.decode) || decodeURIComponent\n\n for (var i = 1; i < m.length; i++) {\n if (m[i] === undefined) continue\n\n var key = keys[i - 1]\n\n if (key.repeat) {\n params[key.name] = m[i].split(key.delimiter).map(function (value) {\n return decode(value, key)\n })\n } else {\n params[key.name] = decode(m[i], key)\n }\n }\n\n return { path: path, index: index, params: params }\n }\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))\n }\n }\n\n return function (data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n var validate = options ? options.validate !== false : true\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$/()])/g, '\\\\$1')\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {Array=} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n if (!keys) return path\n\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n pattern: null\n })\n }\n }\n\n return path\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n return new RegExp('(?:' + parts.join('|') + ')', flags(options))\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n options = options || {}\n\n var strict = options.strict\n var start = options.start !== false\n var end = options.end !== false\n var delimiter = options.delimiter || DEFAULT_DELIMITER\n var endsWith = [].concat(options.endsWith || []).map(escapeString).concat('$').join('|')\n var route = start ? '^' : ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var capture = token.repeat\n ? '(?:' + token.pattern + ')(?:' + escapeString(token.delimiter) + '(?:' + token.pattern + '))*'\n : token.pattern\n\n if (keys) keys.push(token)\n\n if (token.optional) {\n if (!token.prefix) {\n route += '(' + capture + ')?'\n } else {\n route += '(?:' + escapeString(token.prefix) + '(' + capture + '))?'\n }\n } else {\n route += escapeString(token.prefix) + '(' + capture + ')'\n }\n }\n }\n\n if (end) {\n if (!strict) route += '(?:' + escapeString(delimiter) + ')?'\n\n route += endsWith === '$' ? '$' : '(?=' + endsWith + ')'\n } else {\n var endToken = tokens[tokens.length - 1]\n var isEndDelimited = typeof endToken === 'string'\n ? endToken[endToken.length - 1] === delimiter\n : endToken === undefined\n\n if (!strict) route += '(?:' + escapeString(delimiter) + '(?=' + endsWith + '))?'\n if (!isEndDelimited) route += '(?=' + escapeString(delimiter) + '|' + endsWith + ')'\n }\n\n return new RegExp(route, flags(options))\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {Array=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (path instanceof RegExp) {\n return regexpToRegexp(path, keys)\n }\n\n if (Array.isArray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), keys, options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), keys, options)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/path-to-regexp/index.js","var map = {\n\t\"./en/button.md\": [\n\t\t40,\n\t\t9\n\t],\n\t\"./en/introduction.md\": [\n\t\t41,\n\t\t8\n\t],\n\t\"./en/link.md\": [\n\t\t42,\n\t\t7\n\t],\n\t\"./en/radio.md\": [\n\t\t43,\n\t\t6\n\t],\n\t\"./en/tabs.md\": [\n\t\t44,\n\t\t5\n\t],\n\t\"./zh-cn/button.md\": [\n\t\t45,\n\t\t4\n\t],\n\t\"./zh-cn/introduction.md\": [\n\t\t46,\n\t\t3\n\t],\n\t\"./zh-cn/link.md\": [\n\t\t47,\n\t\t2\n\t],\n\t\"./zh-cn/radio.md\": [\n\t\t48,\n\t\t1\n\t],\n\t\"./zh-cn/tabs.md\": [\n\t\t49,\n\t\t0\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tvar ids = map[req];\n\tif(!ids)\n\t\treturn Promise.reject(new Error(\"Cannot find module '\" + req + \"'.\"));\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__(ids[0]);\n\t});\n};\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 39;\nmodule.exports = webpackAsyncContext;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/docs lazy ^\\.\\/.*\\.md$\n// module id = 39\n// module chunks = 10 11","import { render } from 'omi'\nimport './assets/index.css'\nimport './elements/my-frame.js'\nimport Store from './store'\n\nrender(, '#root', new Store({ lan: 'en' }))\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js"],"sourceRoot":""} \ No newline at end of file