diff --git a/README.CN.md b/README.CN.md
index 5c71b2646..f331ec376 100644
--- a/README.CN.md
+++ b/README.CN.md
@@ -257,8 +257,8 @@ npm i omi
ๆไป CDN ่ทๅ:
-* [https://unpkg.com/omi@3.0.0/dist/omi.min.js](https://unpkg.com/omi@3.0.0/dist/omi.min.js)
-* [https://unpkg.com/omi@3.0.0/dist/omi.js](https://unpkg.com/omi@3.0.0/dist/omi.js)
+* [https://unpkg.com/omi@3.0.1/dist/omi.min.js](https://unpkg.com/omi@3.0.1/dist/omi.min.js)
+* [https://unpkg.com/omi@3.0.1/dist/omi.js](https://unpkg.com/omi@3.0.1/dist/omi.js)
## Official Plugins
diff --git a/README.md b/README.md
index 3b8f69722..8bae36283 100644
--- a/README.md
+++ b/README.md
@@ -256,8 +256,8 @@ npm i omi
or get it from CDN:
-* [https://unpkg.com/omi@3.0.0/dist/omi.min.js](https://unpkg.com/omi@3.0.0/dist/omi.min.js)
-* [https://unpkg.com/omi@3.0.0/dist/omi.js](https://unpkg.com/omi@3.0.0/dist/omi.js)
+* [https://unpkg.com/omi@3.0.1/dist/omi.min.js](https://unpkg.com/omi@3.0.1/dist/omi.min.js)
+* [https://unpkg.com/omi@3.0.1/dist/omi.js](https://unpkg.com/omi@3.0.1/dist/omi.js)
## Official Plugins
diff --git a/change-log.md b/change-log.md
new file mode 100644
index 000000000..f733a2ed3
--- /dev/null
+++ b/change-log.md
@@ -0,0 +1,3 @@
+# omi 3.0.1
+
+Solve component style scope. Component style will not pollute the child component.
diff --git a/dist/omi.dev.js b/dist/omi.dev.js
index 989de2a73..21c9657e3 100644
--- a/dist/omi.dev.js
+++ b/dist/omi.dev.js
@@ -1,5 +1,5 @@
/**
- * omi v3.0.0 http://omijs.org
+ * omi v3.0.1 http://omijs.org
* Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.
* By dntzhang https://github.com/dntzhang
* Github: https://github.com/AlloyTeam/omi
@@ -50,8 +50,6 @@
var EMPTY_CHILDREN = [];
- var isH5 = options.isWeb;
-
var map = {
'br': 'view',
'hr': 'view',
@@ -255,9 +253,9 @@
}
var p = new VNode();
- p.nodeName = isH5 ? nodeName : map[nodeName];
+ p.nodeName = options.isWeb ? nodeName : map[nodeName];
p.attributes = attributes == null ? undefined : attributes;
- if (children && typeof children[0] === 'string' && !isH5) {
+ if (children && typeof children[0] === 'string' && !options.isWeb) {
if (p.attributes) {
p.attributes.value = children[0];
} else {
@@ -447,8 +445,6 @@
}return style;
}
- var isH5$1 = options.isWeb;
-
/** Remove a child node from its parent if attached.
* @param {Element} node The node to remove
*/
@@ -477,7 +473,7 @@
} else if (name === 'class' && !isSvg) {
node.className = value || '';
} else if (name === 'style') {
- if (isH5$1) {
+ if (options.isWeb) {
if (!value || typeof value === 'string' || typeof old === 'string') {
node.style.cssText = value || '';
}
@@ -932,8 +928,10 @@
}
var appendClass = g1.replace(/(\s*)$/, '') + prefix + g2;
- var prependClass = prefix + ' ' + g1.trim() + g2;
- return appendClass + ',' + prependClass + g3;
+ //let prependClass = prefix + ' ' + g1.trim() + g2;
+
+ return appendClass + g3;
+ //return appendClass + ',' + prependClass + g3;
});
return css;
diff --git a/dist/omi.dev.js.map b/dist/omi.dev.js.map
index 22fbf4a56..ecd9fa26f 100644
--- a/dist/omi.dev.js.map
+++ b/dist/omi.dev.js.map
@@ -1 +1 @@
-{"version":3,"file":"omi.dev.js","sources":["../src/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/clone-element.js","../src/constants.js","../src/render-queue.js","../src/vdom/index.js","../src/dom/index.js","../src/vdom/diff.js","../src/vdom/component-recycler.js","../src/style.js","../src/vdom/component.js","../src/component.js","../src/render.js","../src/omi.js","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\r\nexport function VNode() {}\r\n","/** Global options\r\n *\t@public\r\n *\t@namespace options {Object}\r\n */\r\nexport default {\r\n\r\n\tscopedStyle: true,\r\n\t$store: null,\r\n\tisWeb: true,\r\n\tstaticStyleRendered: false,\r\n\tdoc: typeof document === 'object' ? document : null\r\n\t//componentChange(component, element) { },\r\n\t/** If `true`, `prop` changes trigger synchronous component updates.\r\n\t *\t@name syncComponentUpdates\r\n\t *\t@type Boolean\r\n\t *\t@default true\r\n\t */\r\n\t//syncComponentUpdates: true,\r\n\r\n\t/** Processes all created VNodes.\r\n\t *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\r\n\t */\r\n\t//vnode(vnode) { }\r\n\r\n\t/** Hook invoked after a component is mounted. */\r\n\t//afterMount(component) { },\r\n\r\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\r\n\t//afterUpdate(component) { }\r\n\r\n\t/** Hook invoked immediately before a component is unmounted. */\r\n\t// beforeUnmount(component) { }\r\n};\r\n","import { VNode } from './vnode';\r\nimport options from './options';\r\n\r\n\r\nconst stack = [];\r\n\r\nconst EMPTY_CHILDREN = [];\r\n\r\nconst isH5 = options.isWeb;\r\n\r\nconst map = {\r\n\t'br': 'view',\r\n\t'hr': 'view',\r\n\r\n\t'p': 'view',\r\n\t'h1': 'view',\r\n\t'h2': 'view',\r\n\t'h3': 'view',\r\n\t'h4': 'view',\r\n\t'h5': 'view',\r\n\t'h6': 'view',\r\n\t'abbr': 'view',\r\n\t'address': 'view',\r\n\t'b': 'view',\r\n\t'bdi': 'view',\r\n\t'bdo': 'view',\r\n\t'blockquote': 'view',\r\n\t'cite': 'view',\r\n\t'code': 'view',\r\n\t'del': 'view',\r\n\t'ins': 'view',\r\n\t'dfn': 'view',\r\n\t'em': 'view',\r\n\t'strong': 'view',\r\n\t'samp': 'view',\r\n\t'kbd': 'view',\r\n\t'var': 'view',\r\n\t'i': 'view',\r\n\t'mark': 'view',\r\n\t'pre': 'view',\r\n\t'q': 'view',\r\n\t'ruby': 'view',\r\n\t'rp': 'view',\r\n\t'rt': 'view',\r\n\t's': 'view',\r\n\t'small': 'view',\r\n\t'sub': 'view',\r\n\t'sup': 'view',\r\n\t'time': 'view',\r\n\t'u': 'view',\r\n\t'wbr': 'view',\r\n\r\n\t'form': 'form',\r\n\t'input': 'input',\r\n\t'textarea': 'textarea',\r\n\t'button': 'button',\r\n\t'select': 'picker',\r\n\t'option': 'view',\r\n\t'optgroup': 'view',\r\n\t'label': 'label',\r\n\t'fieldset': 'view',\r\n\t'datalist': 'picker',\r\n\t'legend': 'view',\r\n\t'output': 'view',\r\n\r\n\t'iframe': 'view',\r\n \r\n\t'img': 'image',\r\n\t'canvas': 'canvas',\r\n\t'figure': 'view',\r\n\t'figcaption': 'view',\r\n\r\n \r\n\t'audio': 'audio',\r\n\t'source': 'audio',\r\n\t'video': 'video',\r\n\t'track': 'video',\r\n \r\n\t'a': 'navigator',\r\n\t'nav': 'view',\r\n\t'link': 'navigator',\r\n\r\n\t'ul': 'view',\r\n\t'ol': 'view',\r\n\t'li': 'view',\r\n\t'dl': 'view',\r\n\t'dt': 'view',\r\n\t'dd': 'view',\r\n\t'menu': 'view',\r\n\t'command': 'view',\r\n\r\n\r\n\t'table': 'view',\r\n\t'caption': 'view',\r\n\t'th': 'view',\r\n\t'td': 'view',\r\n\t'tr': 'view',\r\n\t'thead': 'view',\r\n\t'tbody': 'view',\r\n\t'tfoot': 'view',\r\n\t'col': 'view',\r\n\t'colgroup': 'view',\r\n\r\n\r\n\t'div': 'view',\r\n\t'main': 'view',\r\n\t//'span': 'label',\r\n\t'span': 'text',\r\n\t'header': 'view',\r\n\t'footer': 'view',\r\n\t'section': 'view',\r\n\t'article': 'view',\r\n\t'aside': 'view',\r\n\t'details': 'view',\r\n\t'dialog': 'view',\r\n\t'summary': 'view',\r\n\r\n\t'progress': 'progress',\r\n\t'meter': 'progress',\r\n\t'head': 'view',\r\n\t'meta': 'view',\r\n\t'base': 'text',\r\n\t'map': 'map',\r\n\t'area': 'navigator',\r\n\r\n\t'script': 'view',\r\n\t'noscript': 'view',\r\n\t'embed': 'view',\r\n\t'object': 'view',\r\n\t'param': 'view',\r\n\r\n\t'view': 'view',\r\n\t'scroll-view': 'scroll-view',\r\n\t'swiper': 'swiper',\r\n\t'icon': 'icon',\r\n\t'text': 'text',\r\n\r\n\t\r\n\r\n\r\n\t'checkbox': 'checkbox',\r\n\t'radio': 'radio',\r\n\t'picker': 'picker',\r\n\t'picker-view': 'picker-view',\r\n\t'slider': 'slider',\r\n\t'switch': 'switch',\r\n\t'navigator': 'navigator',\r\n\t\r\n\t'image': 'image',\r\n\t'contact-button': 'contact-button',\r\n\t'block': 'block'\r\n};\r\n\r\n\r\n/**\r\n * JSX/hyperscript reviver.\r\n * @see http://jasonformat.com/wtf-is-jsx\r\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\r\n *\r\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\r\n *\r\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\r\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\r\n * the current _actual_ DOM structure, and applying only the differences.\r\n *\r\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\r\n * and optionally children to append to the element.\r\n *\r\n * @example The following DOM tree\r\n *\r\n * `
Hello!
`\r\n *\r\n * can be constructed using this function as:\r\n *\r\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\r\n *\r\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\r\n * @param {Object} attributes\tAny attributes/props to set on the created element.\r\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\r\n *\r\n * @public\r\n */\r\nexport function h(nodeName, attributes) {\r\n\tlet children=EMPTY_CHILDREN, lastSimple, child, simple, i;\r\n\tfor (i=arguments.length; i-- > 2; ) {\r\n\t\tstack.push(arguments[i]);\r\n\t}\r\n\tif (attributes && attributes.children!=null) {\r\n\t\tif (!stack.length) stack.push(attributes.children);\r\n\t\tdelete attributes.children;\r\n\t}\r\n\twhile (stack.length) {\r\n\t\tif ((child = stack.pop()) && child.pop!==undefined) {\r\n\t\t\tfor (i=child.length; i--; ) stack.push(child[i]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (typeof child==='boolean') child = null;\r\n\r\n\t\t\tif ((simple = typeof nodeName!=='function')) {\r\n\t\t\t\tif (child==null) child = '';\r\n\t\t\t\telse if (typeof child==='number') child = String(child);\r\n\t\t\t\telse if (typeof child!=='string') simple = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (simple && lastSimple) {\r\n\t\t\t\tchildren[children.length-1] += child;\r\n\t\t\t}\r\n\t\t\telse if (children===EMPTY_CHILDREN) {\r\n\t\t\t\tchildren = [child];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tchildren.push(child);\r\n\t\t\t}\r\n\r\n\t\t\tlastSimple = simple;\r\n\t\t}\r\n\t}\r\n\r\n\tlet p = new VNode();\r\n\tp.nodeName = isH5?nodeName:map[nodeName];\r\n\tp.attributes = attributes == null ? undefined : attributes;\r\n\tif (children && typeof children[0] === 'string'&& !isH5) {\r\n\t\tif (p.attributes) {\r\n\t\t\tp.attributes.value = children[0];\r\n\t\t} else {\r\n\t\t\tp.attributes = { value: children[0] };\r\n\t\t}\r\n\t} else {\r\n\t\tp.children = children;\r\n\t}\r\n\tp.key = attributes==null ? undefined : attributes.key;\r\n\r\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\r\n\tif (options.vnode!==undefined) options.vnode(p);\r\n\r\n\treturn p;\r\n}\r\n","/**\r\n * Copy all properties from `props` onto `obj`.\r\n * @param {Object} obj\t\tObject onto which properties should be copied.\r\n * @param {Object} props\tObject from which to copy properties.\r\n * @returns obj\r\n * @private\r\n */\r\nexport function extend(obj, props) {\r\n\tfor (let i in props) obj[i] = props[i];\r\n\treturn obj;\r\n}\r\n\r\n/**\r\n * Call a function asynchronously, as soon as possible. Makes\r\n * use of HTML Promise to schedule the callback if available,\r\n * otherwise falling back to `setTimeout` (mainly for IE<11).\r\n *\r\n * @param {Function} callback\r\n */\r\n\r\nlet usePromise = typeof Promise == 'function';\r\n\r\n// for native\r\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\r\n\tif (global.__config__.platform === 'android') {\r\n\t\tusePromise = true;\r\n\t} else {\r\n\t\tlet systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\r\n\t\tif (systemVersion > 8) {\r\n\t\t\tusePromise = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\r\n","import { extend } from './util';\r\nimport { h } from './h';\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\r\n * @param {Object} props\tAttributes/props to add when cloning\r\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\r\n */\r\nexport function cloneElement(vnode, props) {\r\n\treturn h(\r\n\t\tvnode.nodeName,\r\n\t\textend(extend({}, vnode.attributes), props),\r\n\t\targuments.length>2 ? [].slice.call(arguments, 2) : vnode.children\r\n\t);\r\n}\r\n","// render modes\r\n\r\nexport const NO_RENDER = 0;\r\nexport const SYNC_RENDER = 1;\r\nexport const FORCE_RENDER = 2;\r\nexport const ASYNC_RENDER = 3;\r\n\r\n\r\nexport const ATTR_KEY = '__preactattr_';\r\n\r\n// DOM properties that should NOT have \"px\" added when numeric\r\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\r\n\r\n","import options from './options';\r\nimport { defer } from './util';\r\nimport { renderComponent } from './vdom/component';\r\n\r\n/** Managed queue of dirty components to be re-rendered */\r\n\r\nlet items = [];\r\n\r\nexport function enqueueRender(component) {\r\n\tif (!component._dirty && (component._dirty = true) && items.push(component)==1) {\r\n\t\t(options.debounceRendering || defer)(rerender);\r\n\t}\r\n}\r\n\r\nexport function rerender() {\r\n\tlet p, list = items;\r\n\titems = [];\r\n\tlet element;\r\n\twhile ( (p = list.pop()) ) {\r\n\t\telement = p.base;\r\n\t\tif (p._dirty) renderComponent(p);\r\n\t}\r\n\tif (!list.length) {\r\n\t\tif (options.componentChange) options.componentChange(p, element);\r\n\t}\r\n}\r\n","import { extend } from '../util';\r\n\r\n\r\n/**\r\n * Check if two nodes are equivalent.\r\n *\r\n * @param {Node} node\t\t\tDOM Node to compare\r\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\r\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\r\n * @private\r\n */\r\nexport function isSameNodeType(node, vnode, hydrating) {\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\t\treturn node.splitText!==undefined;\r\n\t}\r\n\tif (typeof vnode.nodeName==='string') {\r\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\r\n\t}\r\n\treturn hydrating || node._componentConstructor===vnode.nodeName;\r\n}\r\n\r\n\r\n/**\r\n * Check if an Element has a given nodeName, case-insensitively.\r\n *\r\n * @param {Element} node\tA DOM Element to inspect the name of.\r\n * @param {String} nodeName\tUnnormalized name to compare against.\r\n */\r\nexport function isNamedNode(node, nodeName) {\r\n\treturn node.normalizedNodeName===nodeName || node.nodeName.toLowerCase()===nodeName.toLowerCase();\r\n}\r\n\r\n\r\n/**\r\n * Reconstruct Component-style `props` from a VNode.\r\n * Ensures default/fallback values from `defaultProps`:\r\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\r\n *\r\n * @param {VNode} vnode\r\n * @returns {Object} props\r\n */\r\nexport function getNodeProps(vnode) {\r\n\tlet props = extend({}, vnode.attributes);\r\n\tprops.children = vnode.children;\r\n\r\n\tlet defaultProps = vnode.nodeName.defaultProps;\r\n\tif (defaultProps!==undefined) {\r\n\t\tfor (let i in defaultProps) {\r\n\t\t\tif (props[i]===undefined) {\r\n\t\t\t\tprops[i] = defaultProps[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn props;\r\n}\r\n","import { IS_NON_DIMENSIONAL } from '../constants';\r\nimport options from '../options';\r\n\r\n\r\n/** Create an element with the given nodeName.\r\n *\t@param {String} nodeName\r\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\r\n *\t@returns {Element} node\r\n */\r\nexport function createNode(nodeName, isSvg) {\r\n\tlet node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\r\n\tnode.normalizedNodeName = nodeName;\r\n\treturn node;\r\n}\r\n\r\nfunction parseCSSText(cssText) {\r\n\tlet cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\r\n\tlet style = {}, [a,b,rule] = cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt];\r\n\tlet cssToJs = s => s.replace(/\\W+\\w/g, match => match.slice(-1).toUpperCase());\r\n\tlet properties = rule.split(\";\").map(o => o.split(\":\").map(x => x && x.trim()));\r\n\tfor (let [property, value] of properties) style[cssToJs(property)] = value;\r\n\treturn style;\r\n}\r\n\r\nconst isH5 = options.isWeb;\r\n\r\n\r\n/** Remove a child node from its parent if attached.\r\n *\t@param {Element} node\t\tThe node to remove\r\n */\r\nexport function removeNode(node) {\r\n\tlet parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\n\r\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\r\n *\tIf `value` is `null`, the attribute/handler will be removed.\r\n *\t@param {Element} node\tAn element to mutate\r\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\r\n *\t@param {any} old\tThe last value that was set for this name/node pair\r\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\r\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\r\n *\t@private\r\n */\r\nexport function setAccessor(node, name, old, value, isSvg) {\r\n\tif (name==='className') name = 'class';\r\n\r\n\r\n\tif (name==='key') {\r\n\t\t// ignore\r\n\t}\r\n\telse if (name==='ref') {\r\n\t\tif (old) old(null);\r\n\t\tif (value) value(node);\r\n\t}\r\n\telse if (name==='class' && !isSvg) {\r\n\t\tnode.className = value || '';\r\n\t}\r\n\telse if (name==='style') {\r\n\t\tif (isH5) {\r\n\t\t\tif (!value || typeof value==='string' || typeof old==='string') {\r\n\t\t\t\tnode.style.cssText = value || '';\r\n\t\t\t}\r\n\t\t\tif (value && typeof value==='object') {\r\n\t\t\t\tif (typeof old!=='string') {\r\n\t\t\t\t\tfor (let i in old) if (!(i in value)) node.style[i] = '';\r\n\t\t\t\t}\r\n\t\t\t\tfor (let i in value) {\r\n\t\t\t\t\tnode.style[i] = typeof value[i]==='number' && IS_NON_DIMENSIONAL.test(i)===false ? (value[i]+'px') : value[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet oldJson = old,\r\n\t\t\t\tcurrentJson = value;\r\n\t\t\tif (typeof old === 'string') {\r\n\t\t\t\toldJson = parseCSSText(old);\r\n\t\t\t}\r\n\t\t\tif (typeof value == 'string') {\r\n\t\t\t\tcurrentJson = parseCSSText(value);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlet result = {},\r\n\t\t\t\tchanged = false;\r\n\t\t\r\n\t\t\tif (oldJson) {\r\n\t\t\t\tfor (let key in oldJson) {\r\n\t\t\t\t\tif (typeof currentJson == 'object' && !(key in currentJson)) {\r\n\t\t\t\t\t\tresult[key] = '';\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tfor (let ckey in currentJson) {\r\n\t\t\t\t\tif (currentJson[ckey] !== oldJson[ckey]) {\r\n\t\t\t\t\t\tresult[ckey] = currentJson[ckey];\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tif (changed) {\r\n\t\t\t\t\tnode.setStyles(result);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnode.setStyles(currentJson);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse if (name==='dangerouslySetInnerHTML') {\r\n\t\tif (value) node.innerHTML = value.__html || '';\r\n\t}\r\n\telse if (name[0]=='o' && name[1]=='n') {\r\n\t\tlet useCapture = name !== (name=name.replace(/Capture$/, ''));\r\n\t\tname = name.toLowerCase().substring(2);\r\n\t\tif (value) {\r\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\r\n\t}\r\n\telse if (name!=='list' && name!=='type' && !isSvg && name in node) {\r\n\t\tsetProperty(node, name, value==null ? '' : value);\r\n\t\tif (value==null || value===false) node.removeAttribute(name);\r\n\t}\r\n\telse {\r\n\t\tlet ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));\r\n\t\tif (value==null || value===false) {\r\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());\r\n\t\t\telse node.removeAttribute(name);\r\n\t\t}\r\n\t\telse if (typeof value!=='function') {\r\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\r\n\t\t\telse node.setAttribute(name, value);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/** Attempt to set a DOM property to the given value.\r\n *\tIE & FF throw for certain property-value combinations.\r\n */\r\nfunction setProperty(node, name, value) {\r\n\ttry {\r\n\t\tnode[name] = value;\r\n\t} catch (e) { }\r\n}\r\n\r\n\r\n/** Proxy an event to hooked event handlers\r\n *\t@private\r\n */\r\nfunction eventProxy(e) {\r\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\r\n}\r\n","import { ATTR_KEY } from '../constants';\r\nimport { isSameNodeType, isNamedNode } from './index';\r\nimport { buildComponentFromVNode } from './component';\r\nimport { createNode, setAccessor } from '../dom/index';\r\nimport { unmountComponent } from './component';\r\nimport options from '../options';\r\nimport { removeNode } from '../dom/index';\r\n\r\n/** Queue of components that have been mounted and are awaiting componentDidMount */\r\nexport const mounts = [];\r\n\r\n/** Diff recursion count, used to track the end of the diff cycle. */\r\nexport let diffLevel = 0;\r\n\r\n/** Global flag indicating if the diff is currently within an SVG */\r\nlet isSvgMode = false;\r\n\r\n/** Global flag indicating if the diff is performing hydration */\r\nlet hydrating = false;\r\n\r\n/** Invoke queued componentDidMount lifecycle methods */\r\nexport function flushMounts() {\r\n\tlet c;\r\n\twhile ((c=mounts.pop())) {\r\n\t\tif (options.afterMount) options.afterMount(c);\r\n\t\tif (c.componentDidMount) c.componentDidMount();\r\n\t\tif (c.installed) c.installed();\r\n\t}\r\n}\r\n\r\n\r\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\r\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\r\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\r\n *\t@returns {Element} dom\t\t\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function diff(dom, vnode, context, mountAll, parent, componentRoot) {\r\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\r\n\tif (!diffLevel++) {\r\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\r\n\t\tisSvgMode = parent!=null && parent.ownerSVGElement!==undefined;\r\n\r\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\r\n\t\thydrating = dom!=null && !(ATTR_KEY in dom);\r\n\t}\r\n\r\n\tlet ret = idiff(dom, vnode, context, mountAll, componentRoot);\r\n\r\n\t// append the element if its a new parent\r\n\tif (parent && ret.parentNode!==parent) parent.appendChild(ret);\r\n\r\n\t// diffLevel being reduced to 0 means we're exiting the diff\r\n\tif (!--diffLevel) {\r\n\t\thydrating = false;\r\n\t\t// invoke queued componentDidMount lifecycle methods\r\n\t\tif (!componentRoot) flushMounts();\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\r\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\r\n\tlet out = dom,\r\n\t\tprevSvgMode = isSvgMode;\r\n\r\n\t// empty values (null, undefined, booleans) render as empty Text nodes\r\n\tif (vnode==null || typeof vnode==='boolean') vnode = '';\r\n\r\n\r\n\t// Fast case: Strings & Numbers create/update Text nodes.\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\r\n\t\t// update if it's already a Text node:\r\n\t\tif (dom && dom.splitText!==undefined && dom.parentNode && (!dom._component || componentRoot)) {\r\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\r\n\t\t\tif (dom.nodeValue!=vnode) {\r\n\t\t\t\tdom.nodeValue = vnode;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\r\n\t\t\tout = document.createTextNode(vnode);\r\n\t\t\tif (dom) {\r\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\t\t\t\trecollectNodeTree(dom, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout[ATTR_KEY] = true;\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\r\n\t// If the VNode represents a Component, perform a component diff:\r\n\tlet vnodeName = vnode.nodeName;\r\n\tif (typeof vnodeName==='function') {\r\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\r\n\t}\r\n\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tisSvgMode = vnodeName==='svg' ? true : vnodeName==='foreignObject' ? false : isSvgMode;\r\n\r\n\r\n\t// If there's no existing element or it's the wrong type, create a new one:\r\n\tvnodeName = String(vnodeName);\r\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\r\n\t\tout = createNode(vnodeName, isSvgMode);\r\n\r\n\t\tif (dom) {\r\n\t\t\t// move children into the replacement node\r\n\t\t\twhile (dom.firstChild) out.appendChild(dom.firstChild);\r\n\r\n\t\t\t// if the previous Element was mounted into the DOM, replace it inline\r\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\r\n\t\t\t// recycle the old element (skips non-Element node types)\r\n\t\t\trecollectNodeTree(dom, true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tlet fc = out.firstChild,\r\n\t\tprops = out[ATTR_KEY],\r\n\t\tvchildren = vnode.children;\r\n\r\n\tif (props==null) {\r\n\t\tprops = out[ATTR_KEY] = {};\r\n\t\tfor (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;\r\n\t}\r\n\r\n\t// Optimization: fast-path for elements containing a single TextNode:\r\n\tif (!hydrating && vchildren && vchildren.length===1 && typeof vchildren[0]==='string' && fc!=null && fc.splitText!==undefined && fc.nextSibling==null) {\r\n\t\tif (fc.nodeValue!=vchildren[0]) {\r\n\t\t\tfc.nodeValue = vchildren[0];\r\n\t\t}\r\n\t}\r\n\t// otherwise, if there are existing or new children, diff them:\r\n\telse if (vchildren && vchildren.length || fc!=null) {\r\n\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML!=null);\r\n\t}\r\n\r\n\r\n\t// Apply attributes/props from VNode to the DOM Element:\r\n\tdiffAttributes(out, vnode.attributes, props);\r\n\r\n\r\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\r\n\tisSvgMode = prevSvgMode;\r\n\r\n\treturn out;\r\n}\r\n\r\n\r\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\r\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\r\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\r\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\r\n *\t@param {Boolean} mountAll\r\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\r\n */\r\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\r\n\tlet originalChildren = dom.childNodes,\r\n\t\tchildren = [],\r\n\t\tkeyed = {},\r\n\t\tkeyedLen = 0,\r\n\t\tmin = 0,\r\n\t\tlen = originalChildren.length,\r\n\t\tchildrenLen = 0,\r\n\t\tvlen = vchildren ? vchildren.length : 0,\r\n\t\tj, c, f, vchild, child;\r\n\r\n\t// Build up a map of keyed children and an Array of unkeyed children:\r\n\tif (len!==0) {\r\n\t\tfor (let i=0; i {\r\n\t\tif (typeof g2 === 'undefined') {\r\n\t\t\tg2 = '';\r\n\t\t}\r\n\r\n\t\t/* eslint-ignore-next-line */\r\n\t\tif (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\r\n\t\t\treturn g1 + g2 + g3;\r\n\t\t}\r\n\r\n\t\tlet appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\r\n\t\tlet prependClass = prefix + ' ' + g1.trim() + g2;\r\n\t\treturn appendClass + ',' + prependClass + g3;\r\n\t});\r\n\r\n\treturn css;\r\n}\r\n\r\nexport function addStyle(cssText, id) {\r\n\tid = id.toLowerCase();\r\n\tlet ele = document.getElementById(id);\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tif (ele && ele.parentNode === head) {\r\n\t\thead.removeChild(ele);\r\n\t}\r\n\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\tsomeThingStyles.setAttribute('id', id);\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nexport function addStyleWithoutId(cssText) {\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\n\r\nexport function addScopedAttr(vdom, style, attr, component) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tstyle = scoper(style, attr);\r\n\t\tif (style !== component._preStyle) {\r\n\t\t\taddStyle(style, attr);\r\n\t\t}\r\n\t} else if (style !== component._preStyle) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n\tcomponent._preStyle = style;\r\n}\r\n\r\nexport function addScopedAttrStatic(vdom, style, attr) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tif (!options.staticStyleRendered) {\r\n\t\t\taddStyle(scoper(style, attr), attr);\r\n\t\t}\r\n\t} else if (!options.staticStyleRendered) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n}\r\n\r\nexport function scopeVdom(attr,vdom){\r\n\tif (typeof vdom!== 'string'){\r\n\t\tvdom.attributes = vdom.attributes||{};\r\n\t\tvdom.attributes[attr] = '';\r\n\t\tvdom.children.forEach(child=>scopeVdom(attr,child));\r\n\t}\r\n}","import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';\r\nimport options from '../options';\r\nimport { extend } from '../util';\r\nimport { enqueueRender } from '../render-queue';\r\nimport { getNodeProps } from './index';\r\nimport { diff, mounts, diffLevel, flushMounts, recollectNodeTree, removeChildren } from './diff';\r\nimport { createComponent, collectComponent } from './component-recycler';\r\nimport { removeNode } from '../dom/index';\r\nimport {addScopedAttr, addScopedAttrStatic} from '../style';\r\n\r\n/** Set a component's `props` (generally derived from JSX attributes).\r\n *\t@param {Object} props\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\r\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\r\n */\r\nexport function setComponentProps(component, props, opts, context, mountAll) {\r\n\tif (component._disable) return;\r\n\tcomponent._disable = true;\r\n\r\n\tif ((component.__ref = props.ref)) delete props.ref;\r\n\tif ((component.__key = props.key)) delete props.key;\r\n\r\n\tif (!component.base || mountAll) {\r\n\t\tif (component.componentWillMount) component.componentWillMount();\r\n\t\tif (component.install) component.install();\r\n\t}\r\n\telse if (component.componentWillReceiveProps) {\r\n\t\tcomponent.componentWillReceiveProps(props, context);\r\n\t}\r\n\r\n\tif (context && context!==component.context) {\r\n\t\tif (!component.prevContext) component.prevContext = component.context;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tif (!component.prevProps) component.prevProps = component.props;\r\n\tcomponent.props = props;\r\n\r\n\tcomponent._disable = false;\r\n\r\n\tif (opts!==NO_RENDER) {\r\n\t\tif (opts===SYNC_RENDER || options.syncComponentUpdates!==false || !component.base) {\r\n\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tenqueueRender(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(component);\r\n}\r\n\r\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\r\n *\t@param {Component} component\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\r\n *\t@private\r\n */\r\nexport function renderComponent(component, opts, mountAll, isChild) {\r\n\tif (component._disable) return;\r\n\r\n\tlet props = component.props,\r\n\t\tstate = component.state,\r\n\t\tcontext = component.context,\r\n\t\tpreviousProps = component.prevProps || props,\r\n\t\tpreviousState = component.prevState || state,\r\n\t\tpreviousContext = component.prevContext || context,\r\n\t\tisUpdate = component.base,\r\n\t\tnextBase = component.nextBase,\r\n\t\tinitialBase = isUpdate || nextBase,\r\n\t\tinitialChildComponent = component._component,\r\n\t\tskip = false,\r\n\t\trendered, inst, cbase;\r\n\r\n\t// if updating\r\n\tif (isUpdate) {\r\n\t\tcomponent.props = previousProps;\r\n\t\tcomponent.state = previousState;\r\n\t\tcomponent.context = previousContext;\r\n\t\tif (opts!==FORCE_RENDER\r\n\t\t\t&& component.shouldComponentUpdate\r\n\t\t\t&& component.shouldComponentUpdate(props, state, context) === false) {\r\n\t\t\tskip = true;\r\n\t\t}\r\n\t\telse if (component.componentWillUpdate) {\r\n\t\t\tcomponent.componentWillUpdate(props, state, context);\r\n\t\t}\r\n\t\telse if (component.beforeUpdate) {\r\n\t\t\tcomponent.beforeUpdate(props, state, context);\r\n\t\t}\r\n\t\tcomponent.props = props;\r\n\t\tcomponent.state = state;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\r\n\tcomponent._dirty = false;\r\n\r\n\tif (!skip) {\r\n\t\trendered = component.render(props, state, context);\r\n\t\r\n\t\tif (component.style){\r\n\t\t\taddScopedAttr(rendered,component.style(),'_style_'+component._id,component);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (component.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,component.staticStyle(),'_style_'+component.constructor.name);\r\n\t\t}\r\n\r\n\t\t// context to pass to the child, can be updated via (grand-)parent component\r\n\t\tif (component.getChildContext) {\r\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\r\n\t\t}\r\n\r\n\t\tlet childComponent = rendered && rendered.nodeName,\r\n\t\t\ttoUnmount, base;\r\n\r\n\t\tif (typeof childComponent==='function') {\r\n\t\t\t// set up high order component link\r\n\r\n\t\t\tlet childProps = getNodeProps(rendered);\r\n\t\t\tinst = initialChildComponent;\r\n\r\n\t\t\tif (inst && inst.constructor===childComponent && childProps.key==inst.__key) {\r\n\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttoUnmount = inst;\r\n\r\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\r\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\r\n\t\t\t\tinst._parentComponent = component;\r\n\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\r\n\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\r\n\t\t\t}\r\n\r\n\t\t\tbase = inst.base;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcbase = initialBase;\r\n\r\n\t\t\t// destroy high order component link\r\n\t\t\ttoUnmount = initialChildComponent;\r\n\t\t\tif (toUnmount) {\r\n\t\t\t\tcbase = component._component = null;\r\n\t\t\t}\r\n\r\n\t\t\tif (initialBase || opts===SYNC_RENDER) {\r\n\t\t\t\tif (cbase) cbase._component = null;\r\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (initialBase && base!==initialBase && inst!==initialChildComponent) {\r\n\t\t\tlet baseParent = initialBase.parentNode;\r\n\t\t\tif (baseParent && base!==baseParent) {\r\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\r\n\r\n\t\t\t\tif (!toUnmount) {\r\n\t\t\t\t\tinitialBase._component = null;\r\n\t\t\t\t\trecollectNodeTree(initialBase, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (toUnmount) {\r\n\t\t\tunmountComponent(toUnmount);\r\n\t\t}\r\n\r\n\t\tcomponent.base = base;\r\n\t\tif (base && !isChild) {\r\n\t\t\tlet componentRef = component,\r\n\t\t\t\tt = component;\r\n\t\t\twhile ((t=t._parentComponent)) {\r\n\t\t\t\t(componentRef = t).base = base;\r\n\t\t\t}\r\n\t\t\tbase._component = componentRef;\r\n\t\t\tbase._componentConstructor = componentRef.constructor;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!isUpdate || mountAll) {\r\n\t\tmounts.unshift(component);\r\n\t}\r\n\telse if (!skip) {\r\n\t\t// Ensure that pending componentDidMount() hooks of child components\r\n\t\t// are called before the componentDidUpdate() hook in the parent.\r\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\r\n\t\t// flushMounts();\r\n\r\n\t\tif (component.componentDidUpdate) {\r\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (component.afterUpdate) {\r\n\t\t\tcomponent.afterUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (options.afterUpdate) options.afterUpdate(component);\r\n\t}\r\n\r\n\tif (component._renderCallbacks!=null) {\r\n\t\twhile (component._renderCallbacks.length) component._renderCallbacks.pop().call(component);\r\n\t}\r\n\r\n\tif (!diffLevel && !isChild) flushMounts();\r\n}\r\n\r\n\r\n\r\n/** Apply the Component referenced by a VNode to the DOM.\r\n *\t@param {Element} dom\tThe DOM node to mutate\r\n *\t@param {VNode} vnode\tA Component-referencing VNode\r\n *\t@returns {Element} dom\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function buildComponentFromVNode(dom, vnode, context, mountAll) {\r\n\tlet c = dom && dom._component,\r\n\t\toriginalComponent = c,\r\n\t\toldDom = dom,\r\n\t\tisDirectOwner = c && dom._componentConstructor===vnode.nodeName,\r\n\t\tisOwner = isDirectOwner,\r\n\t\tprops = getNodeProps(vnode);\r\n\twhile (c && !isOwner && (c=c._parentComponent)) {\r\n\t\tisOwner = c.constructor===vnode.nodeName;\r\n\t}\r\n\r\n\tif (c && isOwner && (!mountAll || c._component)) {\r\n\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\t}\r\n\telse {\r\n\t\tif (originalComponent && !isDirectOwner) {\r\n\t\t\tunmountComponent(originalComponent);\r\n\t\t\tdom = oldDom = null;\r\n\t\t}\r\n\r\n\t\tc = createComponent(vnode.nodeName, props, context);\r\n\t\tif (dom && !c.nextBase) {\r\n\t\t\tc.nextBase = dom;\r\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\r\n\t\t\toldDom = null;\r\n\t\t}\r\n\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\r\n\t\tif (oldDom && dom!==oldDom) {\r\n\t\t\toldDom._component = null;\r\n\t\t\trecollectNodeTree(oldDom, false);\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n\r\n\r\n/** Remove a component from the DOM and recycle it.\r\n *\t@param {Component} component\tThe Component instance to unmount\r\n *\t@private\r\n */\r\nexport function unmountComponent(component) {\r\n\tif (options.beforeUnmount) options.beforeUnmount(component);\r\n\r\n\tlet base = component.base;\r\n\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.componentWillUnmount) component.componentWillUnmount();\r\n\tif (component.uninstall) component.uninstall();\r\n\t\r\n\tcomponent.base = null;\r\n\r\n\t// recursively tear down & recollect high-order component children:\r\n\tlet inner = component._component;\r\n\tif (inner) {\r\n\t\tunmountComponent(inner);\r\n\t}\r\n\telse if (base) {\r\n\t\tif (base[ATTR_KEY] && base[ATTR_KEY].ref) base[ATTR_KEY].ref(null);\r\n\r\n\t\tcomponent.nextBase = base;\r\n\r\n\t\tremoveNode(base);\r\n\t\tcollectComponent(component);\r\n\r\n\t\tremoveChildren(base);\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(null);\r\n}\r\n","import { FORCE_RENDER } from './constants';\r\nimport { extend } from './util';\r\nimport { renderComponent } from './vdom/component';\r\nimport { enqueueRender } from './render-queue';\r\nimport options from './options';\r\n\r\nlet id = 0;\r\nfunction getId(){\r\n\treturn id++;\r\n}\r\n/** Base Component class.\r\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\r\n *\t@public\r\n *\r\n *\t@example\r\n *\tclass MyFoo extends Component {\r\n *\t\trender(props, state) {\r\n *\t\t\treturn ;\r\n *\t\t}\r\n *\t}\r\n */\r\nexport function Component(props, context) {\r\n\tthis._dirty = true;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.context = context;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.props = props;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.state = this.state || {};\r\n\r\n\tthis._id = getId();\r\n\r\n\tthis._preStyle = null;\r\n\r\n\tthis.$store = null;\r\n\r\n}\r\n\r\n\r\nextend(Component.prototype, {\r\n\r\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\r\n\t *\t@param {object} nextProps\r\n\t *\t@param {object} nextState\r\n\t *\t@param {object} nextContext\r\n\t *\t@returns {Boolean} should the component re-render\r\n\t *\t@name shouldComponentUpdate\r\n\t *\t@function\r\n\t */\r\n\r\n\r\n\t/** Update component state by copying properties from `state` to `this.state`.\r\n\t *\t@param {object} state\t\tA hash of state properties to update with new values\r\n\t *\t@param {function} callback\tA function to be called once component state is updated\r\n\t */\r\n\tsetState(state, callback) {\r\n\t\tlet s = this.state;\r\n\t\tif (!this.prevState) this.prevState = extend({}, s);\r\n\t\textend(s, typeof state==='function' ? state(s, this.props) : state);\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\tenqueueRender(this);\r\n\t},\r\n\r\n\r\n\t/** Immediately perform a synchronous re-render of the component.\r\n\t *\t@param {function} callback\t\tA function to be called after component is re-rendered.\r\n\t *\t@private\r\n\t */\r\n\tforceUpdate(callback) {\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\trenderComponent(this, FORCE_RENDER);\r\n\t\tif (options.componentChange) options.componentChange(this, this.base);\r\n\t},\r\n\r\n\tupdate(callback){\r\n\t\tthis.forceUpdate(callback);\r\n\t},\r\n\r\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n\t *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n\t *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\r\n\t *\t@param {object} state\t\tThe component's current state\r\n\t *\t@param {object} context\t\tContext object (if a parent component has provided context)\r\n\t *\t@returns VNode\r\n\t */\r\n\trender() {}\r\n\r\n});\r\n","import { diff } from './vdom/diff';\r\nimport { Component } from './component';\r\nimport options from './options';\r\nimport {addScopedAttr, addScopedAttrStatic} from './style';\r\n\r\nfunction isElement(obj) {\r\n\ttry {\r\n\t //Using W3 DOM2 (works for FF, Opera and Chrome)\r\n\t return obj instanceof HTMLElement;\r\n\t}\r\n\tcatch (e){\r\n\t //Browsers not supporting W3 DOM2 don't have HTMLElement and\r\n\t //an exception is thrown and we end up here. Testing some\r\n\t //properties that all elements have (works on IE7)\r\n\t return (typeof obj===\"object\") &&\r\n\t\t(obj.nodeType===1) && (typeof obj.style === \"object\") &&\r\n\t\t(typeof obj.ownerDocument ===\"object\");\r\n\t}\r\n}\r\n\r\n/** Render JSX into a `parent` Element.\r\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\r\n *\t@param {Element} parent\t\tDOM element to render into\r\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\r\n *\t@public\r\n *\r\n *\t@example\r\n *\t// render a div into :\r\n *\trender(hello!
, document.body);\r\n *\r\n *\t@example\r\n *\t// render a \"Thing\" component into #foo:\r\n *\tconst Thing = ({ name }) => { name };\r\n *\trender(, document.querySelector('#foo'));\r\n */\r\nexport function render(vnode, parent, merge) {\r\n\toptions.staticStyleRendered = false;\r\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent;\r\n\tif (merge === true){\r\n\t\twhile (parent.firstChild){\r\n\t\t\tparent.removeChild(parent.firstChild);\r\n\t\t}\r\n\t}\r\n\tconst m = isElement(merge) || merge === undefined;\r\n\tif (vnode instanceof Component) {\r\n\t\tif (window && window.Omi){\r\n\t\t\twindow.Omi.instances.push(vnode);\r\n\t\t}\r\n\t\tif (!m){\r\n\t\t\tvnode.$store = options.$store = merge;\r\n\t\t}\r\n\t\tif (vnode.componentWillMount) vnode.componentWillMount();\r\n\t\tif (vnode.install) vnode.install();\r\n\t\tconst rendered = vnode.render();\r\n\t\tif (vnode.style){\r\n\t\t\taddScopedAttr(rendered,vnode.style(),'_style_'+vnode._id,vnode);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (vnode.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,vnode.staticStyle(),'_style_'+vnode.constructor.name, !vnode.base);\r\n\t\t}\r\n\r\n\t\tvnode.base = diff(m ? merge : undefined, rendered, {}, false, parent, false);\r\n\t\t\r\n\t\tif (vnode.componentDidMount) vnode.componentDidMount();\r\n\t\tif (vnode.installed) vnode.installed();\r\n\t\toptions.staticStyleRendered = true;\r\n\t\treturn vnode.base;\r\n\t}\r\n\t\r\n\tlet result = diff(merge, vnode, {}, false, parent, false);\r\n\toptions.staticStyleRendered = true;\r\n\treturn result;\r\n}\r\n","import { h, h as createElement } from './h';\r\nimport { cloneElement } from './clone-element';\r\nimport { Component } from './component';\r\nimport { render } from './render';\r\nimport { rerender } from './render-queue';\r\nimport options from './options';\r\n\r\nfunction getGlobal() {\r\n\tif (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\r\n\t\tif (typeof self !== 'undefined') {\r\n\t\t\treturn self;\r\n\t\t} else if (typeof window !== 'undefined') {\r\n\t\t\treturn window;\r\n\t\t} else if (typeof global !== 'undefined') {\r\n\t\t\treturn global;\r\n\t\t}\r\n\t\treturn (function(){\r\n\t\t\treturn this;\r\n\t\t})();\r\n\t\t\r\n\t}\r\n\treturn global;\r\n}\r\n\r\nconst instances = [];\r\nconst root = getGlobal();\r\nroot.Omi = {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nroot.Omi.version = '3.0.0';\r\n\r\nexport default {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nexport {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n","\n\t\t\t\timport Omi from './omi';\n\t\t\t\tif (typeof module!='undefined') module.exports = Omi;\n\t\t\t\telse self.Omi = Omi;\n\t\t\t"],"names":["VNode","scopedStyle","$store","isWeb","staticStyleRendered","doc","document","stack","EMPTY_CHILDREN","isH5","options","map","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","value","key","vnode","extend","obj","props","usePromise","Promise","global","__config__","platform","systemVersion","split","defer","resolve","then","bind","setTimeout","cloneElement","slice","call","NO_RENDER","SYNC_RENDER","FORCE_RENDER","ASYNC_RENDER","ATTR_KEY","IS_NON_DIMENSIONAL","items","enqueueRender","component","_dirty","debounceRendering","rerender","list","element","base","renderComponent","componentChange","isSameNodeType","node","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","toLowerCase","getNodeProps","defaultProps","createNode","isSvg","createElementNS","createElement","parseCSSText","cssText","cssTxt","replace","match","a","b","rule","cssToJs","s","toUpperCase","properties","o","x","trim","property","style","removeNode","parentNode","removeChild","setAccessor","name","old","className","test","oldJson","currentJson","result","changed","ckey","setStyles","innerHTML","__html","useCapture","substring","addEventListener","eventProxy","removeEventListener","_listeners","setProperty","removeAttribute","ns","removeAttributeNS","setAttributeNS","setAttribute","e","type","event","mounts","diffLevel","isSvgMode","flushMounts","c","afterMount","componentDidMount","installed","diff","dom","context","mountAll","parent","componentRoot","ownerSVGElement","ret","idiff","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","recollectNodeTree","vnodeName","buildComponentFromVNode","firstChild","fc","vchildren","nextSibling","innerDiffNode","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","len","childrenLen","vlen","j","f","vchild","__key","insertBefore","unmountOnly","unmountComponent","ref","removeChildren","lastChild","next","previousSibling","attrs","components","collectComponent","constructor","createComponent","Ctor","inst","prototype","render","Component","doRender","window","Omi","instances","nextBase","splice","state","scoper","css","prefix","re","RegExp","g0","g1","g2","g3","appendClass","prependClass","addStyle","id","ele","getElementById","head","getElementsByTagName","someThingStyles","ActiveXObject","styleSheet","textContent","addStyleWithoutId","addScopedAttr","vdom","attr","scopeVdom","_preStyle","addScopedAttrStatic","forEach","setComponentProps","opts","_disable","__ref","componentWillMount","install","componentWillReceiveProps","prevContext","prevProps","syncComponentUpdates","isChild","previousProps","previousState","prevState","previousContext","isUpdate","initialBase","initialChildComponent","skip","rendered","cbase","shouldComponentUpdate","componentWillUpdate","beforeUpdate","_id","staticStyle","getChildContext","childComponent","toUnmount","childProps","_parentComponent","baseParent","componentRef","t","unshift","componentDidUpdate","afterUpdate","_renderCallbacks","originalComponent","oldDom","isDirectOwner","isOwner","beforeUnmount","componentWillUnmount","uninstall","inner","getId","setState","callback","forceUpdate","update","isElement","HTMLElement","nodeType","ownerDocument","merge","querySelector","m","getGlobal","Math","Array","self","root","version","module","exports"],"mappings":";;;;;;;;;;;CAAA;AACA,CAAO,SAASA,KAAT,GAAiB;;CCDxB;;;;AAIA,eAAe;;CAEdC,cAAa,IAFC;CAGdC,SAAQ,IAHM;CAIdC,QAAO,IAJO;CAKdC,sBAAqB,KALP;CAMdC,MAAK,OAAOC,QAAP,KAAoB,QAApB,GAA+BA,QAA/B,GAA0C;CAC/C;CACA;;;;;CAKA;;CAEA;;;CAGA;;CAEA;CACA;;CAEA;CACA;;CAEA;CACA;CA3Bc,CAAf;;KCAMC,QAAQ,EAAd;;CAEA,IAAMC,iBAAiB,EAAvB;;CAEA,IAAMC,OAAOC,QAAQP,KAArB;;CAEA,IAAMQ,MAAM;CACX,OAAM,MADK;CAEX,OAAM,MAFK;;CAIX,MAAK,MAJM;CAKX,OAAM,MALK;CAMX,OAAM,MANK;CAOX,OAAM,MAPK;CAQX,OAAM,MARK;CASX,OAAM,MATK;CAUX,OAAM,MAVK;CAWX,S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AI,OAAOhG,MAAP,KAAkB,WAAtB,EAAmC;CACzC,UAAOA,MAAP;CACA,GAFM,MAEA,IAAI,OAAO9J,MAAP,KAAkB,WAAtB,EAAmC;CACzC,UAAOA,MAAP;CACA;CACD,SAAQ,YAAU;CACjB,UAAO,IAAP;CACA,GAFM,EAAP;CAIA;CACD,QAAOA,MAAP;CACA;;CAED,IAAMgK,YAAY,EAAlB;CACA,IAAM+F,OAAOJ,WAAb;CACAI,KAAKhG,GAAL,GAAW;CACVtL,KADU;CAEVkE,iBAFU;CAGVjC,2BAHU;CAIVkJ,qBAJU;CAKVD,eALU;CAMVnI,mBANU;CAOVjD,iBAPU;CAQVyL;CARU,CAAX;;CAWA+F,KAAKhG,GAAL,CAASiG,OAAT,GAAmB,OAAnB;;AAEA,WAAe;CACdvR,KADc;CAEdkE,iBAFc;CAGdjC,2BAHc;CAIdkJ,qBAJc;CAKdD,eALc;CAMdnI,mBANc;CAOdjD,iBAPc;CAQdyL;CARc,CAAf;;CCrCI,IAAI,OAAOiG,MAAP,IAAe,WAAnB,EAAgCA,OAAOC,OAAP,GAAiBnG,GAAjB,CAAhC,KACK+F,KAAK/F,GAAL,GAAWA,GAAX;;"}
\ No newline at end of file
+{"version":3,"file":"omi.dev.js","sources":["../src/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/clone-element.js","../src/constants.js","../src/render-queue.js","../src/vdom/index.js","../src/dom/index.js","../src/vdom/diff.js","../src/vdom/component-recycler.js","../src/style.js","../src/vdom/component.js","../src/component.js","../src/render.js","../src/omi.js","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\r\nexport function VNode() {}\r\n","/** Global options\r\n *\t@public\r\n *\t@namespace options {Object}\r\n */\r\nexport default {\r\n\r\n\tscopedStyle: true,\r\n\t$store: null,\r\n\tisWeb: true,\r\n\tstaticStyleRendered: false,\r\n\tdoc: typeof document === 'object' ? document : null\r\n\t//componentChange(component, element) { },\r\n\t/** If `true`, `prop` changes trigger synchronous component updates.\r\n\t *\t@name syncComponentUpdates\r\n\t *\t@type Boolean\r\n\t *\t@default true\r\n\t */\r\n\t//syncComponentUpdates: true,\r\n\r\n\t/** Processes all created VNodes.\r\n\t *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\r\n\t */\r\n\t//vnode(vnode) { }\r\n\r\n\t/** Hook invoked after a component is mounted. */\r\n\t//afterMount(component) { },\r\n\r\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\r\n\t//afterUpdate(component) { }\r\n\r\n\t/** Hook invoked immediately before a component is unmounted. */\r\n\t// beforeUnmount(component) { }\r\n};\r\n","import { VNode } from './vnode';\r\nimport options from './options';\r\n\r\n\r\nconst stack = [];\r\n\r\nconst EMPTY_CHILDREN = [];\r\n\r\nconst map = {\r\n\t'br': 'view',\r\n\t'hr': 'view',\r\n\r\n\t'p': 'view',\r\n\t'h1': 'view',\r\n\t'h2': 'view',\r\n\t'h3': 'view',\r\n\t'h4': 'view',\r\n\t'h5': 'view',\r\n\t'h6': 'view',\r\n\t'abbr': 'view',\r\n\t'address': 'view',\r\n\t'b': 'view',\r\n\t'bdi': 'view',\r\n\t'bdo': 'view',\r\n\t'blockquote': 'view',\r\n\t'cite': 'view',\r\n\t'code': 'view',\r\n\t'del': 'view',\r\n\t'ins': 'view',\r\n\t'dfn': 'view',\r\n\t'em': 'view',\r\n\t'strong': 'view',\r\n\t'samp': 'view',\r\n\t'kbd': 'view',\r\n\t'var': 'view',\r\n\t'i': 'view',\r\n\t'mark': 'view',\r\n\t'pre': 'view',\r\n\t'q': 'view',\r\n\t'ruby': 'view',\r\n\t'rp': 'view',\r\n\t'rt': 'view',\r\n\t's': 'view',\r\n\t'small': 'view',\r\n\t'sub': 'view',\r\n\t'sup': 'view',\r\n\t'time': 'view',\r\n\t'u': 'view',\r\n\t'wbr': 'view',\r\n\r\n\t'form': 'form',\r\n\t'input': 'input',\r\n\t'textarea': 'textarea',\r\n\t'button': 'button',\r\n\t'select': 'picker',\r\n\t'option': 'view',\r\n\t'optgroup': 'view',\r\n\t'label': 'label',\r\n\t'fieldset': 'view',\r\n\t'datalist': 'picker',\r\n\t'legend': 'view',\r\n\t'output': 'view',\r\n\r\n\t'iframe': 'view',\r\n \r\n\t'img': 'image',\r\n\t'canvas': 'canvas',\r\n\t'figure': 'view',\r\n\t'figcaption': 'view',\r\n\r\n \r\n\t'audio': 'audio',\r\n\t'source': 'audio',\r\n\t'video': 'video',\r\n\t'track': 'video',\r\n \r\n\t'a': 'navigator',\r\n\t'nav': 'view',\r\n\t'link': 'navigator',\r\n\r\n\t'ul': 'view',\r\n\t'ol': 'view',\r\n\t'li': 'view',\r\n\t'dl': 'view',\r\n\t'dt': 'view',\r\n\t'dd': 'view',\r\n\t'menu': 'view',\r\n\t'command': 'view',\r\n\r\n\r\n\t'table': 'view',\r\n\t'caption': 'view',\r\n\t'th': 'view',\r\n\t'td': 'view',\r\n\t'tr': 'view',\r\n\t'thead': 'view',\r\n\t'tbody': 'view',\r\n\t'tfoot': 'view',\r\n\t'col': 'view',\r\n\t'colgroup': 'view',\r\n\r\n\r\n\t'div': 'view',\r\n\t'main': 'view',\r\n\t//'span': 'label',\r\n\t'span': 'text',\r\n\t'header': 'view',\r\n\t'footer': 'view',\r\n\t'section': 'view',\r\n\t'article': 'view',\r\n\t'aside': 'view',\r\n\t'details': 'view',\r\n\t'dialog': 'view',\r\n\t'summary': 'view',\r\n\r\n\t'progress': 'progress',\r\n\t'meter': 'progress',\r\n\t'head': 'view',\r\n\t'meta': 'view',\r\n\t'base': 'text',\r\n\t'map': 'map',\r\n\t'area': 'navigator',\r\n\r\n\t'script': 'view',\r\n\t'noscript': 'view',\r\n\t'embed': 'view',\r\n\t'object': 'view',\r\n\t'param': 'view',\r\n\r\n\t'view': 'view',\r\n\t'scroll-view': 'scroll-view',\r\n\t'swiper': 'swiper',\r\n\t'icon': 'icon',\r\n\t'text': 'text',\r\n\r\n\t\r\n\r\n\r\n\t'checkbox': 'checkbox',\r\n\t'radio': 'radio',\r\n\t'picker': 'picker',\r\n\t'picker-view': 'picker-view',\r\n\t'slider': 'slider',\r\n\t'switch': 'switch',\r\n\t'navigator': 'navigator',\r\n\t\r\n\t'image': 'image',\r\n\t'contact-button': 'contact-button',\r\n\t'block': 'block'\r\n};\r\n\r\n\r\n/**\r\n * JSX/hyperscript reviver.\r\n * @see http://jasonformat.com/wtf-is-jsx\r\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\r\n *\r\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\r\n *\r\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\r\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\r\n * the current _actual_ DOM structure, and applying only the differences.\r\n *\r\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\r\n * and optionally children to append to the element.\r\n *\r\n * @example The following DOM tree\r\n *\r\n * `Hello!
`\r\n *\r\n * can be constructed using this function as:\r\n *\r\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\r\n *\r\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\r\n * @param {Object} attributes\tAny attributes/props to set on the created element.\r\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\r\n *\r\n * @public\r\n */\r\nexport function h(nodeName, attributes) {\r\n\tlet children=EMPTY_CHILDREN, lastSimple, child, simple, i;\r\n\tfor (i=arguments.length; i-- > 2; ) {\r\n\t\tstack.push(arguments[i]);\r\n\t}\r\n\tif (attributes && attributes.children!=null) {\r\n\t\tif (!stack.length) stack.push(attributes.children);\r\n\t\tdelete attributes.children;\r\n\t}\r\n\twhile (stack.length) {\r\n\t\tif ((child = stack.pop()) && child.pop!==undefined) {\r\n\t\t\tfor (i=child.length; i--; ) stack.push(child[i]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (typeof child==='boolean') child = null;\r\n\r\n\t\t\tif ((simple = typeof nodeName!=='function')) {\r\n\t\t\t\tif (child==null) child = '';\r\n\t\t\t\telse if (typeof child==='number') child = String(child);\r\n\t\t\t\telse if (typeof child!=='string') simple = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (simple && lastSimple) {\r\n\t\t\t\tchildren[children.length-1] += child;\r\n\t\t\t}\r\n\t\t\telse if (children===EMPTY_CHILDREN) {\r\n\t\t\t\tchildren = [child];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tchildren.push(child);\r\n\t\t\t}\r\n\r\n\t\t\tlastSimple = simple;\r\n\t\t}\r\n\t}\r\n\r\n\tlet p = new VNode();\r\n\tp.nodeName = options.isWeb?nodeName:map[nodeName];\r\n\tp.attributes = attributes == null ? undefined : attributes;\r\n\tif (children && typeof children[0] === 'string'&& !options.isWeb) {\r\n\t\tif (p.attributes) {\r\n\t\t\tp.attributes.value = children[0];\r\n\t\t} else {\r\n\t\t\tp.attributes = { value: children[0] };\r\n\t\t}\r\n\t} else {\r\n\t\tp.children = children;\r\n\t}\r\n\tp.key = attributes==null ? undefined : attributes.key;\r\n\r\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\r\n\tif (options.vnode!==undefined) options.vnode(p);\r\n\r\n\treturn p;\r\n}\r\n","/**\r\n * Copy all properties from `props` onto `obj`.\r\n * @param {Object} obj\t\tObject onto which properties should be copied.\r\n * @param {Object} props\tObject from which to copy properties.\r\n * @returns obj\r\n * @private\r\n */\r\nexport function extend(obj, props) {\r\n\tfor (let i in props) obj[i] = props[i];\r\n\treturn obj;\r\n}\r\n\r\n/**\r\n * Call a function asynchronously, as soon as possible. Makes\r\n * use of HTML Promise to schedule the callback if available,\r\n * otherwise falling back to `setTimeout` (mainly for IE<11).\r\n *\r\n * @param {Function} callback\r\n */\r\n\r\nlet usePromise = typeof Promise == 'function';\r\n\r\n// for native\r\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\r\n\tif (global.__config__.platform === 'android') {\r\n\t\tusePromise = true;\r\n\t} else {\r\n\t\tlet systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\r\n\t\tif (systemVersion > 8) {\r\n\t\t\tusePromise = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\r\n","import { extend } from './util';\r\nimport { h } from './h';\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\r\n * @param {Object} props\tAttributes/props to add when cloning\r\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\r\n */\r\nexport function cloneElement(vnode, props) {\r\n\treturn h(\r\n\t\tvnode.nodeName,\r\n\t\textend(extend({}, vnode.attributes), props),\r\n\t\targuments.length>2 ? [].slice.call(arguments, 2) : vnode.children\r\n\t);\r\n}\r\n","// render modes\r\n\r\nexport const NO_RENDER = 0;\r\nexport const SYNC_RENDER = 1;\r\nexport const FORCE_RENDER = 2;\r\nexport const ASYNC_RENDER = 3;\r\n\r\n\r\nexport const ATTR_KEY = '__preactattr_';\r\n\r\n// DOM properties that should NOT have \"px\" added when numeric\r\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\r\n\r\n","import options from './options';\r\nimport { defer } from './util';\r\nimport { renderComponent } from './vdom/component';\r\n\r\n/** Managed queue of dirty components to be re-rendered */\r\n\r\nlet items = [];\r\n\r\nexport function enqueueRender(component) {\r\n\tif (!component._dirty && (component._dirty = true) && items.push(component)==1) {\r\n\t\t(options.debounceRendering || defer)(rerender);\r\n\t}\r\n}\r\n\r\nexport function rerender() {\r\n\tlet p, list = items;\r\n\titems = [];\r\n\tlet element;\r\n\twhile ( (p = list.pop()) ) {\r\n\t\telement = p.base;\r\n\t\tif (p._dirty) renderComponent(p);\r\n\t}\r\n\tif (!list.length) {\r\n\t\tif (options.componentChange) options.componentChange(p, element);\r\n\t}\r\n}\r\n","import { extend } from '../util';\r\n\r\n\r\n/**\r\n * Check if two nodes are equivalent.\r\n *\r\n * @param {Node} node\t\t\tDOM Node to compare\r\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\r\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\r\n * @private\r\n */\r\nexport function isSameNodeType(node, vnode, hydrating) {\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\t\treturn node.splitText!==undefined;\r\n\t}\r\n\tif (typeof vnode.nodeName==='string') {\r\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\r\n\t}\r\n\treturn hydrating || node._componentConstructor===vnode.nodeName;\r\n}\r\n\r\n\r\n/**\r\n * Check if an Element has a given nodeName, case-insensitively.\r\n *\r\n * @param {Element} node\tA DOM Element to inspect the name of.\r\n * @param {String} nodeName\tUnnormalized name to compare against.\r\n */\r\nexport function isNamedNode(node, nodeName) {\r\n\treturn node.normalizedNodeName===nodeName || node.nodeName.toLowerCase()===nodeName.toLowerCase();\r\n}\r\n\r\n\r\n/**\r\n * Reconstruct Component-style `props` from a VNode.\r\n * Ensures default/fallback values from `defaultProps`:\r\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\r\n *\r\n * @param {VNode} vnode\r\n * @returns {Object} props\r\n */\r\nexport function getNodeProps(vnode) {\r\n\tlet props = extend({}, vnode.attributes);\r\n\tprops.children = vnode.children;\r\n\r\n\tlet defaultProps = vnode.nodeName.defaultProps;\r\n\tif (defaultProps!==undefined) {\r\n\t\tfor (let i in defaultProps) {\r\n\t\t\tif (props[i]===undefined) {\r\n\t\t\t\tprops[i] = defaultProps[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn props;\r\n}\r\n","import { IS_NON_DIMENSIONAL } from '../constants';\r\nimport options from '../options';\r\n\r\n\r\n/** Create an element with the given nodeName.\r\n *\t@param {String} nodeName\r\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\r\n *\t@returns {Element} node\r\n */\r\nexport function createNode(nodeName, isSvg) {\r\n\tlet node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\r\n\tnode.normalizedNodeName = nodeName;\r\n\treturn node;\r\n}\r\n\r\nfunction parseCSSText(cssText) {\r\n\tlet cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\r\n\tlet style = {}, [a,b,rule] = cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt];\r\n\tlet cssToJs = s => s.replace(/\\W+\\w/g, match => match.slice(-1).toUpperCase());\r\n\tlet properties = rule.split(\";\").map(o => o.split(\":\").map(x => x && x.trim()));\r\n\tfor (let [property, value] of properties) style[cssToJs(property)] = value;\r\n\treturn style;\r\n}\r\n\r\n/** Remove a child node from its parent if attached.\r\n *\t@param {Element} node\t\tThe node to remove\r\n */\r\nexport function removeNode(node) {\r\n\tlet parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\n\r\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\r\n *\tIf `value` is `null`, the attribute/handler will be removed.\r\n *\t@param {Element} node\tAn element to mutate\r\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\r\n *\t@param {any} old\tThe last value that was set for this name/node pair\r\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\r\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\r\n *\t@private\r\n */\r\nexport function setAccessor(node, name, old, value, isSvg) {\r\n\tif (name==='className') name = 'class';\r\n\r\n\r\n\tif (name==='key') {\r\n\t\t// ignore\r\n\t}\r\n\telse if (name==='ref') {\r\n\t\tif (old) old(null);\r\n\t\tif (value) value(node);\r\n\t}\r\n\telse if (name==='class' && !isSvg) {\r\n\t\tnode.className = value || '';\r\n\t}\r\n\telse if (name==='style') {\r\n\t\tif (options.isWeb) {\r\n\t\t\tif (!value || typeof value==='string' || typeof old==='string') {\r\n\t\t\t\tnode.style.cssText = value || '';\r\n\t\t\t}\r\n\t\t\tif (value && typeof value==='object') {\r\n\t\t\t\tif (typeof old!=='string') {\r\n\t\t\t\t\tfor (let i in old) if (!(i in value)) node.style[i] = '';\r\n\t\t\t\t}\r\n\t\t\t\tfor (let i in value) {\r\n\t\t\t\t\tnode.style[i] = typeof value[i]==='number' && IS_NON_DIMENSIONAL.test(i)===false ? (value[i]+'px') : value[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet oldJson = old,\r\n\t\t\t\tcurrentJson = value;\r\n\t\t\tif (typeof old === 'string') {\r\n\t\t\t\toldJson = parseCSSText(old);\r\n\t\t\t}\r\n\t\t\tif (typeof value == 'string') {\r\n\t\t\t\tcurrentJson = parseCSSText(value);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlet result = {},\r\n\t\t\t\tchanged = false;\r\n\t\t\r\n\t\t\tif (oldJson) {\r\n\t\t\t\tfor (let key in oldJson) {\r\n\t\t\t\t\tif (typeof currentJson == 'object' && !(key in currentJson)) {\r\n\t\t\t\t\t\tresult[key] = '';\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tfor (let ckey in currentJson) {\r\n\t\t\t\t\tif (currentJson[ckey] !== oldJson[ckey]) {\r\n\t\t\t\t\t\tresult[ckey] = currentJson[ckey];\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tif (changed) {\r\n\t\t\t\t\tnode.setStyles(result);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnode.setStyles(currentJson);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse if (name==='dangerouslySetInnerHTML') {\r\n\t\tif (value) node.innerHTML = value.__html || '';\r\n\t}\r\n\telse if (name[0]=='o' && name[1]=='n') {\r\n\t\tlet useCapture = name !== (name=name.replace(/Capture$/, ''));\r\n\t\tname = name.toLowerCase().substring(2);\r\n\t\tif (value) {\r\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\r\n\t}\r\n\telse if (name!=='list' && name!=='type' && !isSvg && name in node) {\r\n\t\tsetProperty(node, name, value==null ? '' : value);\r\n\t\tif (value==null || value===false) node.removeAttribute(name);\r\n\t}\r\n\telse {\r\n\t\tlet ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));\r\n\t\tif (value==null || value===false) {\r\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());\r\n\t\t\telse node.removeAttribute(name);\r\n\t\t}\r\n\t\telse if (typeof value!=='function') {\r\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\r\n\t\t\telse node.setAttribute(name, value);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/** Attempt to set a DOM property to the given value.\r\n *\tIE & FF throw for certain property-value combinations.\r\n */\r\nfunction setProperty(node, name, value) {\r\n\ttry {\r\n\t\tnode[name] = value;\r\n\t} catch (e) { }\r\n}\r\n\r\n\r\n/** Proxy an event to hooked event handlers\r\n *\t@private\r\n */\r\nfunction eventProxy(e) {\r\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\r\n}\r\n","import { ATTR_KEY } from '../constants';\r\nimport { isSameNodeType, isNamedNode } from './index';\r\nimport { buildComponentFromVNode } from './component';\r\nimport { createNode, setAccessor } from '../dom/index';\r\nimport { unmountComponent } from './component';\r\nimport options from '../options';\r\nimport { removeNode } from '../dom/index';\r\n\r\n/** Queue of components that have been mounted and are awaiting componentDidMount */\r\nexport const mounts = [];\r\n\r\n/** Diff recursion count, used to track the end of the diff cycle. */\r\nexport let diffLevel = 0;\r\n\r\n/** Global flag indicating if the diff is currently within an SVG */\r\nlet isSvgMode = false;\r\n\r\n/** Global flag indicating if the diff is performing hydration */\r\nlet hydrating = false;\r\n\r\n/** Invoke queued componentDidMount lifecycle methods */\r\nexport function flushMounts() {\r\n\tlet c;\r\n\twhile ((c=mounts.pop())) {\r\n\t\tif (options.afterMount) options.afterMount(c);\r\n\t\tif (c.componentDidMount) c.componentDidMount();\r\n\t\tif (c.installed) c.installed();\r\n\t}\r\n}\r\n\r\n\r\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\r\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\r\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\r\n *\t@returns {Element} dom\t\t\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function diff(dom, vnode, context, mountAll, parent, componentRoot) {\r\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\r\n\tif (!diffLevel++) {\r\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\r\n\t\tisSvgMode = parent!=null && parent.ownerSVGElement!==undefined;\r\n\r\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\r\n\t\thydrating = dom!=null && !(ATTR_KEY in dom);\r\n\t}\r\n\r\n\tlet ret = idiff(dom, vnode, context, mountAll, componentRoot);\r\n\r\n\t// append the element if its a new parent\r\n\tif (parent && ret.parentNode!==parent) parent.appendChild(ret);\r\n\r\n\t// diffLevel being reduced to 0 means we're exiting the diff\r\n\tif (!--diffLevel) {\r\n\t\thydrating = false;\r\n\t\t// invoke queued componentDidMount lifecycle methods\r\n\t\tif (!componentRoot) flushMounts();\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\r\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\r\n\tlet out = dom,\r\n\t\tprevSvgMode = isSvgMode;\r\n\r\n\t// empty values (null, undefined, booleans) render as empty Text nodes\r\n\tif (vnode==null || typeof vnode==='boolean') vnode = '';\r\n\r\n\r\n\t// Fast case: Strings & Numbers create/update Text nodes.\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\r\n\t\t// update if it's already a Text node:\r\n\t\tif (dom && dom.splitText!==undefined && dom.parentNode && (!dom._component || componentRoot)) {\r\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\r\n\t\t\tif (dom.nodeValue!=vnode) {\r\n\t\t\t\tdom.nodeValue = vnode;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\r\n\t\t\tout = document.createTextNode(vnode);\r\n\t\t\tif (dom) {\r\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\t\t\t\trecollectNodeTree(dom, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout[ATTR_KEY] = true;\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\r\n\t// If the VNode represents a Component, perform a component diff:\r\n\tlet vnodeName = vnode.nodeName;\r\n\tif (typeof vnodeName==='function') {\r\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\r\n\t}\r\n\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tisSvgMode = vnodeName==='svg' ? true : vnodeName==='foreignObject' ? false : isSvgMode;\r\n\r\n\r\n\t// If there's no existing element or it's the wrong type, create a new one:\r\n\tvnodeName = String(vnodeName);\r\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\r\n\t\tout = createNode(vnodeName, isSvgMode);\r\n\r\n\t\tif (dom) {\r\n\t\t\t// move children into the replacement node\r\n\t\t\twhile (dom.firstChild) out.appendChild(dom.firstChild);\r\n\r\n\t\t\t// if the previous Element was mounted into the DOM, replace it inline\r\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\r\n\t\t\t// recycle the old element (skips non-Element node types)\r\n\t\t\trecollectNodeTree(dom, true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tlet fc = out.firstChild,\r\n\t\tprops = out[ATTR_KEY],\r\n\t\tvchildren = vnode.children;\r\n\r\n\tif (props==null) {\r\n\t\tprops = out[ATTR_KEY] = {};\r\n\t\tfor (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;\r\n\t}\r\n\r\n\t// Optimization: fast-path for elements containing a single TextNode:\r\n\tif (!hydrating && vchildren && vchildren.length===1 && typeof vchildren[0]==='string' && fc!=null && fc.splitText!==undefined && fc.nextSibling==null) {\r\n\t\tif (fc.nodeValue!=vchildren[0]) {\r\n\t\t\tfc.nodeValue = vchildren[0];\r\n\t\t}\r\n\t}\r\n\t// otherwise, if there are existing or new children, diff them:\r\n\telse if (vchildren && vchildren.length || fc!=null) {\r\n\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML!=null);\r\n\t}\r\n\r\n\r\n\t// Apply attributes/props from VNode to the DOM Element:\r\n\tdiffAttributes(out, vnode.attributes, props);\r\n\r\n\r\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\r\n\tisSvgMode = prevSvgMode;\r\n\r\n\treturn out;\r\n}\r\n\r\n\r\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\r\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\r\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\r\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\r\n *\t@param {Boolean} mountAll\r\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\r\n */\r\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\r\n\tlet originalChildren = dom.childNodes,\r\n\t\tchildren = [],\r\n\t\tkeyed = {},\r\n\t\tkeyedLen = 0,\r\n\t\tmin = 0,\r\n\t\tlen = originalChildren.length,\r\n\t\tchildrenLen = 0,\r\n\t\tvlen = vchildren ? vchildren.length : 0,\r\n\t\tj, c, f, vchild, child;\r\n\r\n\t// Build up a map of keyed children and an Array of unkeyed children:\r\n\tif (len!==0) {\r\n\t\tfor (let i=0; i {\r\n\t\tif (typeof g2 === 'undefined') {\r\n\t\t\tg2 = '';\r\n\t\t}\r\n\r\n\t\t/* eslint-ignore-next-line */\r\n\t\tif (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\r\n\t\t\treturn g1 + g2 + g3;\r\n\t\t}\r\n\r\n\t\tlet appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\r\n\t\t//let prependClass = prefix + ' ' + g1.trim() + g2;\r\n\r\n\t\treturn appendClass + g3;\r\n\t\t//return appendClass + ',' + prependClass + g3;\r\n\t});\r\n\r\n\treturn css;\r\n}\r\n\r\nexport function addStyle(cssText, id) {\r\n\tid = id.toLowerCase();\r\n\tlet ele = document.getElementById(id);\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tif (ele && ele.parentNode === head) {\r\n\t\thead.removeChild(ele);\r\n\t}\r\n\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\tsomeThingStyles.setAttribute('id', id);\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nexport function addStyleWithoutId(cssText) {\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\n\r\nexport function addScopedAttr(vdom, style, attr, component) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tstyle = scoper(style, attr);\r\n\t\tif (style !== component._preStyle) {\r\n\t\t\taddStyle(style, attr);\r\n\t\t}\r\n\t} else if (style !== component._preStyle) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n\tcomponent._preStyle = style;\r\n}\r\n\r\nexport function addScopedAttrStatic(vdom, style, attr) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tif (!options.staticStyleRendered) {\r\n\t\t\taddStyle(scoper(style, attr), attr);\r\n\t\t}\r\n\t} else if (!options.staticStyleRendered) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n}\r\n\r\nexport function scopeVdom(attr,vdom){\r\n\tif (typeof vdom!== 'string'){\r\n\t\tvdom.attributes = vdom.attributes||{};\r\n\t\tvdom.attributes[attr] = '';\r\n\t\tvdom.children.forEach(child=>scopeVdom(attr,child));\r\n\t}\r\n}","import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';\r\nimport options from '../options';\r\nimport { extend } from '../util';\r\nimport { enqueueRender } from '../render-queue';\r\nimport { getNodeProps } from './index';\r\nimport { diff, mounts, diffLevel, flushMounts, recollectNodeTree, removeChildren } from './diff';\r\nimport { createComponent, collectComponent } from './component-recycler';\r\nimport { removeNode } from '../dom/index';\r\nimport {addScopedAttr, addScopedAttrStatic} from '../style';\r\n\r\n/** Set a component's `props` (generally derived from JSX attributes).\r\n *\t@param {Object} props\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\r\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\r\n */\r\nexport function setComponentProps(component, props, opts, context, mountAll) {\r\n\tif (component._disable) return;\r\n\tcomponent._disable = true;\r\n\r\n\tif ((component.__ref = props.ref)) delete props.ref;\r\n\tif ((component.__key = props.key)) delete props.key;\r\n\r\n\tif (!component.base || mountAll) {\r\n\t\tif (component.componentWillMount) component.componentWillMount();\r\n\t\tif (component.install) component.install();\r\n\t}\r\n\telse if (component.componentWillReceiveProps) {\r\n\t\tcomponent.componentWillReceiveProps(props, context);\r\n\t}\r\n\r\n\tif (context && context!==component.context) {\r\n\t\tif (!component.prevContext) component.prevContext = component.context;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tif (!component.prevProps) component.prevProps = component.props;\r\n\tcomponent.props = props;\r\n\r\n\tcomponent._disable = false;\r\n\r\n\tif (opts!==NO_RENDER) {\r\n\t\tif (opts===SYNC_RENDER || options.syncComponentUpdates!==false || !component.base) {\r\n\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tenqueueRender(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(component);\r\n}\r\n\r\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\r\n *\t@param {Component} component\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\r\n *\t@private\r\n */\r\nexport function renderComponent(component, opts, mountAll, isChild) {\r\n\tif (component._disable) return;\r\n\r\n\tlet props = component.props,\r\n\t\tstate = component.state,\r\n\t\tcontext = component.context,\r\n\t\tpreviousProps = component.prevProps || props,\r\n\t\tpreviousState = component.prevState || state,\r\n\t\tpreviousContext = component.prevContext || context,\r\n\t\tisUpdate = component.base,\r\n\t\tnextBase = component.nextBase,\r\n\t\tinitialBase = isUpdate || nextBase,\r\n\t\tinitialChildComponent = component._component,\r\n\t\tskip = false,\r\n\t\trendered, inst, cbase;\r\n\r\n\t// if updating\r\n\tif (isUpdate) {\r\n\t\tcomponent.props = previousProps;\r\n\t\tcomponent.state = previousState;\r\n\t\tcomponent.context = previousContext;\r\n\t\tif (opts!==FORCE_RENDER\r\n\t\t\t&& component.shouldComponentUpdate\r\n\t\t\t&& component.shouldComponentUpdate(props, state, context) === false) {\r\n\t\t\tskip = true;\r\n\t\t}\r\n\t\telse if (component.componentWillUpdate) {\r\n\t\t\tcomponent.componentWillUpdate(props, state, context);\r\n\t\t}\r\n\t\telse if (component.beforeUpdate) {\r\n\t\t\tcomponent.beforeUpdate(props, state, context);\r\n\t\t}\r\n\t\tcomponent.props = props;\r\n\t\tcomponent.state = state;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\r\n\tcomponent._dirty = false;\r\n\r\n\tif (!skip) {\r\n\t\trendered = component.render(props, state, context);\r\n\t\r\n\t\tif (component.style){\r\n\t\t\taddScopedAttr(rendered,component.style(),'_style_'+component._id,component);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (component.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,component.staticStyle(),'_style_'+component.constructor.name);\r\n\t\t}\r\n\r\n\t\t// context to pass to the child, can be updated via (grand-)parent component\r\n\t\tif (component.getChildContext) {\r\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\r\n\t\t}\r\n\r\n\t\tlet childComponent = rendered && rendered.nodeName,\r\n\t\t\ttoUnmount, base;\r\n\r\n\t\tif (typeof childComponent==='function') {\r\n\t\t\t// set up high order component link\r\n\r\n\t\t\tlet childProps = getNodeProps(rendered);\r\n\t\t\tinst = initialChildComponent;\r\n\r\n\t\t\tif (inst && inst.constructor===childComponent && childProps.key==inst.__key) {\r\n\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttoUnmount = inst;\r\n\r\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\r\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\r\n\t\t\t\tinst._parentComponent = component;\r\n\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\r\n\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\r\n\t\t\t}\r\n\r\n\t\t\tbase = inst.base;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcbase = initialBase;\r\n\r\n\t\t\t// destroy high order component link\r\n\t\t\ttoUnmount = initialChildComponent;\r\n\t\t\tif (toUnmount) {\r\n\t\t\t\tcbase = component._component = null;\r\n\t\t\t}\r\n\r\n\t\t\tif (initialBase || opts===SYNC_RENDER) {\r\n\t\t\t\tif (cbase) cbase._component = null;\r\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (initialBase && base!==initialBase && inst!==initialChildComponent) {\r\n\t\t\tlet baseParent = initialBase.parentNode;\r\n\t\t\tif (baseParent && base!==baseParent) {\r\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\r\n\r\n\t\t\t\tif (!toUnmount) {\r\n\t\t\t\t\tinitialBase._component = null;\r\n\t\t\t\t\trecollectNodeTree(initialBase, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (toUnmount) {\r\n\t\t\tunmountComponent(toUnmount);\r\n\t\t}\r\n\r\n\t\tcomponent.base = base;\r\n\t\tif (base && !isChild) {\r\n\t\t\tlet componentRef = component,\r\n\t\t\t\tt = component;\r\n\t\t\twhile ((t=t._parentComponent)) {\r\n\t\t\t\t(componentRef = t).base = base;\r\n\t\t\t}\r\n\t\t\tbase._component = componentRef;\r\n\t\t\tbase._componentConstructor = componentRef.constructor;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!isUpdate || mountAll) {\r\n\t\tmounts.unshift(component);\r\n\t}\r\n\telse if (!skip) {\r\n\t\t// Ensure that pending componentDidMount() hooks of child components\r\n\t\t// are called before the componentDidUpdate() hook in the parent.\r\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\r\n\t\t// flushMounts();\r\n\r\n\t\tif (component.componentDidUpdate) {\r\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (component.afterUpdate) {\r\n\t\t\tcomponent.afterUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (options.afterUpdate) options.afterUpdate(component);\r\n\t}\r\n\r\n\tif (component._renderCallbacks!=null) {\r\n\t\twhile (component._renderCallbacks.length) component._renderCallbacks.pop().call(component);\r\n\t}\r\n\r\n\tif (!diffLevel && !isChild) flushMounts();\r\n}\r\n\r\n\r\n\r\n/** Apply the Component referenced by a VNode to the DOM.\r\n *\t@param {Element} dom\tThe DOM node to mutate\r\n *\t@param {VNode} vnode\tA Component-referencing VNode\r\n *\t@returns {Element} dom\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function buildComponentFromVNode(dom, vnode, context, mountAll) {\r\n\tlet c = dom && dom._component,\r\n\t\toriginalComponent = c,\r\n\t\toldDom = dom,\r\n\t\tisDirectOwner = c && dom._componentConstructor===vnode.nodeName,\r\n\t\tisOwner = isDirectOwner,\r\n\t\tprops = getNodeProps(vnode);\r\n\twhile (c && !isOwner && (c=c._parentComponent)) {\r\n\t\tisOwner = c.constructor===vnode.nodeName;\r\n\t}\r\n\r\n\tif (c && isOwner && (!mountAll || c._component)) {\r\n\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\t}\r\n\telse {\r\n\t\tif (originalComponent && !isDirectOwner) {\r\n\t\t\tunmountComponent(originalComponent);\r\n\t\t\tdom = oldDom = null;\r\n\t\t}\r\n\r\n\t\tc = createComponent(vnode.nodeName, props, context);\r\n\t\tif (dom && !c.nextBase) {\r\n\t\t\tc.nextBase = dom;\r\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\r\n\t\t\toldDom = null;\r\n\t\t}\r\n\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\r\n\t\tif (oldDom && dom!==oldDom) {\r\n\t\t\toldDom._component = null;\r\n\t\t\trecollectNodeTree(oldDom, false);\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n\r\n\r\n/** Remove a component from the DOM and recycle it.\r\n *\t@param {Component} component\tThe Component instance to unmount\r\n *\t@private\r\n */\r\nexport function unmountComponent(component) {\r\n\tif (options.beforeUnmount) options.beforeUnmount(component);\r\n\r\n\tlet base = component.base;\r\n\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.componentWillUnmount) component.componentWillUnmount();\r\n\tif (component.uninstall) component.uninstall();\r\n\t\r\n\tcomponent.base = null;\r\n\r\n\t// recursively tear down & recollect high-order component children:\r\n\tlet inner = component._component;\r\n\tif (inner) {\r\n\t\tunmountComponent(inner);\r\n\t}\r\n\telse if (base) {\r\n\t\tif (base[ATTR_KEY] && base[ATTR_KEY].ref) base[ATTR_KEY].ref(null);\r\n\r\n\t\tcomponent.nextBase = base;\r\n\r\n\t\tremoveNode(base);\r\n\t\tcollectComponent(component);\r\n\r\n\t\tremoveChildren(base);\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(null);\r\n}\r\n","import { FORCE_RENDER } from './constants';\r\nimport { extend } from './util';\r\nimport { renderComponent } from './vdom/component';\r\nimport { enqueueRender } from './render-queue';\r\nimport options from './options';\r\n\r\nlet id = 0;\r\nfunction getId(){\r\n\treturn id++;\r\n}\r\n/** Base Component class.\r\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\r\n *\t@public\r\n *\r\n *\t@example\r\n *\tclass MyFoo extends Component {\r\n *\t\trender(props, state) {\r\n *\t\t\treturn ;\r\n *\t\t}\r\n *\t}\r\n */\r\nexport function Component(props, context) {\r\n\tthis._dirty = true;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.context = context;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.props = props;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.state = this.state || {};\r\n\r\n\tthis._id = getId();\r\n\r\n\tthis._preStyle = null;\r\n\r\n\tthis.$store = null;\r\n\r\n}\r\n\r\n\r\nextend(Component.prototype, {\r\n\r\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\r\n\t *\t@param {object} nextProps\r\n\t *\t@param {object} nextState\r\n\t *\t@param {object} nextContext\r\n\t *\t@returns {Boolean} should the component re-render\r\n\t *\t@name shouldComponentUpdate\r\n\t *\t@function\r\n\t */\r\n\r\n\r\n\t/** Update component state by copying properties from `state` to `this.state`.\r\n\t *\t@param {object} state\t\tA hash of state properties to update with new values\r\n\t *\t@param {function} callback\tA function to be called once component state is updated\r\n\t */\r\n\tsetState(state, callback) {\r\n\t\tlet s = this.state;\r\n\t\tif (!this.prevState) this.prevState = extend({}, s);\r\n\t\textend(s, typeof state==='function' ? state(s, this.props) : state);\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\tenqueueRender(this);\r\n\t},\r\n\r\n\r\n\t/** Immediately perform a synchronous re-render of the component.\r\n\t *\t@param {function} callback\t\tA function to be called after component is re-rendered.\r\n\t *\t@private\r\n\t */\r\n\tforceUpdate(callback) {\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\trenderComponent(this, FORCE_RENDER);\r\n\t\tif (options.componentChange) options.componentChange(this, this.base);\r\n\t},\r\n\r\n\tupdate(callback){\r\n\t\tthis.forceUpdate(callback);\r\n\t},\r\n\r\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n\t *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n\t *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\r\n\t *\t@param {object} state\t\tThe component's current state\r\n\t *\t@param {object} context\t\tContext object (if a parent component has provided context)\r\n\t *\t@returns VNode\r\n\t */\r\n\trender() {}\r\n\r\n});\r\n","import { diff } from './vdom/diff';\r\nimport { Component } from './component';\r\nimport options from './options';\r\nimport {addScopedAttr, addScopedAttrStatic} from './style';\r\n\r\nfunction isElement(obj) {\r\n\ttry {\r\n\t //Using W3 DOM2 (works for FF, Opera and Chrome)\r\n\t return obj instanceof HTMLElement;\r\n\t}\r\n\tcatch (e){\r\n\t //Browsers not supporting W3 DOM2 don't have HTMLElement and\r\n\t //an exception is thrown and we end up here. Testing some\r\n\t //properties that all elements have (works on IE7)\r\n\t return (typeof obj===\"object\") &&\r\n\t\t(obj.nodeType===1) && (typeof obj.style === \"object\") &&\r\n\t\t(typeof obj.ownerDocument ===\"object\");\r\n\t}\r\n}\r\n\r\n/** Render JSX into a `parent` Element.\r\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\r\n *\t@param {Element} parent\t\tDOM element to render into\r\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\r\n *\t@public\r\n *\r\n *\t@example\r\n *\t// render a div into :\r\n *\trender(hello!
, document.body);\r\n *\r\n *\t@example\r\n *\t// render a \"Thing\" component into #foo:\r\n *\tconst Thing = ({ name }) => { name };\r\n *\trender(, document.querySelector('#foo'));\r\n */\r\nexport function render(vnode, parent, merge) {\r\n\toptions.staticStyleRendered = false;\r\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent;\r\n\tif (merge === true){\r\n\t\twhile (parent.firstChild){\r\n\t\t\tparent.removeChild(parent.firstChild);\r\n\t\t}\r\n\t}\r\n\tconst m = isElement(merge) || merge === undefined;\r\n\tif (vnode instanceof Component) {\r\n\t\tif (window && window.Omi){\r\n\t\t\twindow.Omi.instances.push(vnode);\r\n\t\t}\r\n\t\tif (!m){\r\n\t\t\tvnode.$store = options.$store = merge;\r\n\t\t}\r\n\t\tif (vnode.componentWillMount) vnode.componentWillMount();\r\n\t\tif (vnode.install) vnode.install();\r\n\t\tconst rendered = vnode.render();\r\n\t\tif (vnode.style){\r\n\t\t\taddScopedAttr(rendered,vnode.style(),'_style_'+vnode._id,vnode);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (vnode.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,vnode.staticStyle(),'_style_'+vnode.constructor.name, !vnode.base);\r\n\t\t}\r\n\r\n\t\tvnode.base = diff(m ? merge : undefined, rendered, {}, false, parent, false);\r\n\t\t\r\n\t\tif (vnode.componentDidMount) vnode.componentDidMount();\r\n\t\tif (vnode.installed) vnode.installed();\r\n\t\toptions.staticStyleRendered = true;\r\n\t\treturn vnode.base;\r\n\t}\r\n\t\r\n\tlet result = diff(merge, vnode, {}, false, parent, false);\r\n\toptions.staticStyleRendered = true;\r\n\treturn result;\r\n}\r\n","import { h, h as createElement } from './h';\r\nimport { cloneElement } from './clone-element';\r\nimport { Component } from './component';\r\nimport { render } from './render';\r\nimport { rerender } from './render-queue';\r\nimport options from './options';\r\n\r\nfunction getGlobal() {\r\n\tif (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\r\n\t\tif (typeof self !== 'undefined') {\r\n\t\t\treturn self;\r\n\t\t} else if (typeof window !== 'undefined') {\r\n\t\t\treturn window;\r\n\t\t} else if (typeof global !== 'undefined') {\r\n\t\t\treturn global;\r\n\t\t}\r\n\t\treturn (function(){\r\n\t\t\treturn this;\r\n\t\t})();\r\n\t\t\r\n\t}\r\n\treturn global;\r\n}\r\n\r\nconst instances = [];\r\nconst root = getGlobal();\r\nroot.Omi = {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nroot.Omi.version = '3.0.0';\r\n\r\nexport default {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nexport {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n","\n\t\t\t\timport Omi from './omi';\n\t\t\t\tif (typeof module!='undefined') module.exports = Omi;\n\t\t\t\telse self.Omi = Omi;\n\t\t\t"],"names":["VNode","scopedStyle","$store","isWeb","staticStyleRendered","doc","document","stack","EMPTY_CHILDREN","map","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","options","value","key","vnode","extend","obj","props","usePromise","Promise","global","__config__","platform","systemVersion","split","defer","resolve","then","bind","setTimeout","cloneElement","slice","call","NO_RENDER","SYNC_RENDER","FORCE_RENDER","ASYNC_RENDER","ATTR_KEY","IS_NON_DIMENSIONAL","items","enqueueRender","component","_dirty","debounceRendering","rerender","list","element","base","renderComponent","componentChange","isSameNodeType","node","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","toLowerCase","getNodeProps","defaultProps","createNode","isSvg","createElementNS","createElement","parseCSSText","cssText","cssTxt","replace","match","a","b","rule","cssToJs","s","toUpperCase","properties","o","x","trim","property","style","removeNode","parentNode","removeChild","setAccessor","name","old","className","test","oldJson","currentJson","result","changed","ckey","setStyles","innerHTML","__html","useCapture","substring","addEventListener","eventProxy","removeEventListener","_listeners","setProperty","removeAttribute","ns","removeAttributeNS","setAttributeNS","setAttribute","e","type","event","mounts","diffLevel","isSvgMode","flushMounts","c","afterMount","componentDidMount","installed","diff","dom","context","mountAll","parent","componentRoot","ownerSVGElement","ret","idiff","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","recollectNodeTree","vnodeName","buildComponentFromVNode","firstChild","fc","vchildren","nextSibling","innerDiffNode","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","len","childrenLen","vlen","j","f","vchild","__key","insertBefore","unmountOnly","unmountComponent","ref","removeChildren","lastChild","next","previousSibling","attrs","components","collectComponent","constructor","createComponent","Ctor","inst","prototype","render","Component","doRender","window","Omi","instances","nextBase","splice","state","scoper","css","prefix","re","RegExp","g0","g1","g2","g3","appendClass","addStyle","id","ele","getElementById","head","getElementsByTagName","someThingStyles","ActiveXObject","styleSheet","textContent","addStyleWithoutId","addScopedAttr","vdom","attr","scopeVdom","_preStyle","addScopedAttrStatic","forEach","setComponentProps","opts","_disable","__ref","componentWillMount","install","componentWillReceiveProps","prevContext","prevProps","syncComponentUpdates","isChild","previousProps","previousState","prevState","previousContext","isUpdate","initialBase","initialChildComponent","skip","rendered","cbase","shouldComponentUpdate","componentWillUpdate","beforeUpdate","_id","staticStyle","getChildContext","childComponent","toUnmount","childProps","_parentComponent","baseParent","componentRef","t","unshift","componentDidUpdate","afterUpdate","_renderCallbacks","originalComponent","oldDom","isDirectOwner","isOwner","beforeUnmount","componentWillUnmount","uninstall","inner","getId","setState","callback","forceUpdate","update","isElement","HTMLElement","nodeType","ownerDocument","merge","querySelector","m","getGlobal","Math","Array","self","root","version","module","exports"],"mappings":";;;;;;;;;;;CAAA;AACA,CAAO,SAASA,KAAT,GAAiB;;CCDxB;;;;AAIA,eAAe;;CAEdC,cAAa,IAFC;CAGdC,SAAQ,IAHM;CAIdC,QAAO,IAJO;CAKdC,sBAAqB,KALP;CAMdC,MAAK,OAAOC,QAAP,KAAoB,QAApB,GAA+BA,QAA/B,GAA0C;CAC/C;CACA;;;;;CAKA;;CAEA;;;CAGA;;CAEA;CACA;;CAEA;CACA;;CAEA;CACA;CA3Bc,CAAf;;KCAMC,QAAQ,EAAd;;CAEA,IAAMC,iBAAiB,EAAvB;;CAEA,IAAMC,MAAM;CACX,OAAM,MADK;CAEX,OAAM,MAFK;;CAIX,MAAK,MAJM;CAKX,OAAM,MALK;CAMX,OAAM,MANK;CAOX,OAAM,MAPK;CAQX,OAAM,MARK;CASX,OAAM,MATK;CAUX,OAAM,MAVK;CAWX,SAAQ,MAXG;CAYX,YAAW,MAZA;CAaX,MAAK,MAbM;CAcX,QAAO,MAdI;CAeX,QAAO,MAfI;CAgBX,eAAc,MAhBH;CAiBX,SAAQ,MAjBG;CAkBX,SAAQ,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K,YAAY,EAAlB;CACA,IAAM8F,OAAOJ,WAAb;CACAI,KAAK/F,GAAL,GAAW;CACVvL,KADU;CAEVmE,iBAFU;CAGVjC,2BAHU;CAIVkJ,qBAJU;CAKVD,eALU;CAMVnI,mBANU;CAOVjC,iBAPU;CAQVyK;CARU,CAAX;;CAWA8F,KAAK/F,GAAL,CAASgG,OAAT,GAAmB,OAAnB;;AAEA,WAAe;CACdvR,KADc;CAEdmE,iBAFc;CAGdjC,2BAHc;CAIdkJ,qBAJc;CAKdD,eALc;CAMdnI,mBANc;CAOdjC,iBAPc;CAQdyK;CARc,CAAf;;CCrCI,IAAI,OAAOgG,MAAP,IAAe,WAAnB,EAAgCA,OAAOC,OAAP,GAAiBlG,GAAjB,CAAhC,KACK8F,KAAK9F,GAAL,GAAWA,GAAX;;"}
\ No newline at end of file
diff --git a/dist/omi.esm.js b/dist/omi.esm.js
index 485683121..b406fca8d 100644
--- a/dist/omi.esm.js
+++ b/dist/omi.esm.js
@@ -1,5 +1,5 @@
/**
- * omi v3.0.0 http://omijs.org
+ * omi v3.0.1 http://omijs.org
* Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.
* By dntzhang https://github.com/dntzhang
* Github: https://github.com/AlloyTeam/omi
@@ -47,8 +47,6 @@ var stack = [];
var EMPTY_CHILDREN = [];
-var isH5 = options.isWeb;
-
var map = {
'br': 'view',
'hr': 'view',
@@ -252,9 +250,9 @@ function h(nodeName, attributes) {
}
var p = new VNode();
- p.nodeName = isH5 ? nodeName : map[nodeName];
+ p.nodeName = options.isWeb ? nodeName : map[nodeName];
p.attributes = attributes == null ? undefined : attributes;
- if (children && typeof children[0] === 'string' && !isH5) {
+ if (children && typeof children[0] === 'string' && !options.isWeb) {
if (p.attributes) {
p.attributes.value = children[0];
} else {
@@ -444,8 +442,6 @@ function parseCSSText(cssText) {
}return style;
}
-var isH5$1 = options.isWeb;
-
/** Remove a child node from its parent if attached.
* @param {Element} node The node to remove
*/
@@ -474,7 +470,7 @@ function setAccessor(node, name, old, value, isSvg) {
} else if (name === 'class' && !isSvg) {
node.className = value || '';
} else if (name === 'style') {
- if (isH5$1) {
+ if (options.isWeb) {
if (!value || typeof value === 'string' || typeof old === 'string') {
node.style.cssText = value || '';
}
@@ -929,8 +925,10 @@ function scoper(css, prefix) {
}
var appendClass = g1.replace(/(\s*)$/, '') + prefix + g2;
- var prependClass = prefix + ' ' + g1.trim() + g2;
- return appendClass + ',' + prependClass + g3;
+ //let prependClass = prefix + ' ' + g1.trim() + g2;
+
+ return appendClass + g3;
+ //return appendClass + ',' + prependClass + g3;
});
return css;
diff --git a/dist/omi.esm.js.map b/dist/omi.esm.js.map
index ad37d86c0..26eb00e12 100644
--- a/dist/omi.esm.js.map
+++ b/dist/omi.esm.js.map
@@ -1 +1 @@
-{"version":3,"file":"omi.esm.js","sources":["../src/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/clone-element.js","../src/constants.js","../src/render-queue.js","../src/vdom/index.js","../src/dom/index.js","../src/vdom/diff.js","../src/vdom/component-recycler.js","../src/style.js","../src/vdom/component.js","../src/component.js","../src/render.js","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\r\nexport function VNode() {}\r\n","/** Global options\r\n *\t@public\r\n *\t@namespace options {Object}\r\n */\r\nexport default {\r\n\r\n\tscopedStyle: true,\r\n\t$store: null,\r\n\tisWeb: true,\r\n\tstaticStyleRendered: false,\r\n\tdoc: typeof document === 'object' ? document : null\r\n\t//componentChange(component, element) { },\r\n\t/** If `true`, `prop` changes trigger synchronous component updates.\r\n\t *\t@name syncComponentUpdates\r\n\t *\t@type Boolean\r\n\t *\t@default true\r\n\t */\r\n\t//syncComponentUpdates: true,\r\n\r\n\t/** Processes all created VNodes.\r\n\t *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\r\n\t */\r\n\t//vnode(vnode) { }\r\n\r\n\t/** Hook invoked after a component is mounted. */\r\n\t//afterMount(component) { },\r\n\r\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\r\n\t//afterUpdate(component) { }\r\n\r\n\t/** Hook invoked immediately before a component is unmounted. */\r\n\t// beforeUnmount(component) { }\r\n};\r\n","import { VNode } from './vnode';\r\nimport options from './options';\r\n\r\n\r\nconst stack = [];\r\n\r\nconst EMPTY_CHILDREN = [];\r\n\r\nconst isH5 = options.isWeb;\r\n\r\nconst map = {\r\n\t'br': 'view',\r\n\t'hr': 'view',\r\n\r\n\t'p': 'view',\r\n\t'h1': 'view',\r\n\t'h2': 'view',\r\n\t'h3': 'view',\r\n\t'h4': 'view',\r\n\t'h5': 'view',\r\n\t'h6': 'view',\r\n\t'abbr': 'view',\r\n\t'address': 'view',\r\n\t'b': 'view',\r\n\t'bdi': 'view',\r\n\t'bdo': 'view',\r\n\t'blockquote': 'view',\r\n\t'cite': 'view',\r\n\t'code': 'view',\r\n\t'del': 'view',\r\n\t'ins': 'view',\r\n\t'dfn': 'view',\r\n\t'em': 'view',\r\n\t'strong': 'view',\r\n\t'samp': 'view',\r\n\t'kbd': 'view',\r\n\t'var': 'view',\r\n\t'i': 'view',\r\n\t'mark': 'view',\r\n\t'pre': 'view',\r\n\t'q': 'view',\r\n\t'ruby': 'view',\r\n\t'rp': 'view',\r\n\t'rt': 'view',\r\n\t's': 'view',\r\n\t'small': 'view',\r\n\t'sub': 'view',\r\n\t'sup': 'view',\r\n\t'time': 'view',\r\n\t'u': 'view',\r\n\t'wbr': 'view',\r\n\r\n\t'form': 'form',\r\n\t'input': 'input',\r\n\t'textarea': 'textarea',\r\n\t'button': 'button',\r\n\t'select': 'picker',\r\n\t'option': 'view',\r\n\t'optgroup': 'view',\r\n\t'label': 'label',\r\n\t'fieldset': 'view',\r\n\t'datalist': 'picker',\r\n\t'legend': 'view',\r\n\t'output': 'view',\r\n\r\n\t'iframe': 'view',\r\n \r\n\t'img': 'image',\r\n\t'canvas': 'canvas',\r\n\t'figure': 'view',\r\n\t'figcaption': 'view',\r\n\r\n \r\n\t'audio': 'audio',\r\n\t'source': 'audio',\r\n\t'video': 'video',\r\n\t'track': 'video',\r\n \r\n\t'a': 'navigator',\r\n\t'nav': 'view',\r\n\t'link': 'navigator',\r\n\r\n\t'ul': 'view',\r\n\t'ol': 'view',\r\n\t'li': 'view',\r\n\t'dl': 'view',\r\n\t'dt': 'view',\r\n\t'dd': 'view',\r\n\t'menu': 'view',\r\n\t'command': 'view',\r\n\r\n\r\n\t'table': 'view',\r\n\t'caption': 'view',\r\n\t'th': 'view',\r\n\t'td': 'view',\r\n\t'tr': 'view',\r\n\t'thead': 'view',\r\n\t'tbody': 'view',\r\n\t'tfoot': 'view',\r\n\t'col': 'view',\r\n\t'colgroup': 'view',\r\n\r\n\r\n\t'div': 'view',\r\n\t'main': 'view',\r\n\t//'span': 'label',\r\n\t'span': 'text',\r\n\t'header': 'view',\r\n\t'footer': 'view',\r\n\t'section': 'view',\r\n\t'article': 'view',\r\n\t'aside': 'view',\r\n\t'details': 'view',\r\n\t'dialog': 'view',\r\n\t'summary': 'view',\r\n\r\n\t'progress': 'progress',\r\n\t'meter': 'progress',\r\n\t'head': 'view',\r\n\t'meta': 'view',\r\n\t'base': 'text',\r\n\t'map': 'map',\r\n\t'area': 'navigator',\r\n\r\n\t'script': 'view',\r\n\t'noscript': 'view',\r\n\t'embed': 'view',\r\n\t'object': 'view',\r\n\t'param': 'view',\r\n\r\n\t'view': 'view',\r\n\t'scroll-view': 'scroll-view',\r\n\t'swiper': 'swiper',\r\n\t'icon': 'icon',\r\n\t'text': 'text',\r\n\r\n\t\r\n\r\n\r\n\t'checkbox': 'checkbox',\r\n\t'radio': 'radio',\r\n\t'picker': 'picker',\r\n\t'picker-view': 'picker-view',\r\n\t'slider': 'slider',\r\n\t'switch': 'switch',\r\n\t'navigator': 'navigator',\r\n\t\r\n\t'image': 'image',\r\n\t'contact-button': 'contact-button',\r\n\t'block': 'block'\r\n};\r\n\r\n\r\n/**\r\n * JSX/hyperscript reviver.\r\n * @see http://jasonformat.com/wtf-is-jsx\r\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\r\n *\r\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\r\n *\r\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\r\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\r\n * the current _actual_ DOM structure, and applying only the differences.\r\n *\r\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\r\n * and optionally children to append to the element.\r\n *\r\n * @example The following DOM tree\r\n *\r\n * `Hello!
`\r\n *\r\n * can be constructed using this function as:\r\n *\r\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\r\n *\r\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\r\n * @param {Object} attributes\tAny attributes/props to set on the created element.\r\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\r\n *\r\n * @public\r\n */\r\nexport function h(nodeName, attributes) {\r\n\tlet children=EMPTY_CHILDREN, lastSimple, child, simple, i;\r\n\tfor (i=arguments.length; i-- > 2; ) {\r\n\t\tstack.push(arguments[i]);\r\n\t}\r\n\tif (attributes && attributes.children!=null) {\r\n\t\tif (!stack.length) stack.push(attributes.children);\r\n\t\tdelete attributes.children;\r\n\t}\r\n\twhile (stack.length) {\r\n\t\tif ((child = stack.pop()) && child.pop!==undefined) {\r\n\t\t\tfor (i=child.length; i--; ) stack.push(child[i]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (typeof child==='boolean') child = null;\r\n\r\n\t\t\tif ((simple = typeof nodeName!=='function')) {\r\n\t\t\t\tif (child==null) child = '';\r\n\t\t\t\telse if (typeof child==='number') child = String(child);\r\n\t\t\t\telse if (typeof child!=='string') simple = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (simple && lastSimple) {\r\n\t\t\t\tchildren[children.length-1] += child;\r\n\t\t\t}\r\n\t\t\telse if (children===EMPTY_CHILDREN) {\r\n\t\t\t\tchildren = [child];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tchildren.push(child);\r\n\t\t\t}\r\n\r\n\t\t\tlastSimple = simple;\r\n\t\t}\r\n\t}\r\n\r\n\tlet p = new VNode();\r\n\tp.nodeName = isH5?nodeName:map[nodeName];\r\n\tp.attributes = attributes == null ? undefined : attributes;\r\n\tif (children && typeof children[0] === 'string'&& !isH5) {\r\n\t\tif (p.attributes) {\r\n\t\t\tp.attributes.value = children[0];\r\n\t\t} else {\r\n\t\t\tp.attributes = { value: children[0] };\r\n\t\t}\r\n\t} else {\r\n\t\tp.children = children;\r\n\t}\r\n\tp.key = attributes==null ? undefined : attributes.key;\r\n\r\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\r\n\tif (options.vnode!==undefined) options.vnode(p);\r\n\r\n\treturn p;\r\n}\r\n","/**\r\n * Copy all properties from `props` onto `obj`.\r\n * @param {Object} obj\t\tObject onto which properties should be copied.\r\n * @param {Object} props\tObject from which to copy properties.\r\n * @returns obj\r\n * @private\r\n */\r\nexport function extend(obj, props) {\r\n\tfor (let i in props) obj[i] = props[i];\r\n\treturn obj;\r\n}\r\n\r\n/**\r\n * Call a function asynchronously, as soon as possible. Makes\r\n * use of HTML Promise to schedule the callback if available,\r\n * otherwise falling back to `setTimeout` (mainly for IE<11).\r\n *\r\n * @param {Function} callback\r\n */\r\n\r\nlet usePromise = typeof Promise == 'function';\r\n\r\n// for native\r\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\r\n\tif (global.__config__.platform === 'android') {\r\n\t\tusePromise = true;\r\n\t} else {\r\n\t\tlet systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\r\n\t\tif (systemVersion > 8) {\r\n\t\t\tusePromise = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\r\n","import { extend } from './util';\r\nimport { h } from './h';\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\r\n * @param {Object} props\tAttributes/props to add when cloning\r\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\r\n */\r\nexport function cloneElement(vnode, props) {\r\n\treturn h(\r\n\t\tvnode.nodeName,\r\n\t\textend(extend({}, vnode.attributes), props),\r\n\t\targuments.length>2 ? [].slice.call(arguments, 2) : vnode.children\r\n\t);\r\n}\r\n","// render modes\r\n\r\nexport const NO_RENDER = 0;\r\nexport const SYNC_RENDER = 1;\r\nexport const FORCE_RENDER = 2;\r\nexport const ASYNC_RENDER = 3;\r\n\r\n\r\nexport const ATTR_KEY = '__preactattr_';\r\n\r\n// DOM properties that should NOT have \"px\" added when numeric\r\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\r\n\r\n","import options from './options';\r\nimport { defer } from './util';\r\nimport { renderComponent } from './vdom/component';\r\n\r\n/** Managed queue of dirty components to be re-rendered */\r\n\r\nlet items = [];\r\n\r\nexport function enqueueRender(component) {\r\n\tif (!component._dirty && (component._dirty = true) && items.push(component)==1) {\r\n\t\t(options.debounceRendering || defer)(rerender);\r\n\t}\r\n}\r\n\r\nexport function rerender() {\r\n\tlet p, list = items;\r\n\titems = [];\r\n\tlet element;\r\n\twhile ( (p = list.pop()) ) {\r\n\t\telement = p.base;\r\n\t\tif (p._dirty) renderComponent(p);\r\n\t}\r\n\tif (!list.length) {\r\n\t\tif (options.componentChange) options.componentChange(p, element);\r\n\t}\r\n}\r\n","import { extend } from '../util';\r\n\r\n\r\n/**\r\n * Check if two nodes are equivalent.\r\n *\r\n * @param {Node} node\t\t\tDOM Node to compare\r\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\r\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\r\n * @private\r\n */\r\nexport function isSameNodeType(node, vnode, hydrating) {\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\t\treturn node.splitText!==undefined;\r\n\t}\r\n\tif (typeof vnode.nodeName==='string') {\r\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\r\n\t}\r\n\treturn hydrating || node._componentConstructor===vnode.nodeName;\r\n}\r\n\r\n\r\n/**\r\n * Check if an Element has a given nodeName, case-insensitively.\r\n *\r\n * @param {Element} node\tA DOM Element to inspect the name of.\r\n * @param {String} nodeName\tUnnormalized name to compare against.\r\n */\r\nexport function isNamedNode(node, nodeName) {\r\n\treturn node.normalizedNodeName===nodeName || node.nodeName.toLowerCase()===nodeName.toLowerCase();\r\n}\r\n\r\n\r\n/**\r\n * Reconstruct Component-style `props` from a VNode.\r\n * Ensures default/fallback values from `defaultProps`:\r\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\r\n *\r\n * @param {VNode} vnode\r\n * @returns {Object} props\r\n */\r\nexport function getNodeProps(vnode) {\r\n\tlet props = extend({}, vnode.attributes);\r\n\tprops.children = vnode.children;\r\n\r\n\tlet defaultProps = vnode.nodeName.defaultProps;\r\n\tif (defaultProps!==undefined) {\r\n\t\tfor (let i in defaultProps) {\r\n\t\t\tif (props[i]===undefined) {\r\n\t\t\t\tprops[i] = defaultProps[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn props;\r\n}\r\n","import { IS_NON_DIMENSIONAL } from '../constants';\r\nimport options from '../options';\r\n\r\n\r\n/** Create an element with the given nodeName.\r\n *\t@param {String} nodeName\r\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\r\n *\t@returns {Element} node\r\n */\r\nexport function createNode(nodeName, isSvg) {\r\n\tlet node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\r\n\tnode.normalizedNodeName = nodeName;\r\n\treturn node;\r\n}\r\n\r\nfunction parseCSSText(cssText) {\r\n\tlet cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\r\n\tlet style = {}, [a,b,rule] = cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt];\r\n\tlet cssToJs = s => s.replace(/\\W+\\w/g, match => match.slice(-1).toUpperCase());\r\n\tlet properties = rule.split(\";\").map(o => o.split(\":\").map(x => x && x.trim()));\r\n\tfor (let [property, value] of properties) style[cssToJs(property)] = value;\r\n\treturn style;\r\n}\r\n\r\nconst isH5 = options.isWeb;\r\n\r\n\r\n/** Remove a child node from its parent if attached.\r\n *\t@param {Element} node\t\tThe node to remove\r\n */\r\nexport function removeNode(node) {\r\n\tlet parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\n\r\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\r\n *\tIf `value` is `null`, the attribute/handler will be removed.\r\n *\t@param {Element} node\tAn element to mutate\r\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\r\n *\t@param {any} old\tThe last value that was set for this name/node pair\r\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\r\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\r\n *\t@private\r\n */\r\nexport function setAccessor(node, name, old, value, isSvg) {\r\n\tif (name==='className') name = 'class';\r\n\r\n\r\n\tif (name==='key') {\r\n\t\t// ignore\r\n\t}\r\n\telse if (name==='ref') {\r\n\t\tif (old) old(null);\r\n\t\tif (value) value(node);\r\n\t}\r\n\telse if (name==='class' && !isSvg) {\r\n\t\tnode.className = value || '';\r\n\t}\r\n\telse if (name==='style') {\r\n\t\tif (isH5) {\r\n\t\t\tif (!value || typeof value==='string' || typeof old==='string') {\r\n\t\t\t\tnode.style.cssText = value || '';\r\n\t\t\t}\r\n\t\t\tif (value && typeof value==='object') {\r\n\t\t\t\tif (typeof old!=='string') {\r\n\t\t\t\t\tfor (let i in old) if (!(i in value)) node.style[i] = '';\r\n\t\t\t\t}\r\n\t\t\t\tfor (let i in value) {\r\n\t\t\t\t\tnode.style[i] = typeof value[i]==='number' && IS_NON_DIMENSIONAL.test(i)===false ? (value[i]+'px') : value[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet oldJson = old,\r\n\t\t\t\tcurrentJson = value;\r\n\t\t\tif (typeof old === 'string') {\r\n\t\t\t\toldJson = parseCSSText(old);\r\n\t\t\t}\r\n\t\t\tif (typeof value == 'string') {\r\n\t\t\t\tcurrentJson = parseCSSText(value);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlet result = {},\r\n\t\t\t\tchanged = false;\r\n\t\t\r\n\t\t\tif (oldJson) {\r\n\t\t\t\tfor (let key in oldJson) {\r\n\t\t\t\t\tif (typeof currentJson == 'object' && !(key in currentJson)) {\r\n\t\t\t\t\t\tresult[key] = '';\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tfor (let ckey in currentJson) {\r\n\t\t\t\t\tif (currentJson[ckey] !== oldJson[ckey]) {\r\n\t\t\t\t\t\tresult[ckey] = currentJson[ckey];\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tif (changed) {\r\n\t\t\t\t\tnode.setStyles(result);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnode.setStyles(currentJson);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse if (name==='dangerouslySetInnerHTML') {\r\n\t\tif (value) node.innerHTML = value.__html || '';\r\n\t}\r\n\telse if (name[0]=='o' && name[1]=='n') {\r\n\t\tlet useCapture = name !== (name=name.replace(/Capture$/, ''));\r\n\t\tname = name.toLowerCase().substring(2);\r\n\t\tif (value) {\r\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\r\n\t}\r\n\telse if (name!=='list' && name!=='type' && !isSvg && name in node) {\r\n\t\tsetProperty(node, name, value==null ? '' : value);\r\n\t\tif (value==null || value===false) node.removeAttribute(name);\r\n\t}\r\n\telse {\r\n\t\tlet ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));\r\n\t\tif (value==null || value===false) {\r\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());\r\n\t\t\telse node.removeAttribute(name);\r\n\t\t}\r\n\t\telse if (typeof value!=='function') {\r\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\r\n\t\t\telse node.setAttribute(name, value);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/** Attempt to set a DOM property to the given value.\r\n *\tIE & FF throw for certain property-value combinations.\r\n */\r\nfunction setProperty(node, name, value) {\r\n\ttry {\r\n\t\tnode[name] = value;\r\n\t} catch (e) { }\r\n}\r\n\r\n\r\n/** Proxy an event to hooked event handlers\r\n *\t@private\r\n */\r\nfunction eventProxy(e) {\r\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\r\n}\r\n","import { ATTR_KEY } from '../constants';\r\nimport { isSameNodeType, isNamedNode } from './index';\r\nimport { buildComponentFromVNode } from './component';\r\nimport { createNode, setAccessor } from '../dom/index';\r\nimport { unmountComponent } from './component';\r\nimport options from '../options';\r\nimport { removeNode } from '../dom/index';\r\n\r\n/** Queue of components that have been mounted and are awaiting componentDidMount */\r\nexport const mounts = [];\r\n\r\n/** Diff recursion count, used to track the end of the diff cycle. */\r\nexport let diffLevel = 0;\r\n\r\n/** Global flag indicating if the diff is currently within an SVG */\r\nlet isSvgMode = false;\r\n\r\n/** Global flag indicating if the diff is performing hydration */\r\nlet hydrating = false;\r\n\r\n/** Invoke queued componentDidMount lifecycle methods */\r\nexport function flushMounts() {\r\n\tlet c;\r\n\twhile ((c=mounts.pop())) {\r\n\t\tif (options.afterMount) options.afterMount(c);\r\n\t\tif (c.componentDidMount) c.componentDidMount();\r\n\t\tif (c.installed) c.installed();\r\n\t}\r\n}\r\n\r\n\r\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\r\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\r\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\r\n *\t@returns {Element} dom\t\t\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function diff(dom, vnode, context, mountAll, parent, componentRoot) {\r\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\r\n\tif (!diffLevel++) {\r\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\r\n\t\tisSvgMode = parent!=null && parent.ownerSVGElement!==undefined;\r\n\r\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\r\n\t\thydrating = dom!=null && !(ATTR_KEY in dom);\r\n\t}\r\n\r\n\tlet ret = idiff(dom, vnode, context, mountAll, componentRoot);\r\n\r\n\t// append the element if its a new parent\r\n\tif (parent && ret.parentNode!==parent) parent.appendChild(ret);\r\n\r\n\t// diffLevel being reduced to 0 means we're exiting the diff\r\n\tif (!--diffLevel) {\r\n\t\thydrating = false;\r\n\t\t// invoke queued componentDidMount lifecycle methods\r\n\t\tif (!componentRoot) flushMounts();\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\r\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\r\n\tlet out = dom,\r\n\t\tprevSvgMode = isSvgMode;\r\n\r\n\t// empty values (null, undefined, booleans) render as empty Text nodes\r\n\tif (vnode==null || typeof vnode==='boolean') vnode = '';\r\n\r\n\r\n\t// Fast case: Strings & Numbers create/update Text nodes.\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\r\n\t\t// update if it's already a Text node:\r\n\t\tif (dom && dom.splitText!==undefined && dom.parentNode && (!dom._component || componentRoot)) {\r\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\r\n\t\t\tif (dom.nodeValue!=vnode) {\r\n\t\t\t\tdom.nodeValue = vnode;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\r\n\t\t\tout = document.createTextNode(vnode);\r\n\t\t\tif (dom) {\r\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\t\t\t\trecollectNodeTree(dom, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout[ATTR_KEY] = true;\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\r\n\t// If the VNode represents a Component, perform a component diff:\r\n\tlet vnodeName = vnode.nodeName;\r\n\tif (typeof vnodeName==='function') {\r\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\r\n\t}\r\n\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tisSvgMode = vnodeName==='svg' ? true : vnodeName==='foreignObject' ? false : isSvgMode;\r\n\r\n\r\n\t// If there's no existing element or it's the wrong type, create a new one:\r\n\tvnodeName = String(vnodeName);\r\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\r\n\t\tout = createNode(vnodeName, isSvgMode);\r\n\r\n\t\tif (dom) {\r\n\t\t\t// move children into the replacement node\r\n\t\t\twhile (dom.firstChild) out.appendChild(dom.firstChild);\r\n\r\n\t\t\t// if the previous Element was mounted into the DOM, replace it inline\r\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\r\n\t\t\t// recycle the old element (skips non-Element node types)\r\n\t\t\trecollectNodeTree(dom, true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tlet fc = out.firstChild,\r\n\t\tprops = out[ATTR_KEY],\r\n\t\tvchildren = vnode.children;\r\n\r\n\tif (props==null) {\r\n\t\tprops = out[ATTR_KEY] = {};\r\n\t\tfor (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;\r\n\t}\r\n\r\n\t// Optimization: fast-path for elements containing a single TextNode:\r\n\tif (!hydrating && vchildren && vchildren.length===1 && typeof vchildren[0]==='string' && fc!=null && fc.splitText!==undefined && fc.nextSibling==null) {\r\n\t\tif (fc.nodeValue!=vchildren[0]) {\r\n\t\t\tfc.nodeValue = vchildren[0];\r\n\t\t}\r\n\t}\r\n\t// otherwise, if there are existing or new children, diff them:\r\n\telse if (vchildren && vchildren.length || fc!=null) {\r\n\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML!=null);\r\n\t}\r\n\r\n\r\n\t// Apply attributes/props from VNode to the DOM Element:\r\n\tdiffAttributes(out, vnode.attributes, props);\r\n\r\n\r\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\r\n\tisSvgMode = prevSvgMode;\r\n\r\n\treturn out;\r\n}\r\n\r\n\r\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\r\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\r\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\r\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\r\n *\t@param {Boolean} mountAll\r\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\r\n */\r\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\r\n\tlet originalChildren = dom.childNodes,\r\n\t\tchildren = [],\r\n\t\tkeyed = {},\r\n\t\tkeyedLen = 0,\r\n\t\tmin = 0,\r\n\t\tlen = originalChildren.length,\r\n\t\tchildrenLen = 0,\r\n\t\tvlen = vchildren ? vchildren.length : 0,\r\n\t\tj, c, f, vchild, child;\r\n\r\n\t// Build up a map of keyed children and an Array of unkeyed children:\r\n\tif (len!==0) {\r\n\t\tfor (let i=0; i {\r\n\t\tif (typeof g2 === 'undefined') {\r\n\t\t\tg2 = '';\r\n\t\t}\r\n\r\n\t\t/* eslint-ignore-next-line */\r\n\t\tif (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\r\n\t\t\treturn g1 + g2 + g3;\r\n\t\t}\r\n\r\n\t\tlet appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\r\n\t\tlet prependClass = prefix + ' ' + g1.trim() + g2;\r\n\t\treturn appendClass + ',' + prependClass + g3;\r\n\t});\r\n\r\n\treturn css;\r\n}\r\n\r\nexport function addStyle(cssText, id) {\r\n\tid = id.toLowerCase();\r\n\tlet ele = document.getElementById(id);\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tif (ele && ele.parentNode === head) {\r\n\t\thead.removeChild(ele);\r\n\t}\r\n\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\tsomeThingStyles.setAttribute('id', id);\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nexport function addStyleWithoutId(cssText) {\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\n\r\nexport function addScopedAttr(vdom, style, attr, component) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tstyle = scoper(style, attr);\r\n\t\tif (style !== component._preStyle) {\r\n\t\t\taddStyle(style, attr);\r\n\t\t}\r\n\t} else if (style !== component._preStyle) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n\tcomponent._preStyle = style;\r\n}\r\n\r\nexport function addScopedAttrStatic(vdom, style, attr) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tif (!options.staticStyleRendered) {\r\n\t\t\taddStyle(scoper(style, attr), attr);\r\n\t\t}\r\n\t} else if (!options.staticStyleRendered) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n}\r\n\r\nexport function scopeVdom(attr,vdom){\r\n\tif (typeof vdom!== 'string'){\r\n\t\tvdom.attributes = vdom.attributes||{};\r\n\t\tvdom.attributes[attr] = '';\r\n\t\tvdom.children.forEach(child=>scopeVdom(attr,child));\r\n\t}\r\n}","import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';\r\nimport options from '../options';\r\nimport { extend } from '../util';\r\nimport { enqueueRender } from '../render-queue';\r\nimport { getNodeProps } from './index';\r\nimport { diff, mounts, diffLevel, flushMounts, recollectNodeTree, removeChildren } from './diff';\r\nimport { createComponent, collectComponent } from './component-recycler';\r\nimport { removeNode } from '../dom/index';\r\nimport {addScopedAttr, addScopedAttrStatic} from '../style';\r\n\r\n/** Set a component's `props` (generally derived from JSX attributes).\r\n *\t@param {Object} props\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\r\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\r\n */\r\nexport function setComponentProps(component, props, opts, context, mountAll) {\r\n\tif (component._disable) return;\r\n\tcomponent._disable = true;\r\n\r\n\tif ((component.__ref = props.ref)) delete props.ref;\r\n\tif ((component.__key = props.key)) delete props.key;\r\n\r\n\tif (!component.base || mountAll) {\r\n\t\tif (component.componentWillMount) component.componentWillMount();\r\n\t\tif (component.install) component.install();\r\n\t}\r\n\telse if (component.componentWillReceiveProps) {\r\n\t\tcomponent.componentWillReceiveProps(props, context);\r\n\t}\r\n\r\n\tif (context && context!==component.context) {\r\n\t\tif (!component.prevContext) component.prevContext = component.context;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tif (!component.prevProps) component.prevProps = component.props;\r\n\tcomponent.props = props;\r\n\r\n\tcomponent._disable = false;\r\n\r\n\tif (opts!==NO_RENDER) {\r\n\t\tif (opts===SYNC_RENDER || options.syncComponentUpdates!==false || !component.base) {\r\n\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tenqueueRender(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(component);\r\n}\r\n\r\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\r\n *\t@param {Component} component\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\r\n *\t@private\r\n */\r\nexport function renderComponent(component, opts, mountAll, isChild) {\r\n\tif (component._disable) return;\r\n\r\n\tlet props = component.props,\r\n\t\tstate = component.state,\r\n\t\tcontext = component.context,\r\n\t\tpreviousProps = component.prevProps || props,\r\n\t\tpreviousState = component.prevState || state,\r\n\t\tpreviousContext = component.prevContext || context,\r\n\t\tisUpdate = component.base,\r\n\t\tnextBase = component.nextBase,\r\n\t\tinitialBase = isUpdate || nextBase,\r\n\t\tinitialChildComponent = component._component,\r\n\t\tskip = false,\r\n\t\trendered, inst, cbase;\r\n\r\n\t// if updating\r\n\tif (isUpdate) {\r\n\t\tcomponent.props = previousProps;\r\n\t\tcomponent.state = previousState;\r\n\t\tcomponent.context = previousContext;\r\n\t\tif (opts!==FORCE_RENDER\r\n\t\t\t&& component.shouldComponentUpdate\r\n\t\t\t&& component.shouldComponentUpdate(props, state, context) === false) {\r\n\t\t\tskip = true;\r\n\t\t}\r\n\t\telse if (component.componentWillUpdate) {\r\n\t\t\tcomponent.componentWillUpdate(props, state, context);\r\n\t\t}\r\n\t\telse if (component.beforeUpdate) {\r\n\t\t\tcomponent.beforeUpdate(props, state, context);\r\n\t\t}\r\n\t\tcomponent.props = props;\r\n\t\tcomponent.state = state;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\r\n\tcomponent._dirty = false;\r\n\r\n\tif (!skip) {\r\n\t\trendered = component.render(props, state, context);\r\n\t\r\n\t\tif (component.style){\r\n\t\t\taddScopedAttr(rendered,component.style(),'_style_'+component._id,component);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (component.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,component.staticStyle(),'_style_'+component.constructor.name);\r\n\t\t}\r\n\r\n\t\t// context to pass to the child, can be updated via (grand-)parent component\r\n\t\tif (component.getChildContext) {\r\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\r\n\t\t}\r\n\r\n\t\tlet childComponent = rendered && rendered.nodeName,\r\n\t\t\ttoUnmount, base;\r\n\r\n\t\tif (typeof childComponent==='function') {\r\n\t\t\t// set up high order component link\r\n\r\n\t\t\tlet childProps = getNodeProps(rendered);\r\n\t\t\tinst = initialChildComponent;\r\n\r\n\t\t\tif (inst && inst.constructor===childComponent && childProps.key==inst.__key) {\r\n\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttoUnmount = inst;\r\n\r\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\r\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\r\n\t\t\t\tinst._parentComponent = component;\r\n\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\r\n\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\r\n\t\t\t}\r\n\r\n\t\t\tbase = inst.base;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcbase = initialBase;\r\n\r\n\t\t\t// destroy high order component link\r\n\t\t\ttoUnmount = initialChildComponent;\r\n\t\t\tif (toUnmount) {\r\n\t\t\t\tcbase = component._component = null;\r\n\t\t\t}\r\n\r\n\t\t\tif (initialBase || opts===SYNC_RENDER) {\r\n\t\t\t\tif (cbase) cbase._component = null;\r\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (initialBase && base!==initialBase && inst!==initialChildComponent) {\r\n\t\t\tlet baseParent = initialBase.parentNode;\r\n\t\t\tif (baseParent && base!==baseParent) {\r\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\r\n\r\n\t\t\t\tif (!toUnmount) {\r\n\t\t\t\t\tinitialBase._component = null;\r\n\t\t\t\t\trecollectNodeTree(initialBase, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (toUnmount) {\r\n\t\t\tunmountComponent(toUnmount);\r\n\t\t}\r\n\r\n\t\tcomponent.base = base;\r\n\t\tif (base && !isChild) {\r\n\t\t\tlet componentRef = component,\r\n\t\t\t\tt = component;\r\n\t\t\twhile ((t=t._parentComponent)) {\r\n\t\t\t\t(componentRef = t).base = base;\r\n\t\t\t}\r\n\t\t\tbase._component = componentRef;\r\n\t\t\tbase._componentConstructor = componentRef.constructor;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!isUpdate || mountAll) {\r\n\t\tmounts.unshift(component);\r\n\t}\r\n\telse if (!skip) {\r\n\t\t// Ensure that pending componentDidMount() hooks of child components\r\n\t\t// are called before the componentDidUpdate() hook in the parent.\r\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\r\n\t\t// flushMounts();\r\n\r\n\t\tif (component.componentDidUpdate) {\r\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (component.afterUpdate) {\r\n\t\t\tcomponent.afterUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (options.afterUpdate) options.afterUpdate(component);\r\n\t}\r\n\r\n\tif (component._renderCallbacks!=null) {\r\n\t\twhile (component._renderCallbacks.length) component._renderCallbacks.pop().call(component);\r\n\t}\r\n\r\n\tif (!diffLevel && !isChild) flushMounts();\r\n}\r\n\r\n\r\n\r\n/** Apply the Component referenced by a VNode to the DOM.\r\n *\t@param {Element} dom\tThe DOM node to mutate\r\n *\t@param {VNode} vnode\tA Component-referencing VNode\r\n *\t@returns {Element} dom\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function buildComponentFromVNode(dom, vnode, context, mountAll) {\r\n\tlet c = dom && dom._component,\r\n\t\toriginalComponent = c,\r\n\t\toldDom = dom,\r\n\t\tisDirectOwner = c && dom._componentConstructor===vnode.nodeName,\r\n\t\tisOwner = isDirectOwner,\r\n\t\tprops = getNodeProps(vnode);\r\n\twhile (c && !isOwner && (c=c._parentComponent)) {\r\n\t\tisOwner = c.constructor===vnode.nodeName;\r\n\t}\r\n\r\n\tif (c && isOwner && (!mountAll || c._component)) {\r\n\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\t}\r\n\telse {\r\n\t\tif (originalComponent && !isDirectOwner) {\r\n\t\t\tunmountComponent(originalComponent);\r\n\t\t\tdom = oldDom = null;\r\n\t\t}\r\n\r\n\t\tc = createComponent(vnode.nodeName, props, context);\r\n\t\tif (dom && !c.nextBase) {\r\n\t\t\tc.nextBase = dom;\r\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\r\n\t\t\toldDom = null;\r\n\t\t}\r\n\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\r\n\t\tif (oldDom && dom!==oldDom) {\r\n\t\t\toldDom._component = null;\r\n\t\t\trecollectNodeTree(oldDom, false);\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n\r\n\r\n/** Remove a component from the DOM and recycle it.\r\n *\t@param {Component} component\tThe Component instance to unmount\r\n *\t@private\r\n */\r\nexport function unmountComponent(component) {\r\n\tif (options.beforeUnmount) options.beforeUnmount(component);\r\n\r\n\tlet base = component.base;\r\n\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.componentWillUnmount) component.componentWillUnmount();\r\n\tif (component.uninstall) component.uninstall();\r\n\t\r\n\tcomponent.base = null;\r\n\r\n\t// recursively tear down & recollect high-order component children:\r\n\tlet inner = component._component;\r\n\tif (inner) {\r\n\t\tunmountComponent(inner);\r\n\t}\r\n\telse if (base) {\r\n\t\tif (base[ATTR_KEY] && base[ATTR_KEY].ref) base[ATTR_KEY].ref(null);\r\n\r\n\t\tcomponent.nextBase = base;\r\n\r\n\t\tremoveNode(base);\r\n\t\tcollectComponent(component);\r\n\r\n\t\tremoveChildren(base);\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(null);\r\n}\r\n","import { FORCE_RENDER } from './constants';\r\nimport { extend } from './util';\r\nimport { renderComponent } from './vdom/component';\r\nimport { enqueueRender } from './render-queue';\r\nimport options from './options';\r\n\r\nlet id = 0;\r\nfunction getId(){\r\n\treturn id++;\r\n}\r\n/** Base Component class.\r\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\r\n *\t@public\r\n *\r\n *\t@example\r\n *\tclass MyFoo extends Component {\r\n *\t\trender(props, state) {\r\n *\t\t\treturn ;\r\n *\t\t}\r\n *\t}\r\n */\r\nexport function Component(props, context) {\r\n\tthis._dirty = true;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.context = context;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.props = props;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.state = this.state || {};\r\n\r\n\tthis._id = getId();\r\n\r\n\tthis._preStyle = null;\r\n\r\n\tthis.$store = null;\r\n\r\n}\r\n\r\n\r\nextend(Component.prototype, {\r\n\r\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\r\n\t *\t@param {object} nextProps\r\n\t *\t@param {object} nextState\r\n\t *\t@param {object} nextContext\r\n\t *\t@returns {Boolean} should the component re-render\r\n\t *\t@name shouldComponentUpdate\r\n\t *\t@function\r\n\t */\r\n\r\n\r\n\t/** Update component state by copying properties from `state` to `this.state`.\r\n\t *\t@param {object} state\t\tA hash of state properties to update with new values\r\n\t *\t@param {function} callback\tA function to be called once component state is updated\r\n\t */\r\n\tsetState(state, callback) {\r\n\t\tlet s = this.state;\r\n\t\tif (!this.prevState) this.prevState = extend({}, s);\r\n\t\textend(s, typeof state==='function' ? state(s, this.props) : state);\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\tenqueueRender(this);\r\n\t},\r\n\r\n\r\n\t/** Immediately perform a synchronous re-render of the component.\r\n\t *\t@param {function} callback\t\tA function to be called after component is re-rendered.\r\n\t *\t@private\r\n\t */\r\n\tforceUpdate(callback) {\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\trenderComponent(this, FORCE_RENDER);\r\n\t\tif (options.componentChange) options.componentChange(this, this.base);\r\n\t},\r\n\r\n\tupdate(callback){\r\n\t\tthis.forceUpdate(callback);\r\n\t},\r\n\r\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n\t *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n\t *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\r\n\t *\t@param {object} state\t\tThe component's current state\r\n\t *\t@param {object} context\t\tContext object (if a parent component has provided context)\r\n\t *\t@returns VNode\r\n\t */\r\n\trender() {}\r\n\r\n});\r\n","import { diff } from './vdom/diff';\r\nimport { Component } from './component';\r\nimport options from './options';\r\nimport {addScopedAttr, addScopedAttrStatic} from './style';\r\n\r\nfunction isElement(obj) {\r\n\ttry {\r\n\t //Using W3 DOM2 (works for FF, Opera and Chrome)\r\n\t return obj instanceof HTMLElement;\r\n\t}\r\n\tcatch (e){\r\n\t //Browsers not supporting W3 DOM2 don't have HTMLElement and\r\n\t //an exception is thrown and we end up here. Testing some\r\n\t //properties that all elements have (works on IE7)\r\n\t return (typeof obj===\"object\") &&\r\n\t\t(obj.nodeType===1) && (typeof obj.style === \"object\") &&\r\n\t\t(typeof obj.ownerDocument ===\"object\");\r\n\t}\r\n}\r\n\r\n/** Render JSX into a `parent` Element.\r\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\r\n *\t@param {Element} parent\t\tDOM element to render into\r\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\r\n *\t@public\r\n *\r\n *\t@example\r\n *\t// render a div into :\r\n *\trender(hello!
, document.body);\r\n *\r\n *\t@example\r\n *\t// render a \"Thing\" component into #foo:\r\n *\tconst Thing = ({ name }) => { name };\r\n *\trender(, document.querySelector('#foo'));\r\n */\r\nexport function render(vnode, parent, merge) {\r\n\toptions.staticStyleRendered = false;\r\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent;\r\n\tif (merge === true){\r\n\t\twhile (parent.firstChild){\r\n\t\t\tparent.removeChild(parent.firstChild);\r\n\t\t}\r\n\t}\r\n\tconst m = isElement(merge) || merge === undefined;\r\n\tif (vnode instanceof Component) {\r\n\t\tif (window && window.Omi){\r\n\t\t\twindow.Omi.instances.push(vnode);\r\n\t\t}\r\n\t\tif (!m){\r\n\t\t\tvnode.$store = options.$store = merge;\r\n\t\t}\r\n\t\tif (vnode.componentWillMount) vnode.componentWillMount();\r\n\t\tif (vnode.install) vnode.install();\r\n\t\tconst rendered = vnode.render();\r\n\t\tif (vnode.style){\r\n\t\t\taddScopedAttr(rendered,vnode.style(),'_style_'+vnode._id,vnode);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (vnode.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,vnode.staticStyle(),'_style_'+vnode.constructor.name, !vnode.base);\r\n\t\t}\r\n\r\n\t\tvnode.base = diff(m ? merge : undefined, rendered, {}, false, parent, false);\r\n\t\t\r\n\t\tif (vnode.componentDidMount) vnode.componentDidMount();\r\n\t\tif (vnode.installed) vnode.installed();\r\n\t\toptions.staticStyleRendered = true;\r\n\t\treturn vnode.base;\r\n\t}\r\n\t\r\n\tlet result = diff(merge, vnode, {}, false, parent, false);\r\n\toptions.staticStyleRendered = true;\r\n\treturn result;\r\n}\r\n","import { h, h as createElement } from './h';\r\nimport { cloneElement } from './clone-element';\r\nimport { Component } from './component';\r\nimport { render } from './render';\r\nimport { rerender } from './render-queue';\r\nimport options from './options';\r\n\r\nfunction getGlobal() {\r\n\tif (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\r\n\t\tif (typeof self !== 'undefined') {\r\n\t\t\treturn self;\r\n\t\t} else if (typeof window !== 'undefined') {\r\n\t\t\treturn window;\r\n\t\t} else if (typeof global !== 'undefined') {\r\n\t\t\treturn global;\r\n\t\t}\r\n\t\treturn (function(){\r\n\t\t\treturn this;\r\n\t\t})();\r\n\t\t\r\n\t}\r\n\treturn global;\r\n}\r\n\r\nconst instances = [];\r\nconst root = getGlobal();\r\nroot.Omi = {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nroot.Omi.version = '3.0.0';\r\n\r\nexport default {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nexport {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n"],"names":["VNode","document","stack","EMPTY_CHILDREN","isH5","options","isWeb","map","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","value","key","vnode","extend","obj","props","usePromise","Promise","global","__config__","platform","systemVersion","split","defer","resolve","then","bind","setTimeout","cloneElement","slice","call","NO_RENDER","SYNC_RENDER","FORCE_RENDER","ASYNC_RENDER","ATTR_KEY","IS_NON_DIMENSIONAL","items","enqueueRender","component","_dirty","debounceRendering","rerender","list","element","base","renderComponent","componentChange","isSameNodeType","node","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","toLowerCase","getNodeProps","defaultProps","createNode","isSvg","doc","createElementNS","createElement","parseCSSText","cssText","cssTxt","replace","match","a","b","rule","cssToJs","s","toUpperCase","properties","o","x","trim","property","style","removeNode","parentNode","removeChild","setAccessor","name","old","className","test","oldJson","currentJson","result","changed","ckey","setStyles","innerHTML","__html","useCapture","substring","addEventListener","eventProxy","removeEventListener","_listeners","removeAttribute","ns","removeAttributeNS","setAttributeNS","setAttribute","setProperty","e","type","event","mounts","diffLevel","isSvgMode","flushMounts","c","afterMount","componentDidMount","installed","diff","dom","context","mountAll","parent","componentRoot","ownerSVGElement","ret","idiff","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","buildComponentFromVNode","firstChild","fc","vchildren","nextSibling","dangerouslySetInnerHTML","innerDiffNode","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","len","childrenLen","vlen","j","f","vchild","__key","insertBefore","recollectNodeTree","unmountOnly","ref","removeChildren","lastChild","next","previousSibling","diffAttributes","attrs","components","collectComponent","constructor","createComponent","Ctor","inst","prototype","render","Component","doRender","$store","window","Omi","instances","nextBase","splice","state","scoper","css","prefix","re","RegExp","g0","g1","g2","g3","appendClass","prependClass","addStyle","id","ele","getElementById","head","getElementsByTagName","someThingStyles","ActiveXObject","styleSheet","textContent","addStyleWithoutId","addScopedAttr","vdom","attr","scopedStyle","_preStyle","addScopedAttrStatic","staticStyleRendered","scopeVdom","forEach","setComponentProps","opts","_disable","__ref","componentWillMount","install","componentWillReceiveProps","prevContext","prevProps","syncComponentUpdates","isChild","previousProps","previousState","prevState","previousContext","isUpdate","initialBase","initialChildComponent","skip","rendered","cbase","shouldComponentUpdate","componentWillUpdate","beforeUpdate","_id","staticStyle","getChildContext","childComponent","toUnmount","childProps","_parentComponent","baseParent","componentRef","t","unshift","componentDidUpdate","afterUpdate","_renderCallbacks","originalComponent","oldDom","isDirectOwner","isOwner","unmountComponent","beforeUnmount","componentWillUnmount","uninstall","inner","getId","callback","forceUpdate","isElement","HTMLElement","nodeType","ownerDocument","merge","querySelector","m","getGlobal","Math","Array","self","root","version"],"mappings":";;;;;;;;AAAA;AACA,SAAgBA,KAAT,GAAiB;;ACDxB;;;;AAIA,cAAe;;cAED,IAFC;SAGN,IAHM;QAIP,IAJO;sBAKO,KALP;MAMT,OAAOC,QAAP,KAAoB,QAApB,GAA+BA,QAA/B,GAA0C;;;;;;;;;;;;;;;;;;;;;;CANhD;;ICAMC,QAAQ,EAAd;;AAEA,IAAMC,iBAAiB,EAAvB;;AAEA,IAAMC,OAAOC,QAAQC,KAArB;;AAEA,IAAMC,MAAM;OACL,MADK;OAEL,MAFK;;MAIN,MAJM;OAKL,MALK;OAML,MANK;OAOL,MAPK;OAQL,MARK;OASL,MATK;OAUL,MAVK;SAWH,MAXG;YAYA,MAZA;MAaN,MAbM;QAcJ,MAdI;QAeJ,MAfI;eAgBG,MAhBH;SAiBH,MAjBG;SAkBH,MAlBG;QAmBJ,MAnBI;QAoBJ,MApBI;QAqBJ,MArBI;OAsBL,MAtBK;WAuBD,MAvBC;SAwBH,MAxBG;QAyBJ,MAzBI;QA0BJ,MA1BI;MA2BN,MA3BM;SA4BH,MA5BG;QA6BJ,MA7BI;MA8BN,MA9BM;SA+BH,MA/BG;OAgCL,MAhCK;OAiCL,MAjCK;MAkCN,MAlCM;UAmCF,MAnCE;QAoCJ,MApCI;QAqCJ,MArCI;SAsCH,MAtCG;MAuCN,MAvCM;QAwCJ,MAxCI;;SA0CH,MA1CG;UA2CF,OA3CE;aA4CC,UA5CD;WA6CD,QA7CC;WA8CD,QA9CC;WA+CD,MA/CC;aAgDC,MAhDD;UAiDF,OAjDE;aAkDC,MAlDD;aAmDC,QAnDD;WAoDD,MApDC;WAqDD,MArDC;;WAuDD,MAvDC;;QAy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;AAGD,IAAMiK,YAAY,EAAlB;AACA,IAAMgG,OAAOJ,WAAb;AACAI,KAAKjG,GAAL,GAAW;KAAA;iBAAA;2BAAA;qBAAA;eAAA;mBAAA;iBAAA;;CAAX;;AAWAiG,KAAKjG,GAAL,CAASkG,OAAT,GAAmB,OAAnB;;AAEA,UAAe;KAAA;iBAAA;2BAAA;qBAAA;eAAA;mBAAA;iBAAA;;CAAf;;;"}
\ No newline at end of file
+{"version":3,"file":"omi.esm.js","sources":["../src/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/clone-element.js","../src/constants.js","../src/render-queue.js","../src/vdom/index.js","../src/dom/index.js","../src/vdom/diff.js","../src/vdom/component-recycler.js","../src/style.js","../src/vdom/component.js","../src/component.js","../src/render.js","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\r\nexport function VNode() {}\r\n","/** Global options\r\n *\t@public\r\n *\t@namespace options {Object}\r\n */\r\nexport default {\r\n\r\n\tscopedStyle: true,\r\n\t$store: null,\r\n\tisWeb: true,\r\n\tstaticStyleRendered: false,\r\n\tdoc: typeof document === 'object' ? document : null\r\n\t//componentChange(component, element) { },\r\n\t/** If `true`, `prop` changes trigger synchronous component updates.\r\n\t *\t@name syncComponentUpdates\r\n\t *\t@type Boolean\r\n\t *\t@default true\r\n\t */\r\n\t//syncComponentUpdates: true,\r\n\r\n\t/** Processes all created VNodes.\r\n\t *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\r\n\t */\r\n\t//vnode(vnode) { }\r\n\r\n\t/** Hook invoked after a component is mounted. */\r\n\t//afterMount(component) { },\r\n\r\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\r\n\t//afterUpdate(component) { }\r\n\r\n\t/** Hook invoked immediately before a component is unmounted. */\r\n\t// beforeUnmount(component) { }\r\n};\r\n","import { VNode } from './vnode';\r\nimport options from './options';\r\n\r\n\r\nconst stack = [];\r\n\r\nconst EMPTY_CHILDREN = [];\r\n\r\nconst map = {\r\n\t'br': 'view',\r\n\t'hr': 'view',\r\n\r\n\t'p': 'view',\r\n\t'h1': 'view',\r\n\t'h2': 'view',\r\n\t'h3': 'view',\r\n\t'h4': 'view',\r\n\t'h5': 'view',\r\n\t'h6': 'view',\r\n\t'abbr': 'view',\r\n\t'address': 'view',\r\n\t'b': 'view',\r\n\t'bdi': 'view',\r\n\t'bdo': 'view',\r\n\t'blockquote': 'view',\r\n\t'cite': 'view',\r\n\t'code': 'view',\r\n\t'del': 'view',\r\n\t'ins': 'view',\r\n\t'dfn': 'view',\r\n\t'em': 'view',\r\n\t'strong': 'view',\r\n\t'samp': 'view',\r\n\t'kbd': 'view',\r\n\t'var': 'view',\r\n\t'i': 'view',\r\n\t'mark': 'view',\r\n\t'pre': 'view',\r\n\t'q': 'view',\r\n\t'ruby': 'view',\r\n\t'rp': 'view',\r\n\t'rt': 'view',\r\n\t's': 'view',\r\n\t'small': 'view',\r\n\t'sub': 'view',\r\n\t'sup': 'view',\r\n\t'time': 'view',\r\n\t'u': 'view',\r\n\t'wbr': 'view',\r\n\r\n\t'form': 'form',\r\n\t'input': 'input',\r\n\t'textarea': 'textarea',\r\n\t'button': 'button',\r\n\t'select': 'picker',\r\n\t'option': 'view',\r\n\t'optgroup': 'view',\r\n\t'label': 'label',\r\n\t'fieldset': 'view',\r\n\t'datalist': 'picker',\r\n\t'legend': 'view',\r\n\t'output': 'view',\r\n\r\n\t'iframe': 'view',\r\n \r\n\t'img': 'image',\r\n\t'canvas': 'canvas',\r\n\t'figure': 'view',\r\n\t'figcaption': 'view',\r\n\r\n \r\n\t'audio': 'audio',\r\n\t'source': 'audio',\r\n\t'video': 'video',\r\n\t'track': 'video',\r\n \r\n\t'a': 'navigator',\r\n\t'nav': 'view',\r\n\t'link': 'navigator',\r\n\r\n\t'ul': 'view',\r\n\t'ol': 'view',\r\n\t'li': 'view',\r\n\t'dl': 'view',\r\n\t'dt': 'view',\r\n\t'dd': 'view',\r\n\t'menu': 'view',\r\n\t'command': 'view',\r\n\r\n\r\n\t'table': 'view',\r\n\t'caption': 'view',\r\n\t'th': 'view',\r\n\t'td': 'view',\r\n\t'tr': 'view',\r\n\t'thead': 'view',\r\n\t'tbody': 'view',\r\n\t'tfoot': 'view',\r\n\t'col': 'view',\r\n\t'colgroup': 'view',\r\n\r\n\r\n\t'div': 'view',\r\n\t'main': 'view',\r\n\t//'span': 'label',\r\n\t'span': 'text',\r\n\t'header': 'view',\r\n\t'footer': 'view',\r\n\t'section': 'view',\r\n\t'article': 'view',\r\n\t'aside': 'view',\r\n\t'details': 'view',\r\n\t'dialog': 'view',\r\n\t'summary': 'view',\r\n\r\n\t'progress': 'progress',\r\n\t'meter': 'progress',\r\n\t'head': 'view',\r\n\t'meta': 'view',\r\n\t'base': 'text',\r\n\t'map': 'map',\r\n\t'area': 'navigator',\r\n\r\n\t'script': 'view',\r\n\t'noscript': 'view',\r\n\t'embed': 'view',\r\n\t'object': 'view',\r\n\t'param': 'view',\r\n\r\n\t'view': 'view',\r\n\t'scroll-view': 'scroll-view',\r\n\t'swiper': 'swiper',\r\n\t'icon': 'icon',\r\n\t'text': 'text',\r\n\r\n\t\r\n\r\n\r\n\t'checkbox': 'checkbox',\r\n\t'radio': 'radio',\r\n\t'picker': 'picker',\r\n\t'picker-view': 'picker-view',\r\n\t'slider': 'slider',\r\n\t'switch': 'switch',\r\n\t'navigator': 'navigator',\r\n\t\r\n\t'image': 'image',\r\n\t'contact-button': 'contact-button',\r\n\t'block': 'block'\r\n};\r\n\r\n\r\n/**\r\n * JSX/hyperscript reviver.\r\n * @see http://jasonformat.com/wtf-is-jsx\r\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\r\n *\r\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\r\n *\r\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\r\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\r\n * the current _actual_ DOM structure, and applying only the differences.\r\n *\r\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\r\n * and optionally children to append to the element.\r\n *\r\n * @example The following DOM tree\r\n *\r\n * `Hello!
`\r\n *\r\n * can be constructed using this function as:\r\n *\r\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\r\n *\r\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\r\n * @param {Object} attributes\tAny attributes/props to set on the created element.\r\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\r\n *\r\n * @public\r\n */\r\nexport function h(nodeName, attributes) {\r\n\tlet children=EMPTY_CHILDREN, lastSimple, child, simple, i;\r\n\tfor (i=arguments.length; i-- > 2; ) {\r\n\t\tstack.push(arguments[i]);\r\n\t}\r\n\tif (attributes && attributes.children!=null) {\r\n\t\tif (!stack.length) stack.push(attributes.children);\r\n\t\tdelete attributes.children;\r\n\t}\r\n\twhile (stack.length) {\r\n\t\tif ((child = stack.pop()) && child.pop!==undefined) {\r\n\t\t\tfor (i=child.length; i--; ) stack.push(child[i]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (typeof child==='boolean') child = null;\r\n\r\n\t\t\tif ((simple = typeof nodeName!=='function')) {\r\n\t\t\t\tif (child==null) child = '';\r\n\t\t\t\telse if (typeof child==='number') child = String(child);\r\n\t\t\t\telse if (typeof child!=='string') simple = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (simple && lastSimple) {\r\n\t\t\t\tchildren[children.length-1] += child;\r\n\t\t\t}\r\n\t\t\telse if (children===EMPTY_CHILDREN) {\r\n\t\t\t\tchildren = [child];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tchildren.push(child);\r\n\t\t\t}\r\n\r\n\t\t\tlastSimple = simple;\r\n\t\t}\r\n\t}\r\n\r\n\tlet p = new VNode();\r\n\tp.nodeName = options.isWeb?nodeName:map[nodeName];\r\n\tp.attributes = attributes == null ? undefined : attributes;\r\n\tif (children && typeof children[0] === 'string'&& !options.isWeb) {\r\n\t\tif (p.attributes) {\r\n\t\t\tp.attributes.value = children[0];\r\n\t\t} else {\r\n\t\t\tp.attributes = { value: children[0] };\r\n\t\t}\r\n\t} else {\r\n\t\tp.children = children;\r\n\t}\r\n\tp.key = attributes==null ? undefined : attributes.key;\r\n\r\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\r\n\tif (options.vnode!==undefined) options.vnode(p);\r\n\r\n\treturn p;\r\n}\r\n","/**\r\n * Copy all properties from `props` onto `obj`.\r\n * @param {Object} obj\t\tObject onto which properties should be copied.\r\n * @param {Object} props\tObject from which to copy properties.\r\n * @returns obj\r\n * @private\r\n */\r\nexport function extend(obj, props) {\r\n\tfor (let i in props) obj[i] = props[i];\r\n\treturn obj;\r\n}\r\n\r\n/**\r\n * Call a function asynchronously, as soon as possible. Makes\r\n * use of HTML Promise to schedule the callback if available,\r\n * otherwise falling back to `setTimeout` (mainly for IE<11).\r\n *\r\n * @param {Function} callback\r\n */\r\n\r\nlet usePromise = typeof Promise == 'function';\r\n\r\n// for native\r\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\r\n\tif (global.__config__.platform === 'android') {\r\n\t\tusePromise = true;\r\n\t} else {\r\n\t\tlet systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\r\n\t\tif (systemVersion > 8) {\r\n\t\t\tusePromise = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\r\n","import { extend } from './util';\r\nimport { h } from './h';\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\r\n * @param {Object} props\tAttributes/props to add when cloning\r\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\r\n */\r\nexport function cloneElement(vnode, props) {\r\n\treturn h(\r\n\t\tvnode.nodeName,\r\n\t\textend(extend({}, vnode.attributes), props),\r\n\t\targuments.length>2 ? [].slice.call(arguments, 2) : vnode.children\r\n\t);\r\n}\r\n","// render modes\r\n\r\nexport const NO_RENDER = 0;\r\nexport const SYNC_RENDER = 1;\r\nexport const FORCE_RENDER = 2;\r\nexport const ASYNC_RENDER = 3;\r\n\r\n\r\nexport const ATTR_KEY = '__preactattr_';\r\n\r\n// DOM properties that should NOT have \"px\" added when numeric\r\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\r\n\r\n","import options from './options';\r\nimport { defer } from './util';\r\nimport { renderComponent } from './vdom/component';\r\n\r\n/** Managed queue of dirty components to be re-rendered */\r\n\r\nlet items = [];\r\n\r\nexport function enqueueRender(component) {\r\n\tif (!component._dirty && (component._dirty = true) && items.push(component)==1) {\r\n\t\t(options.debounceRendering || defer)(rerender);\r\n\t}\r\n}\r\n\r\nexport function rerender() {\r\n\tlet p, list = items;\r\n\titems = [];\r\n\tlet element;\r\n\twhile ( (p = list.pop()) ) {\r\n\t\telement = p.base;\r\n\t\tif (p._dirty) renderComponent(p);\r\n\t}\r\n\tif (!list.length) {\r\n\t\tif (options.componentChange) options.componentChange(p, element);\r\n\t}\r\n}\r\n","import { extend } from '../util';\r\n\r\n\r\n/**\r\n * Check if two nodes are equivalent.\r\n *\r\n * @param {Node} node\t\t\tDOM Node to compare\r\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\r\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\r\n * @private\r\n */\r\nexport function isSameNodeType(node, vnode, hydrating) {\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\t\treturn node.splitText!==undefined;\r\n\t}\r\n\tif (typeof vnode.nodeName==='string') {\r\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\r\n\t}\r\n\treturn hydrating || node._componentConstructor===vnode.nodeName;\r\n}\r\n\r\n\r\n/**\r\n * Check if an Element has a given nodeName, case-insensitively.\r\n *\r\n * @param {Element} node\tA DOM Element to inspect the name of.\r\n * @param {String} nodeName\tUnnormalized name to compare against.\r\n */\r\nexport function isNamedNode(node, nodeName) {\r\n\treturn node.normalizedNodeName===nodeName || node.nodeName.toLowerCase()===nodeName.toLowerCase();\r\n}\r\n\r\n\r\n/**\r\n * Reconstruct Component-style `props` from a VNode.\r\n * Ensures default/fallback values from `defaultProps`:\r\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\r\n *\r\n * @param {VNode} vnode\r\n * @returns {Object} props\r\n */\r\nexport function getNodeProps(vnode) {\r\n\tlet props = extend({}, vnode.attributes);\r\n\tprops.children = vnode.children;\r\n\r\n\tlet defaultProps = vnode.nodeName.defaultProps;\r\n\tif (defaultProps!==undefined) {\r\n\t\tfor (let i in defaultProps) {\r\n\t\t\tif (props[i]===undefined) {\r\n\t\t\t\tprops[i] = defaultProps[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn props;\r\n}\r\n","import { IS_NON_DIMENSIONAL } from '../constants';\r\nimport options from '../options';\r\n\r\n\r\n/** Create an element with the given nodeName.\r\n *\t@param {String} nodeName\r\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\r\n *\t@returns {Element} node\r\n */\r\nexport function createNode(nodeName, isSvg) {\r\n\tlet node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\r\n\tnode.normalizedNodeName = nodeName;\r\n\treturn node;\r\n}\r\n\r\nfunction parseCSSText(cssText) {\r\n\tlet cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\r\n\tlet style = {}, [a,b,rule] = cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt];\r\n\tlet cssToJs = s => s.replace(/\\W+\\w/g, match => match.slice(-1).toUpperCase());\r\n\tlet properties = rule.split(\";\").map(o => o.split(\":\").map(x => x && x.trim()));\r\n\tfor (let [property, value] of properties) style[cssToJs(property)] = value;\r\n\treturn style;\r\n}\r\n\r\n/** Remove a child node from its parent if attached.\r\n *\t@param {Element} node\t\tThe node to remove\r\n */\r\nexport function removeNode(node) {\r\n\tlet parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\n\r\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\r\n *\tIf `value` is `null`, the attribute/handler will be removed.\r\n *\t@param {Element} node\tAn element to mutate\r\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\r\n *\t@param {any} old\tThe last value that was set for this name/node pair\r\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\r\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\r\n *\t@private\r\n */\r\nexport function setAccessor(node, name, old, value, isSvg) {\r\n\tif (name==='className') name = 'class';\r\n\r\n\r\n\tif (name==='key') {\r\n\t\t// ignore\r\n\t}\r\n\telse if (name==='ref') {\r\n\t\tif (old) old(null);\r\n\t\tif (value) value(node);\r\n\t}\r\n\telse if (name==='class' && !isSvg) {\r\n\t\tnode.className = value || '';\r\n\t}\r\n\telse if (name==='style') {\r\n\t\tif (options.isWeb) {\r\n\t\t\tif (!value || typeof value==='string' || typeof old==='string') {\r\n\t\t\t\tnode.style.cssText = value || '';\r\n\t\t\t}\r\n\t\t\tif (value && typeof value==='object') {\r\n\t\t\t\tif (typeof old!=='string') {\r\n\t\t\t\t\tfor (let i in old) if (!(i in value)) node.style[i] = '';\r\n\t\t\t\t}\r\n\t\t\t\tfor (let i in value) {\r\n\t\t\t\t\tnode.style[i] = typeof value[i]==='number' && IS_NON_DIMENSIONAL.test(i)===false ? (value[i]+'px') : value[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet oldJson = old,\r\n\t\t\t\tcurrentJson = value;\r\n\t\t\tif (typeof old === 'string') {\r\n\t\t\t\toldJson = parseCSSText(old);\r\n\t\t\t}\r\n\t\t\tif (typeof value == 'string') {\r\n\t\t\t\tcurrentJson = parseCSSText(value);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlet result = {},\r\n\t\t\t\tchanged = false;\r\n\t\t\r\n\t\t\tif (oldJson) {\r\n\t\t\t\tfor (let key in oldJson) {\r\n\t\t\t\t\tif (typeof currentJson == 'object' && !(key in currentJson)) {\r\n\t\t\t\t\t\tresult[key] = '';\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tfor (let ckey in currentJson) {\r\n\t\t\t\t\tif (currentJson[ckey] !== oldJson[ckey]) {\r\n\t\t\t\t\t\tresult[ckey] = currentJson[ckey];\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tif (changed) {\r\n\t\t\t\t\tnode.setStyles(result);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnode.setStyles(currentJson);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse if (name==='dangerouslySetInnerHTML') {\r\n\t\tif (value) node.innerHTML = value.__html || '';\r\n\t}\r\n\telse if (name[0]=='o' && name[1]=='n') {\r\n\t\tlet useCapture = name !== (name=name.replace(/Capture$/, ''));\r\n\t\tname = name.toLowerCase().substring(2);\r\n\t\tif (value) {\r\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\r\n\t}\r\n\telse if (name!=='list' && name!=='type' && !isSvg && name in node) {\r\n\t\tsetProperty(node, name, value==null ? '' : value);\r\n\t\tif (value==null || value===false) node.removeAttribute(name);\r\n\t}\r\n\telse {\r\n\t\tlet ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));\r\n\t\tif (value==null || value===false) {\r\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());\r\n\t\t\telse node.removeAttribute(name);\r\n\t\t}\r\n\t\telse if (typeof value!=='function') {\r\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\r\n\t\t\telse node.setAttribute(name, value);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/** Attempt to set a DOM property to the given value.\r\n *\tIE & FF throw for certain property-value combinations.\r\n */\r\nfunction setProperty(node, name, value) {\r\n\ttry {\r\n\t\tnode[name] = value;\r\n\t} catch (e) { }\r\n}\r\n\r\n\r\n/** Proxy an event to hooked event handlers\r\n *\t@private\r\n */\r\nfunction eventProxy(e) {\r\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\r\n}\r\n","import { ATTR_KEY } from '../constants';\r\nimport { isSameNodeType, isNamedNode } from './index';\r\nimport { buildComponentFromVNode } from './component';\r\nimport { createNode, setAccessor } from '../dom/index';\r\nimport { unmountComponent } from './component';\r\nimport options from '../options';\r\nimport { removeNode } from '../dom/index';\r\n\r\n/** Queue of components that have been mounted and are awaiting componentDidMount */\r\nexport const mounts = [];\r\n\r\n/** Diff recursion count, used to track the end of the diff cycle. */\r\nexport let diffLevel = 0;\r\n\r\n/** Global flag indicating if the diff is currently within an SVG */\r\nlet isSvgMode = false;\r\n\r\n/** Global flag indicating if the diff is performing hydration */\r\nlet hydrating = false;\r\n\r\n/** Invoke queued componentDidMount lifecycle methods */\r\nexport function flushMounts() {\r\n\tlet c;\r\n\twhile ((c=mounts.pop())) {\r\n\t\tif (options.afterMount) options.afterMount(c);\r\n\t\tif (c.componentDidMount) c.componentDidMount();\r\n\t\tif (c.installed) c.installed();\r\n\t}\r\n}\r\n\r\n\r\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\r\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\r\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\r\n *\t@returns {Element} dom\t\t\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function diff(dom, vnode, context, mountAll, parent, componentRoot) {\r\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\r\n\tif (!diffLevel++) {\r\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\r\n\t\tisSvgMode = parent!=null && parent.ownerSVGElement!==undefined;\r\n\r\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\r\n\t\thydrating = dom!=null && !(ATTR_KEY in dom);\r\n\t}\r\n\r\n\tlet ret = idiff(dom, vnode, context, mountAll, componentRoot);\r\n\r\n\t// append the element if its a new parent\r\n\tif (parent && ret.parentNode!==parent) parent.appendChild(ret);\r\n\r\n\t// diffLevel being reduced to 0 means we're exiting the diff\r\n\tif (!--diffLevel) {\r\n\t\thydrating = false;\r\n\t\t// invoke queued componentDidMount lifecycle methods\r\n\t\tif (!componentRoot) flushMounts();\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\r\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\r\n\tlet out = dom,\r\n\t\tprevSvgMode = isSvgMode;\r\n\r\n\t// empty values (null, undefined, booleans) render as empty Text nodes\r\n\tif (vnode==null || typeof vnode==='boolean') vnode = '';\r\n\r\n\r\n\t// Fast case: Strings & Numbers create/update Text nodes.\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\r\n\t\t// update if it's already a Text node:\r\n\t\tif (dom && dom.splitText!==undefined && dom.parentNode && (!dom._component || componentRoot)) {\r\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\r\n\t\t\tif (dom.nodeValue!=vnode) {\r\n\t\t\t\tdom.nodeValue = vnode;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\r\n\t\t\tout = document.createTextNode(vnode);\r\n\t\t\tif (dom) {\r\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\t\t\t\trecollectNodeTree(dom, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout[ATTR_KEY] = true;\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\r\n\t// If the VNode represents a Component, perform a component diff:\r\n\tlet vnodeName = vnode.nodeName;\r\n\tif (typeof vnodeName==='function') {\r\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\r\n\t}\r\n\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tisSvgMode = vnodeName==='svg' ? true : vnodeName==='foreignObject' ? false : isSvgMode;\r\n\r\n\r\n\t// If there's no existing element or it's the wrong type, create a new one:\r\n\tvnodeName = String(vnodeName);\r\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\r\n\t\tout = createNode(vnodeName, isSvgMode);\r\n\r\n\t\tif (dom) {\r\n\t\t\t// move children into the replacement node\r\n\t\t\twhile (dom.firstChild) out.appendChild(dom.firstChild);\r\n\r\n\t\t\t// if the previous Element was mounted into the DOM, replace it inline\r\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\r\n\t\t\t// recycle the old element (skips non-Element node types)\r\n\t\t\trecollectNodeTree(dom, true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tlet fc = out.firstChild,\r\n\t\tprops = out[ATTR_KEY],\r\n\t\tvchildren = vnode.children;\r\n\r\n\tif (props==null) {\r\n\t\tprops = out[ATTR_KEY] = {};\r\n\t\tfor (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;\r\n\t}\r\n\r\n\t// Optimization: fast-path for elements containing a single TextNode:\r\n\tif (!hydrating && vchildren && vchildren.length===1 && typeof vchildren[0]==='string' && fc!=null && fc.splitText!==undefined && fc.nextSibling==null) {\r\n\t\tif (fc.nodeValue!=vchildren[0]) {\r\n\t\t\tfc.nodeValue = vchildren[0];\r\n\t\t}\r\n\t}\r\n\t// otherwise, if there are existing or new children, diff them:\r\n\telse if (vchildren && vchildren.length || fc!=null) {\r\n\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML!=null);\r\n\t}\r\n\r\n\r\n\t// Apply attributes/props from VNode to the DOM Element:\r\n\tdiffAttributes(out, vnode.attributes, props);\r\n\r\n\r\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\r\n\tisSvgMode = prevSvgMode;\r\n\r\n\treturn out;\r\n}\r\n\r\n\r\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\r\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\r\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\r\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\r\n *\t@param {Boolean} mountAll\r\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\r\n */\r\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\r\n\tlet originalChildren = dom.childNodes,\r\n\t\tchildren = [],\r\n\t\tkeyed = {},\r\n\t\tkeyedLen = 0,\r\n\t\tmin = 0,\r\n\t\tlen = originalChildren.length,\r\n\t\tchildrenLen = 0,\r\n\t\tvlen = vchildren ? vchildren.length : 0,\r\n\t\tj, c, f, vchild, child;\r\n\r\n\t// Build up a map of keyed children and an Array of unkeyed children:\r\n\tif (len!==0) {\r\n\t\tfor (let i=0; i {\r\n\t\tif (typeof g2 === 'undefined') {\r\n\t\t\tg2 = '';\r\n\t\t}\r\n\r\n\t\t/* eslint-ignore-next-line */\r\n\t\tif (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\r\n\t\t\treturn g1 + g2 + g3;\r\n\t\t}\r\n\r\n\t\tlet appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\r\n\t\t//let prependClass = prefix + ' ' + g1.trim() + g2;\r\n\r\n\t\treturn appendClass + g3;\r\n\t\t//return appendClass + ',' + prependClass + g3;\r\n\t});\r\n\r\n\treturn css;\r\n}\r\n\r\nexport function addStyle(cssText, id) {\r\n\tid = id.toLowerCase();\r\n\tlet ele = document.getElementById(id);\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tif (ele && ele.parentNode === head) {\r\n\t\thead.removeChild(ele);\r\n\t}\r\n\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\tsomeThingStyles.setAttribute('id', id);\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nexport function addStyleWithoutId(cssText) {\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\n\r\nexport function addScopedAttr(vdom, style, attr, component) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tstyle = scoper(style, attr);\r\n\t\tif (style !== component._preStyle) {\r\n\t\t\taddStyle(style, attr);\r\n\t\t}\r\n\t} else if (style !== component._preStyle) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n\tcomponent._preStyle = style;\r\n}\r\n\r\nexport function addScopedAttrStatic(vdom, style, attr) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tif (!options.staticStyleRendered) {\r\n\t\t\taddStyle(scoper(style, attr), attr);\r\n\t\t}\r\n\t} else if (!options.staticStyleRendered) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n}\r\n\r\nexport function scopeVdom(attr,vdom){\r\n\tif (typeof vdom!== 'string'){\r\n\t\tvdom.attributes = vdom.attributes||{};\r\n\t\tvdom.attributes[attr] = '';\r\n\t\tvdom.children.forEach(child=>scopeVdom(attr,child));\r\n\t}\r\n}","import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';\r\nimport options from '../options';\r\nimport { extend } from '../util';\r\nimport { enqueueRender } from '../render-queue';\r\nimport { getNodeProps } from './index';\r\nimport { diff, mounts, diffLevel, flushMounts, recollectNodeTree, removeChildren } from './diff';\r\nimport { createComponent, collectComponent } from './component-recycler';\r\nimport { removeNode } from '../dom/index';\r\nimport {addScopedAttr, addScopedAttrStatic} from '../style';\r\n\r\n/** Set a component's `props` (generally derived from JSX attributes).\r\n *\t@param {Object} props\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\r\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\r\n */\r\nexport function setComponentProps(component, props, opts, context, mountAll) {\r\n\tif (component._disable) return;\r\n\tcomponent._disable = true;\r\n\r\n\tif ((component.__ref = props.ref)) delete props.ref;\r\n\tif ((component.__key = props.key)) delete props.key;\r\n\r\n\tif (!component.base || mountAll) {\r\n\t\tif (component.componentWillMount) component.componentWillMount();\r\n\t\tif (component.install) component.install();\r\n\t}\r\n\telse if (component.componentWillReceiveProps) {\r\n\t\tcomponent.componentWillReceiveProps(props, context);\r\n\t}\r\n\r\n\tif (context && context!==component.context) {\r\n\t\tif (!component.prevContext) component.prevContext = component.context;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tif (!component.prevProps) component.prevProps = component.props;\r\n\tcomponent.props = props;\r\n\r\n\tcomponent._disable = false;\r\n\r\n\tif (opts!==NO_RENDER) {\r\n\t\tif (opts===SYNC_RENDER || options.syncComponentUpdates!==false || !component.base) {\r\n\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tenqueueRender(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(component);\r\n}\r\n\r\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\r\n *\t@param {Component} component\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\r\n *\t@private\r\n */\r\nexport function renderComponent(component, opts, mountAll, isChild) {\r\n\tif (component._disable) return;\r\n\r\n\tlet props = component.props,\r\n\t\tstate = component.state,\r\n\t\tcontext = component.context,\r\n\t\tpreviousProps = component.prevProps || props,\r\n\t\tpreviousState = component.prevState || state,\r\n\t\tpreviousContext = component.prevContext || context,\r\n\t\tisUpdate = component.base,\r\n\t\tnextBase = component.nextBase,\r\n\t\tinitialBase = isUpdate || nextBase,\r\n\t\tinitialChildComponent = component._component,\r\n\t\tskip = false,\r\n\t\trendered, inst, cbase;\r\n\r\n\t// if updating\r\n\tif (isUpdate) {\r\n\t\tcomponent.props = previousProps;\r\n\t\tcomponent.state = previousState;\r\n\t\tcomponent.context = previousContext;\r\n\t\tif (opts!==FORCE_RENDER\r\n\t\t\t&& component.shouldComponentUpdate\r\n\t\t\t&& component.shouldComponentUpdate(props, state, context) === false) {\r\n\t\t\tskip = true;\r\n\t\t}\r\n\t\telse if (component.componentWillUpdate) {\r\n\t\t\tcomponent.componentWillUpdate(props, state, context);\r\n\t\t}\r\n\t\telse if (component.beforeUpdate) {\r\n\t\t\tcomponent.beforeUpdate(props, state, context);\r\n\t\t}\r\n\t\tcomponent.props = props;\r\n\t\tcomponent.state = state;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\r\n\tcomponent._dirty = false;\r\n\r\n\tif (!skip) {\r\n\t\trendered = component.render(props, state, context);\r\n\t\r\n\t\tif (component.style){\r\n\t\t\taddScopedAttr(rendered,component.style(),'_style_'+component._id,component);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (component.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,component.staticStyle(),'_style_'+component.constructor.name);\r\n\t\t}\r\n\r\n\t\t// context to pass to the child, can be updated via (grand-)parent component\r\n\t\tif (component.getChildContext) {\r\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\r\n\t\t}\r\n\r\n\t\tlet childComponent = rendered && rendered.nodeName,\r\n\t\t\ttoUnmount, base;\r\n\r\n\t\tif (typeof childComponent==='function') {\r\n\t\t\t// set up high order component link\r\n\r\n\t\t\tlet childProps = getNodeProps(rendered);\r\n\t\t\tinst = initialChildComponent;\r\n\r\n\t\t\tif (inst && inst.constructor===childComponent && childProps.key==inst.__key) {\r\n\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttoUnmount = inst;\r\n\r\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\r\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\r\n\t\t\t\tinst._parentComponent = component;\r\n\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\r\n\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\r\n\t\t\t}\r\n\r\n\t\t\tbase = inst.base;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcbase = initialBase;\r\n\r\n\t\t\t// destroy high order component link\r\n\t\t\ttoUnmount = initialChildComponent;\r\n\t\t\tif (toUnmount) {\r\n\t\t\t\tcbase = component._component = null;\r\n\t\t\t}\r\n\r\n\t\t\tif (initialBase || opts===SYNC_RENDER) {\r\n\t\t\t\tif (cbase) cbase._component = null;\r\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (initialBase && base!==initialBase && inst!==initialChildComponent) {\r\n\t\t\tlet baseParent = initialBase.parentNode;\r\n\t\t\tif (baseParent && base!==baseParent) {\r\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\r\n\r\n\t\t\t\tif (!toUnmount) {\r\n\t\t\t\t\tinitialBase._component = null;\r\n\t\t\t\t\trecollectNodeTree(initialBase, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (toUnmount) {\r\n\t\t\tunmountComponent(toUnmount);\r\n\t\t}\r\n\r\n\t\tcomponent.base = base;\r\n\t\tif (base && !isChild) {\r\n\t\t\tlet componentRef = component,\r\n\t\t\t\tt = component;\r\n\t\t\twhile ((t=t._parentComponent)) {\r\n\t\t\t\t(componentRef = t).base = base;\r\n\t\t\t}\r\n\t\t\tbase._component = componentRef;\r\n\t\t\tbase._componentConstructor = componentRef.constructor;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!isUpdate || mountAll) {\r\n\t\tmounts.unshift(component);\r\n\t}\r\n\telse if (!skip) {\r\n\t\t// Ensure that pending componentDidMount() hooks of child components\r\n\t\t// are called before the componentDidUpdate() hook in the parent.\r\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\r\n\t\t// flushMounts();\r\n\r\n\t\tif (component.componentDidUpdate) {\r\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (component.afterUpdate) {\r\n\t\t\tcomponent.afterUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (options.afterUpdate) options.afterUpdate(component);\r\n\t}\r\n\r\n\tif (component._renderCallbacks!=null) {\r\n\t\twhile (component._renderCallbacks.length) component._renderCallbacks.pop().call(component);\r\n\t}\r\n\r\n\tif (!diffLevel && !isChild) flushMounts();\r\n}\r\n\r\n\r\n\r\n/** Apply the Component referenced by a VNode to the DOM.\r\n *\t@param {Element} dom\tThe DOM node to mutate\r\n *\t@param {VNode} vnode\tA Component-referencing VNode\r\n *\t@returns {Element} dom\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function buildComponentFromVNode(dom, vnode, context, mountAll) {\r\n\tlet c = dom && dom._component,\r\n\t\toriginalComponent = c,\r\n\t\toldDom = dom,\r\n\t\tisDirectOwner = c && dom._componentConstructor===vnode.nodeName,\r\n\t\tisOwner = isDirectOwner,\r\n\t\tprops = getNodeProps(vnode);\r\n\twhile (c && !isOwner && (c=c._parentComponent)) {\r\n\t\tisOwner = c.constructor===vnode.nodeName;\r\n\t}\r\n\r\n\tif (c && isOwner && (!mountAll || c._component)) {\r\n\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\t}\r\n\telse {\r\n\t\tif (originalComponent && !isDirectOwner) {\r\n\t\t\tunmountComponent(originalComponent);\r\n\t\t\tdom = oldDom = null;\r\n\t\t}\r\n\r\n\t\tc = createComponent(vnode.nodeName, props, context);\r\n\t\tif (dom && !c.nextBase) {\r\n\t\t\tc.nextBase = dom;\r\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\r\n\t\t\toldDom = null;\r\n\t\t}\r\n\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\r\n\t\tif (oldDom && dom!==oldDom) {\r\n\t\t\toldDom._component = null;\r\n\t\t\trecollectNodeTree(oldDom, false);\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n\r\n\r\n/** Remove a component from the DOM and recycle it.\r\n *\t@param {Component} component\tThe Component instance to unmount\r\n *\t@private\r\n */\r\nexport function unmountComponent(component) {\r\n\tif (options.beforeUnmount) options.beforeUnmount(component);\r\n\r\n\tlet base = component.base;\r\n\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.componentWillUnmount) component.componentWillUnmount();\r\n\tif (component.uninstall) component.uninstall();\r\n\t\r\n\tcomponent.base = null;\r\n\r\n\t// recursively tear down & recollect high-order component children:\r\n\tlet inner = component._component;\r\n\tif (inner) {\r\n\t\tunmountComponent(inner);\r\n\t}\r\n\telse if (base) {\r\n\t\tif (base[ATTR_KEY] && base[ATTR_KEY].ref) base[ATTR_KEY].ref(null);\r\n\r\n\t\tcomponent.nextBase = base;\r\n\r\n\t\tremoveNode(base);\r\n\t\tcollectComponent(component);\r\n\r\n\t\tremoveChildren(base);\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(null);\r\n}\r\n","import { FORCE_RENDER } from './constants';\r\nimport { extend } from './util';\r\nimport { renderComponent } from './vdom/component';\r\nimport { enqueueRender } from './render-queue';\r\nimport options from './options';\r\n\r\nlet id = 0;\r\nfunction getId(){\r\n\treturn id++;\r\n}\r\n/** Base Component class.\r\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\r\n *\t@public\r\n *\r\n *\t@example\r\n *\tclass MyFoo extends Component {\r\n *\t\trender(props, state) {\r\n *\t\t\treturn ;\r\n *\t\t}\r\n *\t}\r\n */\r\nexport function Component(props, context) {\r\n\tthis._dirty = true;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.context = context;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.props = props;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.state = this.state || {};\r\n\r\n\tthis._id = getId();\r\n\r\n\tthis._preStyle = null;\r\n\r\n\tthis.$store = null;\r\n\r\n}\r\n\r\n\r\nextend(Component.prototype, {\r\n\r\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\r\n\t *\t@param {object} nextProps\r\n\t *\t@param {object} nextState\r\n\t *\t@param {object} nextContext\r\n\t *\t@returns {Boolean} should the component re-render\r\n\t *\t@name shouldComponentUpdate\r\n\t *\t@function\r\n\t */\r\n\r\n\r\n\t/** Update component state by copying properties from `state` to `this.state`.\r\n\t *\t@param {object} state\t\tA hash of state properties to update with new values\r\n\t *\t@param {function} callback\tA function to be called once component state is updated\r\n\t */\r\n\tsetState(state, callback) {\r\n\t\tlet s = this.state;\r\n\t\tif (!this.prevState) this.prevState = extend({}, s);\r\n\t\textend(s, typeof state==='function' ? state(s, this.props) : state);\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\tenqueueRender(this);\r\n\t},\r\n\r\n\r\n\t/** Immediately perform a synchronous re-render of the component.\r\n\t *\t@param {function} callback\t\tA function to be called after component is re-rendered.\r\n\t *\t@private\r\n\t */\r\n\tforceUpdate(callback) {\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\trenderComponent(this, FORCE_RENDER);\r\n\t\tif (options.componentChange) options.componentChange(this, this.base);\r\n\t},\r\n\r\n\tupdate(callback){\r\n\t\tthis.forceUpdate(callback);\r\n\t},\r\n\r\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n\t *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n\t *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\r\n\t *\t@param {object} state\t\tThe component's current state\r\n\t *\t@param {object} context\t\tContext object (if a parent component has provided context)\r\n\t *\t@returns VNode\r\n\t */\r\n\trender() {}\r\n\r\n});\r\n","import { diff } from './vdom/diff';\r\nimport { Component } from './component';\r\nimport options from './options';\r\nimport {addScopedAttr, addScopedAttrStatic} from './style';\r\n\r\nfunction isElement(obj) {\r\n\ttry {\r\n\t //Using W3 DOM2 (works for FF, Opera and Chrome)\r\n\t return obj instanceof HTMLElement;\r\n\t}\r\n\tcatch (e){\r\n\t //Browsers not supporting W3 DOM2 don't have HTMLElement and\r\n\t //an exception is thrown and we end up here. Testing some\r\n\t //properties that all elements have (works on IE7)\r\n\t return (typeof obj===\"object\") &&\r\n\t\t(obj.nodeType===1) && (typeof obj.style === \"object\") &&\r\n\t\t(typeof obj.ownerDocument ===\"object\");\r\n\t}\r\n}\r\n\r\n/** Render JSX into a `parent` Element.\r\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\r\n *\t@param {Element} parent\t\tDOM element to render into\r\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\r\n *\t@public\r\n *\r\n *\t@example\r\n *\t// render a div into :\r\n *\trender(hello!
, document.body);\r\n *\r\n *\t@example\r\n *\t// render a \"Thing\" component into #foo:\r\n *\tconst Thing = ({ name }) => { name };\r\n *\trender(, document.querySelector('#foo'));\r\n */\r\nexport function render(vnode, parent, merge) {\r\n\toptions.staticStyleRendered = false;\r\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent;\r\n\tif (merge === true){\r\n\t\twhile (parent.firstChild){\r\n\t\t\tparent.removeChild(parent.firstChild);\r\n\t\t}\r\n\t}\r\n\tconst m = isElement(merge) || merge === undefined;\r\n\tif (vnode instanceof Component) {\r\n\t\tif (window && window.Omi){\r\n\t\t\twindow.Omi.instances.push(vnode);\r\n\t\t}\r\n\t\tif (!m){\r\n\t\t\tvnode.$store = options.$store = merge;\r\n\t\t}\r\n\t\tif (vnode.componentWillMount) vnode.componentWillMount();\r\n\t\tif (vnode.install) vnode.install();\r\n\t\tconst rendered = vnode.render();\r\n\t\tif (vnode.style){\r\n\t\t\taddScopedAttr(rendered,vnode.style(),'_style_'+vnode._id,vnode);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (vnode.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,vnode.staticStyle(),'_style_'+vnode.constructor.name, !vnode.base);\r\n\t\t}\r\n\r\n\t\tvnode.base = diff(m ? merge : undefined, rendered, {}, false, parent, false);\r\n\t\t\r\n\t\tif (vnode.componentDidMount) vnode.componentDidMount();\r\n\t\tif (vnode.installed) vnode.installed();\r\n\t\toptions.staticStyleRendered = true;\r\n\t\treturn vnode.base;\r\n\t}\r\n\t\r\n\tlet result = diff(merge, vnode, {}, false, parent, false);\r\n\toptions.staticStyleRendered = true;\r\n\treturn result;\r\n}\r\n","import { h, h as createElement } from './h';\r\nimport { cloneElement } from './clone-element';\r\nimport { Component } from './component';\r\nimport { render } from './render';\r\nimport { rerender } from './render-queue';\r\nimport options from './options';\r\n\r\nfunction getGlobal() {\r\n\tif (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\r\n\t\tif (typeof self !== 'undefined') {\r\n\t\t\treturn self;\r\n\t\t} else if (typeof window !== 'undefined') {\r\n\t\t\treturn window;\r\n\t\t} else if (typeof global !== 'undefined') {\r\n\t\t\treturn global;\r\n\t\t}\r\n\t\treturn (function(){\r\n\t\t\treturn this;\r\n\t\t})();\r\n\t\t\r\n\t}\r\n\treturn global;\r\n}\r\n\r\nconst instances = [];\r\nconst root = getGlobal();\r\nroot.Omi = {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nroot.Omi.version = '3.0.0';\r\n\r\nexport default {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nexport {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n"],"names":["VNode","document","stack","EMPTY_CHILDREN","map","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","options","isWeb","value","key","vnode","extend","obj","props","usePromise","Promise","global","__config__","platform","systemVersion","split","defer","resolve","then","bind","setTimeout","cloneElement","slice","call","NO_RENDER","SYNC_RENDER","FORCE_RENDER","ASYNC_RENDER","ATTR_KEY","IS_NON_DIMENSIONAL","items","enqueueRender","component","_dirty","debounceRendering","rerender","list","element","base","renderComponent","componentChange","isSameNodeType","node","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","toLowerCase","getNodeProps","defaultProps","createNode","isSvg","doc","createElementNS","createElement","parseCSSText","cssText","cssTxt","replace","match","a","b","rule","cssToJs","s","toUpperCase","properties","o","x","trim","property","style","removeNode","parentNode","removeChild","setAccessor","name","old","className","test","oldJson","currentJson","result","changed","ckey","setStyles","innerHTML","__html","useCapture","substring","addEventListener","eventProxy","removeEventListener","_listeners","removeAttribute","ns","removeAttributeNS","setAttributeNS","setAttribute","setProperty","e","type","event","mounts","diffLevel","isSvgMode","flushMounts","c","afterMount","componentDidMount","installed","diff","dom","context","mountAll","parent","componentRoot","ownerSVGElement","ret","idiff","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","buildComponentFromVNode","firstChild","fc","vchildren","nextSibling","dangerouslySetInnerHTML","innerDiffNode","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","len","childrenLen","vlen","j","f","vchild","__key","insertBefore","recollectNodeTree","unmountOnly","ref","removeChildren","lastChild","next","previousSibling","diffAttributes","attrs","components","collectComponent","constructor","createComponent","Ctor","inst","prototype","render","Component","doRender","$store","window","Omi","instances","nextBase","splice","state","scoper","css","prefix","re","RegExp","g0","g1","g2","g3","appendClass","addStyle","id","ele","getElementById","head","getElementsByTagName","someThingStyles","ActiveXObject","styleSheet","textContent","addStyleWithoutId","addScopedAttr","vdom","attr","scopedStyle","_preStyle","addScopedAttrStatic","staticStyleRendered","scopeVdom","forEach","setComponentProps","opts","_disable","__ref","componentWillMount","install","componentWillReceiveProps","prevContext","prevProps","syncComponentUpdates","isChild","previousProps","previousState","prevState","previousContext","isUpdate","initialBase","initialChildComponent","skip","rendered","cbase","shouldComponentUpdate","componentWillUpdate","beforeUpdate","_id","staticStyle","getChildContext","childComponent","toUnmount","childProps","_parentComponent","baseParent","componentRef","t","unshift","componentDidUpdate","afterUpdate","_renderCallbacks","originalComponent","oldDom","isDirectOwner","isOwner","unmountComponent","beforeUnmount","componentWillUnmount","uninstall","inner","getId","callback","forceUpdate","isElement","HTMLElement","nodeType","ownerDocument","merge","querySelector","m","getGlobal","Math","Array","self","root","version"],"mappings":";;;;;;;;AAAA;AACA,SAAgBA,KAAT,GAAiB;;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ode();
- p.nodeName = isH5 ? nodeName : map[nodeName];
+ p.nodeName = options.isWeb ? nodeName : map[nodeName];
p.attributes = null == attributes ? void 0 : attributes;
- if (children && 'string' == typeof children[0] && !isH5) if (p.attributes) p.attributes.value = children[0]; else p.attributes = {
+ if (children && 'string' == typeof children[0] && !options.isWeb) if (p.attributes) p.attributes.value = children[0]; else p.attributes = {
value: children[0]
}; else p.children = children;
p.key = null == attributes ? void 0 : attributes.key;
@@ -101,7 +101,7 @@
if ('key' === name) ; else if ('ref' === name) {
if (old) old(null);
if (value) value(node);
- } else if ('class' === name && !isSvg) node.className = value || ''; else if ('style' === name) if (isH5$1) {
+ } else if ('class' === name && !isSvg) node.className = value || ''; else if ('style' === name) if (options.isWeb) {
if (!value || 'string' == typeof value || 'string' == typeof old) node.style.cssText = value || '';
if (value && 'object' == typeof value) {
if ('string' != typeof old) for (var i in old) if (!(i in value)) node.style[i] = '';
@@ -297,8 +297,7 @@
if (void 0 === g2) g2 = '';
if (g1.match(/^\s*(@media|\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) return g1 + g2 + g3;
var appendClass = g1.replace(/(\s*)$/, '') + prefix + g2;
- var prependClass = prefix + ' ' + g1.trim() + g2;
- return appendClass + ',' + prependClass + g3;
+ return appendClass + g3;
});
return css;
}
@@ -525,7 +524,6 @@
};
var stack = [];
var EMPTY_CHILDREN = [];
- var isH5 = options.isWeb;
var map = {
br: 'view',
hr: 'view',
@@ -655,7 +653,6 @@
var defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;
var IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;
var items = [];
- var isH5$1 = options.isWeb;
var mounts = [];
var diffLevel = 0;
var isSvgMode = !1;
diff --git a/dist/omi.js.map b/dist/omi.js.map
index 3e3127353..e0163f1cf 100644
--- a/dist/omi.js.map
+++ b/dist/omi.js.map
@@ -1 +1 @@
-{"version":3,"sources":["../src/vnode.js","../src/h.js","../src/util.js","../src/clone-element.js","../src/constants.js","../src/render-queue.js","../src/vdom/index.js","../src/dom/index.js","../src/vdom/diff.js","../src/vdom/component-recycler.js","../src/style.js","../src/vdom/component.js","../src/component.js","../src/render.js","../src/options.js","../src/omi.js"],"names":["VNode","nodeName","attributes","lastSimple","child","simple","i","children","EMPTY_CHILDREN","arguments","length","stack","push","pop","undefined","String","p","isH5","map","value","key","options","vnode","extend","obj","props","cloneElement","h","slice","call","ATTR_KEY","component","debounceRendering","defer","rerender","items","element","base","_dirty","renderComponent","list","componentChange","hydrating","node","_componentConstructor","normalizedNodeName","toLowerCase","defaultProps","doc","createElementNS","createElement","_ref","createNode","match","a","b","cssTxt","isSvg","rule","properties","o","split","x","trim","s","replace","Array","isArray","Symbol","iterator","_ref3","next","done","_ref2","property","style","parseCSSText","cssText","cssToJs","parentNode","removeChild","setAccessor","name","old","className","IS_NON_DIMENSIONAL","test","oldJson","currentJson","changed","ckey","result","substring","setStyles","addEventListener","eventProxy","useCapture","removeEventListener","innerHTML","_listeners","setProperty","removeAttribute","ns","setAttribute","e","this","type","event","diffLevel","c","mounts","isSvgMode","afterMount","installed","diff","dom","context","mountAll","parent","componentRoot","ret","idiff","ownerSVGElement","out","prevSvgMode","_component","nodeValue","splitText","recollectNodeTree","document","vnodeName","buildComponentFromVNode","replaceChild","appendChild","vchildren","fc","innerDiffNode","isHydrating","j","originalChildren","keyed","keyedLen","childrenLen","vlen","_child","f","__key","vchild","min","nextSibling","removeNode","insertBefore","unmountOnly","removeChildren","previousSibling","attrs","collectComponent","components","Ctor","inst","constructor","render","Component","createComponent","prototype","Omi","nextBase","$store","splice","state","scoper","css","prefix","re","g0","g1","g2","g3","appendClass","prependClass","id","ele","head","someThingStyles","getElementById","textContent","window","ActiveXObject","styleSheet","addStyleWithoutId","attr","scopeVdom","_preStyle","scopedStyle","addStyle","vdom","staticStyleRendered","setComponentProps","opts","_disable","componentWillReceiveProps","enqueueRender","prevProps","isChild","previousProps","previousState","isUpdate","initialBase","initialChildComponent","previousContext","rendered","shouldComponentUpdate","skip","cbase","componentWillUpdate","beforeUpdate","FORCE_RENDER","prevContext","addScopedAttr","_id","addScopedAttrStatic","staticStyle","getChildContext","childComponent","childProps","getNodeProps","toUnmount","baseParent","SYNC_RENDER","componentRef","t","unshift","_parentComponent","afterUpdate","componentDidUpdate","_renderCallbacks","flushMounts","oldDom","originalComponent","isDirectOwner","isOwner","unmountComponent","beforeUnmount","componentWillUnmount","ref","merge","instances","m","firstChild","componentWillMount","isElement","install","componentDidMount","isWeb","br","hr","h1","h2","h3","h4","h5","h6","abbr","address","bdi","bdo","blockquote","cite","code","del","ins","dfn","em","strong","samp","kbd","var","mark","pre","q","ruby","rp","rt","small","sub","sup","time","u","wbr","form","input","textarea","button","select","option","optgroup","label","fieldset","datalist","legend","output","iframe","img","canvas","figure","figcaption","audio","source","video","track","nav","link","ul","ol","li","dl","dt","dd","menu","command","table","caption","th","td","tr","thead","tbody","tfoot","col","colgroup","div","main","span","header","footer","section","article","aside","details","dialog","summary","progress","meter","meta","area","script","noscript","embed","object","param","view","scroll-view","swiper","icon","text","checkbox","radio","picker","picker-view","slider","switch","navigator","image","contact-button","block","usePromise","Promise","global","__config__","platform","systemVersion","resolve","then","bind","setTimeout","ASYNC_RENDER","isH5$1","forceUpdate","callback","update","root","Math","self","getGlobal","version","module","exports"],"mappings":";;IACO,SAASA;ICqLT,SAAWC,EAAAA,UAAUC;QAC3B,IAA6BC,YAAYC,OAAOC,QAAQC,GAApDC,WAASC;QACb,KAAKF,IAAEG,UAAUC,QAAQJ,MAAM,KAC9BK,MAAMC,KAAKH,UAAUH;QAEtB,IAAIJ,cAAmC,QAArBA,WAAWK,UAAgB;YAC5C,KAAKI,MAAMD,QAAQC,MAAMC,KAAKV,WAAWK;mBAClCL,WAAWK;;QAEnB,OAAOI,MAAMD,QACZ,KAAKN,QAAQO,MAAME,eAAsBC,MAAZV,MAAMS,KAClC,KAAKP,IAAEF,MAA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nexport function VNode() {}\r\n","import { VNode } from './vnode';\r\nimport options from './options';\r\n\r\n\r\nconst stack = [];\r\n\r\nconst EMPTY_CHILDREN = [];\r\n\r\nconst isH5 = options.isWeb;\r\n\r\nconst map = {\r\n\t'br': 'view',\r\n\t'hr': 'view',\r\n\r\n\t'p': 'view',\r\n\t'h1': 'view',\r\n\t'h2': 'view',\r\n\t'h3': 'view',\r\n\t'h4': 'view',\r\n\t'h5': 'view',\r\n\t'h6': 'view',\r\n\t'abbr': 'view',\r\n\t'address': 'view',\r\n\t'b': 'view',\r\n\t'bdi': 'view',\r\n\t'bdo': 'view',\r\n\t'blockquote': 'view',\r\n\t'cite': 'view',\r\n\t'code': 'view',\r\n\t'del': 'view',\r\n\t'ins': 'view',\r\n\t'dfn': 'view',\r\n\t'em': 'view',\r\n\t'strong': 'view',\r\n\t'samp': 'view',\r\n\t'kbd': 'view',\r\n\t'var': 'view',\r\n\t'i': 'view',\r\n\t'mark': 'view',\r\n\t'pre': 'view',\r\n\t'q': 'view',\r\n\t'ruby': 'view',\r\n\t'rp': 'view',\r\n\t'rt': 'view',\r\n\t's': 'view',\r\n\t'small': 'view',\r\n\t'sub': 'view',\r\n\t'sup': 'view',\r\n\t'time': 'view',\r\n\t'u': 'view',\r\n\t'wbr': 'view',\r\n\r\n\t'form': 'form',\r\n\t'input': 'input',\r\n\t'textarea': 'textarea',\r\n\t'button': 'button',\r\n\t'select': 'picker',\r\n\t'option': 'view',\r\n\t'optgroup': 'view',\r\n\t'label': 'label',\r\n\t'fieldset': 'view',\r\n\t'datalist': 'picker',\r\n\t'legend': 'view',\r\n\t'output': 'view',\r\n\r\n\t'iframe': 'view',\r\n \r\n\t'img': 'image',\r\n\t'canvas': 'canvas',\r\n\t'figure': 'view',\r\n\t'figcaption': 'view',\r\n\r\n \r\n\t'audio': 'audio',\r\n\t'source': 'audio',\r\n\t'video': 'video',\r\n\t'track': 'video',\r\n \r\n\t'a': 'navigator',\r\n\t'nav': 'view',\r\n\t'link': 'navigator',\r\n\r\n\t'ul': 'view',\r\n\t'ol': 'view',\r\n\t'li': 'view',\r\n\t'dl': 'view',\r\n\t'dt': 'view',\r\n\t'dd': 'view',\r\n\t'menu': 'view',\r\n\t'command': 'view',\r\n\r\n\r\n\t'table': 'view',\r\n\t'caption': 'view',\r\n\t'th': 'view',\r\n\t'td': 'view',\r\n\t'tr': 'view',\r\n\t'thead': 'view',\r\n\t'tbody': 'view',\r\n\t'tfoot': 'view',\r\n\t'col': 'view',\r\n\t'colgroup': 'view',\r\n\r\n\r\n\t'div': 'view',\r\n\t'main': 'view',\r\n\t//'span': 'label',\r\n\t'span': 'text',\r\n\t'header': 'view',\r\n\t'footer': 'view',\r\n\t'section': 'view',\r\n\t'article': 'view',\r\n\t'aside': 'view',\r\n\t'details': 'view',\r\n\t'dialog': 'view',\r\n\t'summary': 'view',\r\n\r\n\t'progress': 'progress',\r\n\t'meter': 'progress',\r\n\t'head': 'view',\r\n\t'meta': 'view',\r\n\t'base': 'text',\r\n\t'map': 'map',\r\n\t'area': 'navigator',\r\n\r\n\t'script': 'view',\r\n\t'noscript': 'view',\r\n\t'embed': 'view',\r\n\t'object': 'view',\r\n\t'param': 'view',\r\n\r\n\t'view': 'view',\r\n\t'scroll-view': 'scroll-view',\r\n\t'swiper': 'swiper',\r\n\t'icon': 'icon',\r\n\t'text': 'text',\r\n\r\n\t\r\n\r\n\r\n\t'checkbox': 'checkbox',\r\n\t'radio': 'radio',\r\n\t'picker': 'picker',\r\n\t'picker-view': 'picker-view',\r\n\t'slider': 'slider',\r\n\t'switch': 'switch',\r\n\t'navigator': 'navigator',\r\n\t\r\n\t'image': 'image',\r\n\t'contact-button': 'contact-button',\r\n\t'block': 'block'\r\n};\r\n\r\n\r\n/**\r\n * JSX/hyperscript reviver.\r\n * @see http://jasonformat.com/wtf-is-jsx\r\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\r\n *\r\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\r\n *\r\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\r\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\r\n * the current _actual_ DOM structure, and applying only the differences.\r\n *\r\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\r\n * and optionally children to append to the element.\r\n *\r\n * @example The following DOM tree\r\n *\r\n * `Hello!
`\r\n *\r\n * can be constructed using this function as:\r\n *\r\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\r\n *\r\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\r\n * @param {Object} attributes\tAny attributes/props to set on the created element.\r\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\r\n *\r\n * @public\r\n */\r\nexport function h(nodeName, attributes) {\r\n\tlet children=EMPTY_CHILDREN, lastSimple, child, simple, i;\r\n\tfor (i=arguments.length; i-- > 2; ) {\r\n\t\tstack.push(arguments[i]);\r\n\t}\r\n\tif (attributes && attributes.children!=null) {\r\n\t\tif (!stack.length) stack.push(attributes.children);\r\n\t\tdelete attributes.children;\r\n\t}\r\n\twhile (stack.length) {\r\n\t\tif ((child = stack.pop()) && child.pop!==undefined) {\r\n\t\t\tfor (i=child.length; i--; ) stack.push(child[i]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (typeof child==='boolean') child = null;\r\n\r\n\t\t\tif ((simple = typeof nodeName!=='function')) {\r\n\t\t\t\tif (child==null) child = '';\r\n\t\t\t\telse if (typeof child==='number') child = String(child);\r\n\t\t\t\telse if (typeof child!=='string') simple = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (simple && lastSimple) {\r\n\t\t\t\tchildren[children.length-1] += child;\r\n\t\t\t}\r\n\t\t\telse if (children===EMPTY_CHILDREN) {\r\n\t\t\t\tchildren = [child];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tchildren.push(child);\r\n\t\t\t}\r\n\r\n\t\t\tlastSimple = simple;\r\n\t\t}\r\n\t}\r\n\r\n\tlet p = new VNode();\r\n\tp.nodeName = isH5?nodeName:map[nodeName];\r\n\tp.attributes = attributes == null ? undefined : attributes;\r\n\tif (children && typeof children[0] === 'string'&& !isH5) {\r\n\t\tif (p.attributes) {\r\n\t\t\tp.attributes.value = children[0];\r\n\t\t} else {\r\n\t\t\tp.attributes = { value: children[0] };\r\n\t\t}\r\n\t} else {\r\n\t\tp.children = children;\r\n\t}\r\n\tp.key = attributes==null ? undefined : attributes.key;\r\n\r\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\r\n\tif (options.vnode!==undefined) options.vnode(p);\r\n\r\n\treturn p;\r\n}\r\n","/**\r\n * Copy all properties from `props` onto `obj`.\r\n * @param {Object} obj\t\tObject onto which properties should be copied.\r\n * @param {Object} props\tObject from which to copy properties.\r\n * @returns obj\r\n * @private\r\n */\r\nexport function extend(obj, props) {\r\n\tfor (let i in props) obj[i] = props[i];\r\n\treturn obj;\r\n}\r\n\r\n/**\r\n * Call a function asynchronously, as soon as possible. Makes\r\n * use of HTML Promise to schedule the callback if available,\r\n * otherwise falling back to `setTimeout` (mainly for IE<11).\r\n *\r\n * @param {Function} callback\r\n */\r\n\r\nlet usePromise = typeof Promise == 'function';\r\n\r\n// for native\r\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\r\n\tif (global.__config__.platform === 'android') {\r\n\t\tusePromise = true;\r\n\t} else {\r\n\t\tlet systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\r\n\t\tif (systemVersion > 8) {\r\n\t\t\tusePromise = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\r\n","import { extend } from './util';\r\nimport { h } from './h';\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\r\n * @param {Object} props\tAttributes/props to add when cloning\r\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\r\n */\r\nexport function cloneElement(vnode, props) {\r\n\treturn h(\r\n\t\tvnode.nodeName,\r\n\t\textend(extend({}, vnode.attributes), props),\r\n\t\targuments.length>2 ? [].slice.call(arguments, 2) : vnode.children\r\n\t);\r\n}\r\n","// render modes\r\n\r\nexport const NO_RENDER = 0;\r\nexport const SYNC_RENDER = 1;\r\nexport const FORCE_RENDER = 2;\r\nexport const ASYNC_RENDER = 3;\r\n\r\n\r\nexport const ATTR_KEY = '__preactattr_';\r\n\r\n// DOM properties that should NOT have \"px\" added when numeric\r\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\r\n\r\n","import options from './options';\r\nimport { defer } from './util';\r\nimport { renderComponent } from './vdom/component';\r\n\r\n/** Managed queue of dirty components to be re-rendered */\r\n\r\nlet items = [];\r\n\r\nexport function enqueueRender(component) {\r\n\tif (!component._dirty && (component._dirty = true) && items.push(component)==1) {\r\n\t\t(options.debounceRendering || defer)(rerender);\r\n\t}\r\n}\r\n\r\nexport function rerender() {\r\n\tlet p, list = items;\r\n\titems = [];\r\n\tlet element;\r\n\twhile ( (p = list.pop()) ) {\r\n\t\telement = p.base;\r\n\t\tif (p._dirty) renderComponent(p);\r\n\t}\r\n\tif (!list.length) {\r\n\t\tif (options.componentChange) options.componentChange(p, element);\r\n\t}\r\n}\r\n","import { extend } from '../util';\r\n\r\n\r\n/**\r\n * Check if two nodes are equivalent.\r\n *\r\n * @param {Node} node\t\t\tDOM Node to compare\r\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\r\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\r\n * @private\r\n */\r\nexport function isSameNodeType(node, vnode, hydrating) {\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\t\treturn node.splitText!==undefined;\r\n\t}\r\n\tif (typeof vnode.nodeName==='string') {\r\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\r\n\t}\r\n\treturn hydrating || node._componentConstructor===vnode.nodeName;\r\n}\r\n\r\n\r\n/**\r\n * Check if an Element has a given nodeName, case-insensitively.\r\n *\r\n * @param {Element} node\tA DOM Element to inspect the name of.\r\n * @param {String} nodeName\tUnnormalized name to compare against.\r\n */\r\nexport function isNamedNode(node, nodeName) {\r\n\treturn node.normalizedNodeName===nodeName || node.nodeName.toLowerCase()===nodeName.toLowerCase();\r\n}\r\n\r\n\r\n/**\r\n * Reconstruct Component-style `props` from a VNode.\r\n * Ensures default/fallback values from `defaultProps`:\r\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\r\n *\r\n * @param {VNode} vnode\r\n * @returns {Object} props\r\n */\r\nexport function getNodeProps(vnode) {\r\n\tlet props = extend({}, vnode.attributes);\r\n\tprops.children = vnode.children;\r\n\r\n\tlet defaultProps = vnode.nodeName.defaultProps;\r\n\tif (defaultProps!==undefined) {\r\n\t\tfor (let i in defaultProps) {\r\n\t\t\tif (props[i]===undefined) {\r\n\t\t\t\tprops[i] = defaultProps[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn props;\r\n}\r\n","import { IS_NON_DIMENSIONAL } from '../constants';\r\nimport options from '../options';\r\n\r\n\r\n/** Create an element with the given nodeName.\r\n *\t@param {String} nodeName\r\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\r\n *\t@returns {Element} node\r\n */\r\nexport function createNode(nodeName, isSvg) {\r\n\tlet node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\r\n\tnode.normalizedNodeName = nodeName;\r\n\treturn node;\r\n}\r\n\r\nfunction parseCSSText(cssText) {\r\n\tlet cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\r\n\tlet style = {}, [a,b,rule] = cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt];\r\n\tlet cssToJs = s => s.replace(/\\W+\\w/g, match => match.slice(-1).toUpperCase());\r\n\tlet properties = rule.split(\";\").map(o => o.split(\":\").map(x => x && x.trim()));\r\n\tfor (let [property, value] of properties) style[cssToJs(property)] = value;\r\n\treturn style;\r\n}\r\n\r\nconst isH5 = options.isWeb;\r\n\r\n\r\n/** Remove a child node from its parent if attached.\r\n *\t@param {Element} node\t\tThe node to remove\r\n */\r\nexport function removeNode(node) {\r\n\tlet parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\n\r\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\r\n *\tIf `value` is `null`, the attribute/handler will be removed.\r\n *\t@param {Element} node\tAn element to mutate\r\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\r\n *\t@param {any} old\tThe last value that was set for this name/node pair\r\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\r\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\r\n *\t@private\r\n */\r\nexport function setAccessor(node, name, old, value, isSvg) {\r\n\tif (name==='className') name = 'class';\r\n\r\n\r\n\tif (name==='key') {\r\n\t\t// ignore\r\n\t}\r\n\telse if (name==='ref') {\r\n\t\tif (old) old(null);\r\n\t\tif (value) value(node);\r\n\t}\r\n\telse if (name==='class' && !isSvg) {\r\n\t\tnode.className = value || '';\r\n\t}\r\n\telse if (name==='style') {\r\n\t\tif (isH5) {\r\n\t\t\tif (!value || typeof value==='string' || typeof old==='string') {\r\n\t\t\t\tnode.style.cssText = value || '';\r\n\t\t\t}\r\n\t\t\tif (value && typeof value==='object') {\r\n\t\t\t\tif (typeof old!=='string') {\r\n\t\t\t\t\tfor (let i in old) if (!(i in value)) node.style[i] = '';\r\n\t\t\t\t}\r\n\t\t\t\tfor (let i in value) {\r\n\t\t\t\t\tnode.style[i] = typeof value[i]==='number' && IS_NON_DIMENSIONAL.test(i)===false ? (value[i]+'px') : value[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet oldJson = old,\r\n\t\t\t\tcurrentJson = value;\r\n\t\t\tif (typeof old === 'string') {\r\n\t\t\t\toldJson = parseCSSText(old);\r\n\t\t\t}\r\n\t\t\tif (typeof value == 'string') {\r\n\t\t\t\tcurrentJson = parseCSSText(value);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlet result = {},\r\n\t\t\t\tchanged = false;\r\n\t\t\r\n\t\t\tif (oldJson) {\r\n\t\t\t\tfor (let key in oldJson) {\r\n\t\t\t\t\tif (typeof currentJson == 'object' && !(key in currentJson)) {\r\n\t\t\t\t\t\tresult[key] = '';\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tfor (let ckey in currentJson) {\r\n\t\t\t\t\tif (currentJson[ckey] !== oldJson[ckey]) {\r\n\t\t\t\t\t\tresult[ckey] = currentJson[ckey];\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tif (changed) {\r\n\t\t\t\t\tnode.setStyles(result);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnode.setStyles(currentJson);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse if (name==='dangerouslySetInnerHTML') {\r\n\t\tif (value) node.innerHTML = value.__html || '';\r\n\t}\r\n\telse if (name[0]=='o' && name[1]=='n') {\r\n\t\tlet useCapture = name !== (name=name.replace(/Capture$/, ''));\r\n\t\tname = name.toLowerCase().substring(2);\r\n\t\tif (value) {\r\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\r\n\t}\r\n\telse if (name!=='list' && name!=='type' && !isSvg && name in node) {\r\n\t\tsetProperty(node, name, value==null ? '' : value);\r\n\t\tif (value==null || value===false) node.removeAttribute(name);\r\n\t}\r\n\telse {\r\n\t\tlet ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));\r\n\t\tif (value==null || value===false) {\r\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());\r\n\t\t\telse node.removeAttribute(name);\r\n\t\t}\r\n\t\telse if (typeof value!=='function') {\r\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\r\n\t\t\telse node.setAttribute(name, value);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/** Attempt to set a DOM property to the given value.\r\n *\tIE & FF throw for certain property-value combinations.\r\n */\r\nfunction setProperty(node, name, value) {\r\n\ttry {\r\n\t\tnode[name] = value;\r\n\t} catch (e) { }\r\n}\r\n\r\n\r\n/** Proxy an event to hooked event handlers\r\n *\t@private\r\n */\r\nfunction eventProxy(e) {\r\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\r\n}\r\n","import { ATTR_KEY } from '../constants';\r\nimport { isSameNodeType, isNamedNode } from './index';\r\nimport { buildComponentFromVNode } from './component';\r\nimport { createNode, setAccessor } from '../dom/index';\r\nimport { unmountComponent } from './component';\r\nimport options from '../options';\r\nimport { removeNode } from '../dom/index';\r\n\r\n/** Queue of components that have been mounted and are awaiting componentDidMount */\r\nexport const mounts = [];\r\n\r\n/** Diff recursion count, used to track the end of the diff cycle. */\r\nexport let diffLevel = 0;\r\n\r\n/** Global flag indicating if the diff is currently within an SVG */\r\nlet isSvgMode = false;\r\n\r\n/** Global flag indicating if the diff is performing hydration */\r\nlet hydrating = false;\r\n\r\n/** Invoke queued componentDidMount lifecycle methods */\r\nexport function flushMounts() {\r\n\tlet c;\r\n\twhile ((c=mounts.pop())) {\r\n\t\tif (options.afterMount) options.afterMount(c);\r\n\t\tif (c.componentDidMount) c.componentDidMount();\r\n\t\tif (c.installed) c.installed();\r\n\t}\r\n}\r\n\r\n\r\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\r\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\r\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\r\n *\t@returns {Element} dom\t\t\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function diff(dom, vnode, context, mountAll, parent, componentRoot) {\r\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\r\n\tif (!diffLevel++) {\r\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\r\n\t\tisSvgMode = parent!=null && parent.ownerSVGElement!==undefined;\r\n\r\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\r\n\t\thydrating = dom!=null && !(ATTR_KEY in dom);\r\n\t}\r\n\r\n\tlet ret = idiff(dom, vnode, context, mountAll, componentRoot);\r\n\r\n\t// append the element if its a new parent\r\n\tif (parent && ret.parentNode!==parent) parent.appendChild(ret);\r\n\r\n\t// diffLevel being reduced to 0 means we're exiting the diff\r\n\tif (!--diffLevel) {\r\n\t\thydrating = false;\r\n\t\t// invoke queued componentDidMount lifecycle methods\r\n\t\tif (!componentRoot) flushMounts();\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\r\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\r\n\tlet out = dom,\r\n\t\tprevSvgMode = isSvgMode;\r\n\r\n\t// empty values (null, undefined, booleans) render as empty Text nodes\r\n\tif (vnode==null || typeof vnode==='boolean') vnode = '';\r\n\r\n\r\n\t// Fast case: Strings & Numbers create/update Text nodes.\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\r\n\t\t// update if it's already a Text node:\r\n\t\tif (dom && dom.splitText!==undefined && dom.parentNode && (!dom._component || componentRoot)) {\r\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\r\n\t\t\tif (dom.nodeValue!=vnode) {\r\n\t\t\t\tdom.nodeValue = vnode;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\r\n\t\t\tout = document.createTextNode(vnode);\r\n\t\t\tif (dom) {\r\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\t\t\t\trecollectNodeTree(dom, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout[ATTR_KEY] = true;\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\r\n\t// If the VNode represents a Component, perform a component diff:\r\n\tlet vnodeName = vnode.nodeName;\r\n\tif (typeof vnodeName==='function') {\r\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\r\n\t}\r\n\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tisSvgMode = vnodeName==='svg' ? true : vnodeName==='foreignObject' ? false : isSvgMode;\r\n\r\n\r\n\t// If there's no existing element or it's the wrong type, create a new one:\r\n\tvnodeName = String(vnodeName);\r\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\r\n\t\tout = createNode(vnodeName, isSvgMode);\r\n\r\n\t\tif (dom) {\r\n\t\t\t// move children into the replacement node\r\n\t\t\twhile (dom.firstChild) out.appendChild(dom.firstChild);\r\n\r\n\t\t\t// if the previous Element was mounted into the DOM, replace it inline\r\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\r\n\t\t\t// recycle the old element (skips non-Element node types)\r\n\t\t\trecollectNodeTree(dom, true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tlet fc = out.firstChild,\r\n\t\tprops = out[ATTR_KEY],\r\n\t\tvchildren = vnode.children;\r\n\r\n\tif (props==null) {\r\n\t\tprops = out[ATTR_KEY] = {};\r\n\t\tfor (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;\r\n\t}\r\n\r\n\t// Optimization: fast-path for elements containing a single TextNode:\r\n\tif (!hydrating && vchildren && vchildren.length===1 && typeof vchildren[0]==='string' && fc!=null && fc.splitText!==undefined && fc.nextSibling==null) {\r\n\t\tif (fc.nodeValue!=vchildren[0]) {\r\n\t\t\tfc.nodeValue = vchildren[0];\r\n\t\t}\r\n\t}\r\n\t// otherwise, if there are existing or new children, diff them:\r\n\telse if (vchildren && vchildren.length || fc!=null) {\r\n\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML!=null);\r\n\t}\r\n\r\n\r\n\t// Apply attributes/props from VNode to the DOM Element:\r\n\tdiffAttributes(out, vnode.attributes, props);\r\n\r\n\r\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\r\n\tisSvgMode = prevSvgMode;\r\n\r\n\treturn out;\r\n}\r\n\r\n\r\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\r\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\r\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\r\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\r\n *\t@param {Boolean} mountAll\r\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\r\n */\r\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\r\n\tlet originalChildren = dom.childNodes,\r\n\t\tchildren = [],\r\n\t\tkeyed = {},\r\n\t\tkeyedLen = 0,\r\n\t\tmin = 0,\r\n\t\tlen = originalChildren.length,\r\n\t\tchildrenLen = 0,\r\n\t\tvlen = vchildren ? vchildren.length : 0,\r\n\t\tj, c, f, vchild, child;\r\n\r\n\t// Build up a map of keyed children and an Array of unkeyed children:\r\n\tif (len!==0) {\r\n\t\tfor (let i=0; i {\r\n\t\tif (typeof g2 === 'undefined') {\r\n\t\t\tg2 = '';\r\n\t\t}\r\n\r\n\t\t/* eslint-ignore-next-line */\r\n\t\tif (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\r\n\t\t\treturn g1 + g2 + g3;\r\n\t\t}\r\n\r\n\t\tlet appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\r\n\t\tlet prependClass = prefix + ' ' + g1.trim() + g2;\r\n\t\treturn appendClass + ',' + prependClass + g3;\r\n\t});\r\n\r\n\treturn css;\r\n}\r\n\r\nexport function addStyle(cssText, id) {\r\n\tid = id.toLowerCase();\r\n\tlet ele = document.getElementById(id);\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tif (ele && ele.parentNode === head) {\r\n\t\thead.removeChild(ele);\r\n\t}\r\n\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\tsomeThingStyles.setAttribute('id', id);\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nexport function addStyleWithoutId(cssText) {\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\n\r\nexport function addScopedAttr(vdom, style, attr, component) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tstyle = scoper(style, attr);\r\n\t\tif (style !== component._preStyle) {\r\n\t\t\taddStyle(style, attr);\r\n\t\t}\r\n\t} else if (style !== component._preStyle) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n\tcomponent._preStyle = style;\r\n}\r\n\r\nexport function addScopedAttrStatic(vdom, style, attr) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tif (!options.staticStyleRendered) {\r\n\t\t\taddStyle(scoper(style, attr), attr);\r\n\t\t}\r\n\t} else if (!options.staticStyleRendered) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n}\r\n\r\nexport function scopeVdom(attr,vdom){\r\n\tif (typeof vdom!== 'string'){\r\n\t\tvdom.attributes = vdom.attributes||{};\r\n\t\tvdom.attributes[attr] = '';\r\n\t\tvdom.children.forEach(child=>scopeVdom(attr,child));\r\n\t}\r\n}","import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';\r\nimport options from '../options';\r\nimport { extend } from '../util';\r\nimport { enqueueRender } from '../render-queue';\r\nimport { getNodeProps } from './index';\r\nimport { diff, mounts, diffLevel, flushMounts, recollectNodeTree, removeChildren } from './diff';\r\nimport { createComponent, collectComponent } from './component-recycler';\r\nimport { removeNode } from '../dom/index';\r\nimport {addScopedAttr, addScopedAttrStatic} from '../style';\r\n\r\n/** Set a component's `props` (generally derived from JSX attributes).\r\n *\t@param {Object} props\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\r\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\r\n */\r\nexport function setComponentProps(component, props, opts, context, mountAll) {\r\n\tif (component._disable) return;\r\n\tcomponent._disable = true;\r\n\r\n\tif ((component.__ref = props.ref)) delete props.ref;\r\n\tif ((component.__key = props.key)) delete props.key;\r\n\r\n\tif (!component.base || mountAll) {\r\n\t\tif (component.componentWillMount) component.componentWillMount();\r\n\t\tif (component.install) component.install();\r\n\t}\r\n\telse if (component.componentWillReceiveProps) {\r\n\t\tcomponent.componentWillReceiveProps(props, context);\r\n\t}\r\n\r\n\tif (context && context!==component.context) {\r\n\t\tif (!component.prevContext) component.prevContext = component.context;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tif (!component.prevProps) component.prevProps = component.props;\r\n\tcomponent.props = props;\r\n\r\n\tcomponent._disable = false;\r\n\r\n\tif (opts!==NO_RENDER) {\r\n\t\tif (opts===SYNC_RENDER || options.syncComponentUpdates!==false || !component.base) {\r\n\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tenqueueRender(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(component);\r\n}\r\n\r\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\r\n *\t@param {Component} component\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\r\n *\t@private\r\n */\r\nexport function renderComponent(component, opts, mountAll, isChild) {\r\n\tif (component._disable) return;\r\n\r\n\tlet props = component.props,\r\n\t\tstate = component.state,\r\n\t\tcontext = component.context,\r\n\t\tpreviousProps = component.prevProps || props,\r\n\t\tpreviousState = component.prevState || state,\r\n\t\tpreviousContext = component.prevContext || context,\r\n\t\tisUpdate = component.base,\r\n\t\tnextBase = component.nextBase,\r\n\t\tinitialBase = isUpdate || nextBase,\r\n\t\tinitialChildComponent = component._component,\r\n\t\tskip = false,\r\n\t\trendered, inst, cbase;\r\n\r\n\t// if updating\r\n\tif (isUpdate) {\r\n\t\tcomponent.props = previousProps;\r\n\t\tcomponent.state = previousState;\r\n\t\tcomponent.context = previousContext;\r\n\t\tif (opts!==FORCE_RENDER\r\n\t\t\t&& component.shouldComponentUpdate\r\n\t\t\t&& component.shouldComponentUpdate(props, state, context) === false) {\r\n\t\t\tskip = true;\r\n\t\t}\r\n\t\telse if (component.componentWillUpdate) {\r\n\t\t\tcomponent.componentWillUpdate(props, state, context);\r\n\t\t}\r\n\t\telse if (component.beforeUpdate) {\r\n\t\t\tcomponent.beforeUpdate(props, state, context);\r\n\t\t}\r\n\t\tcomponent.props = props;\r\n\t\tcomponent.state = state;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\r\n\tcomponent._dirty = false;\r\n\r\n\tif (!skip) {\r\n\t\trendered = component.render(props, state, context);\r\n\t\r\n\t\tif (component.style){\r\n\t\t\taddScopedAttr(rendered,component.style(),'_style_'+component._id,component);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (component.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,component.staticStyle(),'_style_'+component.constructor.name);\r\n\t\t}\r\n\r\n\t\t// context to pass to the child, can be updated via (grand-)parent component\r\n\t\tif (component.getChildContext) {\r\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\r\n\t\t}\r\n\r\n\t\tlet childComponent = rendered && rendered.nodeName,\r\n\t\t\ttoUnmount, base;\r\n\r\n\t\tif (typeof childComponent==='function') {\r\n\t\t\t// set up high order component link\r\n\r\n\t\t\tlet childProps = getNodeProps(rendered);\r\n\t\t\tinst = initialChildComponent;\r\n\r\n\t\t\tif (inst && inst.constructor===childComponent && childProps.key==inst.__key) {\r\n\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttoUnmount = inst;\r\n\r\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\r\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\r\n\t\t\t\tinst._parentComponent = component;\r\n\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\r\n\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\r\n\t\t\t}\r\n\r\n\t\t\tbase = inst.base;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcbase = initialBase;\r\n\r\n\t\t\t// destroy high order component link\r\n\t\t\ttoUnmount = initialChildComponent;\r\n\t\t\tif (toUnmount) {\r\n\t\t\t\tcbase = component._component = null;\r\n\t\t\t}\r\n\r\n\t\t\tif (initialBase || opts===SYNC_RENDER) {\r\n\t\t\t\tif (cbase) cbase._component = null;\r\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (initialBase && base!==initialBase && inst!==initialChildComponent) {\r\n\t\t\tlet baseParent = initialBase.parentNode;\r\n\t\t\tif (baseParent && base!==baseParent) {\r\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\r\n\r\n\t\t\t\tif (!toUnmount) {\r\n\t\t\t\t\tinitialBase._component = null;\r\n\t\t\t\t\trecollectNodeTree(initialBase, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (toUnmount) {\r\n\t\t\tunmountComponent(toUnmount);\r\n\t\t}\r\n\r\n\t\tcomponent.base = base;\r\n\t\tif (base && !isChild) {\r\n\t\t\tlet componentRef = component,\r\n\t\t\t\tt = component;\r\n\t\t\twhile ((t=t._parentComponent)) {\r\n\t\t\t\t(componentRef = t).base = base;\r\n\t\t\t}\r\n\t\t\tbase._component = componentRef;\r\n\t\t\tbase._componentConstructor = componentRef.constructor;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!isUpdate || mountAll) {\r\n\t\tmounts.unshift(component);\r\n\t}\r\n\telse if (!skip) {\r\n\t\t// Ensure that pending componentDidMount() hooks of child components\r\n\t\t// are called before the componentDidUpdate() hook in the parent.\r\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\r\n\t\t// flushMounts();\r\n\r\n\t\tif (component.componentDidUpdate) {\r\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (component.afterUpdate) {\r\n\t\t\tcomponent.afterUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (options.afterUpdate) options.afterUpdate(component);\r\n\t}\r\n\r\n\tif (component._renderCallbacks!=null) {\r\n\t\twhile (component._renderCallbacks.length) component._renderCallbacks.pop().call(component);\r\n\t}\r\n\r\n\tif (!diffLevel && !isChild) flushMounts();\r\n}\r\n\r\n\r\n\r\n/** Apply the Component referenced by a VNode to the DOM.\r\n *\t@param {Element} dom\tThe DOM node to mutate\r\n *\t@param {VNode} vnode\tA Component-referencing VNode\r\n *\t@returns {Element} dom\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function buildComponentFromVNode(dom, vnode, context, mountAll) {\r\n\tlet c = dom && dom._component,\r\n\t\toriginalComponent = c,\r\n\t\toldDom = dom,\r\n\t\tisDirectOwner = c && dom._componentConstructor===vnode.nodeName,\r\n\t\tisOwner = isDirectOwner,\r\n\t\tprops = getNodeProps(vnode);\r\n\twhile (c && !isOwner && (c=c._parentComponent)) {\r\n\t\tisOwner = c.constructor===vnode.nodeName;\r\n\t}\r\n\r\n\tif (c && isOwner && (!mountAll || c._component)) {\r\n\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\t}\r\n\telse {\r\n\t\tif (originalComponent && !isDirectOwner) {\r\n\t\t\tunmountComponent(originalComponent);\r\n\t\t\tdom = oldDom = null;\r\n\t\t}\r\n\r\n\t\tc = createComponent(vnode.nodeName, props, context);\r\n\t\tif (dom && !c.nextBase) {\r\n\t\t\tc.nextBase = dom;\r\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\r\n\t\t\toldDom = null;\r\n\t\t}\r\n\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\r\n\t\tif (oldDom && dom!==oldDom) {\r\n\t\t\toldDom._component = null;\r\n\t\t\trecollectNodeTree(oldDom, false);\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n\r\n\r\n/** Remove a component from the DOM and recycle it.\r\n *\t@param {Component} component\tThe Component instance to unmount\r\n *\t@private\r\n */\r\nexport function unmountComponent(component) {\r\n\tif (options.beforeUnmount) options.beforeUnmount(component);\r\n\r\n\tlet base = component.base;\r\n\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.componentWillUnmount) component.componentWillUnmount();\r\n\tif (component.uninstall) component.uninstall();\r\n\t\r\n\tcomponent.base = null;\r\n\r\n\t// recursively tear down & recollect high-order component children:\r\n\tlet inner = component._component;\r\n\tif (inner) {\r\n\t\tunmountComponent(inner);\r\n\t}\r\n\telse if (base) {\r\n\t\tif (base[ATTR_KEY] && base[ATTR_KEY].ref) base[ATTR_KEY].ref(null);\r\n\r\n\t\tcomponent.nextBase = base;\r\n\r\n\t\tremoveNode(base);\r\n\t\tcollectComponent(component);\r\n\r\n\t\tremoveChildren(base);\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(null);\r\n}\r\n","import { FORCE_RENDER } from './constants';\r\nimport { extend } from './util';\r\nimport { renderComponent } from './vdom/component';\r\nimport { enqueueRender } from './render-queue';\r\nimport options from './options';\r\n\r\nlet id = 0;\r\nfunction getId(){\r\n\treturn id++;\r\n}\r\n/** Base Component class.\r\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\r\n *\t@public\r\n *\r\n *\t@example\r\n *\tclass MyFoo extends Component {\r\n *\t\trender(props, state) {\r\n *\t\t\treturn ;\r\n *\t\t}\r\n *\t}\r\n */\r\nexport function Component(props, context) {\r\n\tthis._dirty = true;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.context = context;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.props = props;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.state = this.state || {};\r\n\r\n\tthis._id = getId();\r\n\r\n\tthis._preStyle = null;\r\n\r\n\tthis.$store = null;\r\n\r\n}\r\n\r\n\r\nextend(Component.prototype, {\r\n\r\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\r\n\t *\t@param {object} nextProps\r\n\t *\t@param {object} nextState\r\n\t *\t@param {object} nextContext\r\n\t *\t@returns {Boolean} should the component re-render\r\n\t *\t@name shouldComponentUpdate\r\n\t *\t@function\r\n\t */\r\n\r\n\r\n\t/** Update component state by copying properties from `state` to `this.state`.\r\n\t *\t@param {object} state\t\tA hash of state properties to update with new values\r\n\t *\t@param {function} callback\tA function to be called once component state is updated\r\n\t */\r\n\tsetState(state, callback) {\r\n\t\tlet s = this.state;\r\n\t\tif (!this.prevState) this.prevState = extend({}, s);\r\n\t\textend(s, typeof state==='function' ? state(s, this.props) : state);\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\tenqueueRender(this);\r\n\t},\r\n\r\n\r\n\t/** Immediately perform a synchronous re-render of the component.\r\n\t *\t@param {function} callback\t\tA function to be called after component is re-rendered.\r\n\t *\t@private\r\n\t */\r\n\tforceUpdate(callback) {\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\trenderComponent(this, FORCE_RENDER);\r\n\t\tif (options.componentChange) options.componentChange(this, this.base);\r\n\t},\r\n\r\n\tupdate(callback){\r\n\t\tthis.forceUpdate(callback);\r\n\t},\r\n\r\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n\t *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n\t *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\r\n\t *\t@param {object} state\t\tThe component's current state\r\n\t *\t@param {object} context\t\tContext object (if a parent component has provided context)\r\n\t *\t@returns VNode\r\n\t */\r\n\trender() {}\r\n\r\n});\r\n","import { diff } from './vdom/diff';\r\nimport { Component } from './component';\r\nimport options from './options';\r\nimport {addScopedAttr, addScopedAttrStatic} from './style';\r\n\r\nfunction isElement(obj) {\r\n\ttry {\r\n\t //Using W3 DOM2 (works for FF, Opera and Chrome)\r\n\t return obj instanceof HTMLElement;\r\n\t}\r\n\tcatch (e){\r\n\t //Browsers not supporting W3 DOM2 don't have HTMLElement and\r\n\t //an exception is thrown and we end up here. Testing some\r\n\t //properties that all elements have (works on IE7)\r\n\t return (typeof obj===\"object\") &&\r\n\t\t(obj.nodeType===1) && (typeof obj.style === \"object\") &&\r\n\t\t(typeof obj.ownerDocument ===\"object\");\r\n\t}\r\n}\r\n\r\n/** Render JSX into a `parent` Element.\r\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\r\n *\t@param {Element} parent\t\tDOM element to render into\r\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\r\n *\t@public\r\n *\r\n *\t@example\r\n *\t// render a div into :\r\n *\trender(hello!
, document.body);\r\n *\r\n *\t@example\r\n *\t// render a \"Thing\" component into #foo:\r\n *\tconst Thing = ({ name }) => { name };\r\n *\trender(, document.querySelector('#foo'));\r\n */\r\nexport function render(vnode, parent, merge) {\r\n\toptions.staticStyleRendered = false;\r\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent;\r\n\tif (merge === true){\r\n\t\twhile (parent.firstChild){\r\n\t\t\tparent.removeChild(parent.firstChild);\r\n\t\t}\r\n\t}\r\n\tconst m = isElement(merge) || merge === undefined;\r\n\tif (vnode instanceof Component) {\r\n\t\tif (window && window.Omi){\r\n\t\t\twindow.Omi.instances.push(vnode);\r\n\t\t}\r\n\t\tif (!m){\r\n\t\t\tvnode.$store = options.$store = merge;\r\n\t\t}\r\n\t\tif (vnode.componentWillMount) vnode.componentWillMount();\r\n\t\tif (vnode.install) vnode.install();\r\n\t\tconst rendered = vnode.render();\r\n\t\tif (vnode.style){\r\n\t\t\taddScopedAttr(rendered,vnode.style(),'_style_'+vnode._id,vnode);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (vnode.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,vnode.staticStyle(),'_style_'+vnode.constructor.name, !vnode.base);\r\n\t\t}\r\n\r\n\t\tvnode.base = diff(m ? merge : undefined, rendered, {}, false, parent, false);\r\n\t\t\r\n\t\tif (vnode.componentDidMount) vnode.componentDidMount();\r\n\t\tif (vnode.installed) vnode.installed();\r\n\t\toptions.staticStyleRendered = true;\r\n\t\treturn vnode.base;\r\n\t}\r\n\t\r\n\tlet result = diff(merge, vnode, {}, false, parent, false);\r\n\toptions.staticStyleRendered = true;\r\n\treturn result;\r\n}\r\n","/** Global options\r\n *\t@public\r\n *\t@namespace options {Object}\r\n */\r\nexport default {\r\n\r\n\tscopedStyle: true,\r\n\t$store: null,\r\n\tisWeb: true,\r\n\tstaticStyleRendered: false,\r\n\tdoc: typeof document === 'object' ? document : null\r\n\t//componentChange(component, element) { },\r\n\t/** If `true`, `prop` changes trigger synchronous component updates.\r\n\t *\t@name syncComponentUpdates\r\n\t *\t@type Boolean\r\n\t *\t@default true\r\n\t */\r\n\t//syncComponentUpdates: true,\r\n\r\n\t/** Processes all created VNodes.\r\n\t *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\r\n\t */\r\n\t//vnode(vnode) { }\r\n\r\n\t/** Hook invoked after a component is mounted. */\r\n\t//afterMount(component) { },\r\n\r\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\r\n\t//afterUpdate(component) { }\r\n\r\n\t/** Hook invoked immediately before a component is unmounted. */\r\n\t// beforeUnmount(component) { }\r\n};\r\n","import { h, h as createElement } from './h';\r\nimport { cloneElement } from './clone-element';\r\nimport { Component } from './component';\r\nimport { render } from './render';\r\nimport { rerender } from './render-queue';\r\nimport options from './options';\r\n\r\nfunction getGlobal() {\r\n\tif (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\r\n\t\tif (typeof self !== 'undefined') {\r\n\t\t\treturn self;\r\n\t\t} else if (typeof window !== 'undefined') {\r\n\t\t\treturn window;\r\n\t\t} else if (typeof global !== 'undefined') {\r\n\t\t\treturn global;\r\n\t\t}\r\n\t\treturn (function(){\r\n\t\t\treturn this;\r\n\t\t})();\r\n\t\t\r\n\t}\r\n\treturn global;\r\n}\r\n\r\nconst instances = [];\r\nconst root = getGlobal();\r\nroot.Omi = {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nroot.Omi.version = '3.0.0';\r\n\r\nexport default {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nexport {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n"]}
\ No newline at end of file
+{"version":3,"sources":["../src/vnode.js","../src/h.js","../src/util.js","../src/clone-element.js","../src/constants.js","../src/render-queue.js","../src/vdom/index.js","../src/dom/index.js","../src/vdom/diff.js","../src/vdom/component-recycler.js","../src/style.js","../src/vdom/component.js","../src/component.js","../src/render.js","../src/options.js","../src/omi.js"],"names":["VNode","nodeName","attributes","lastSimple","child","simple","i","children","EMPTY_CHILDREN","arguments","length","stack","push","pop","undefined","String","p","options","isWeb","map","value","key","vnode","extend","obj","props","cloneElement","h","slice","call","ATTR_KEY","component","debounceRendering","defer","rerender","items","element","base","_dirty","renderComponent","list","componentChange","hydrating","node","_componentConstructor","normalizedNodeName","toLowerCase","defaultProps","doc","createElementNS","createElement","_ref","createNode","match","a","b","cssTxt","isSvg","rule","properties","o","split","x","trim","s","replace","Array","isArray","Symbol","iterator","_ref3","next","done","_ref2","property","style","parseCSSText","cssText","parentNode","removeChild","setAccessor","name","old","className","IS_NON_DIMENSIONAL","test","oldJson","currentJson","changed","ckey","result","substring","setStyles","addEventListener","eventProxy","useCapture","removeEventListener","innerHTML","_listeners","setProperty","removeAttribute","ns","setAttribute","e","this","type","event","diffLevel","c","mounts","isSvgMode","afterMount","installed","diff","dom","context","mountAll","parent","componentRoot","ret","idiff","ownerSVGElement","out","prevSvgMode","_component","nodeValue","splitText","recollectNodeTree","document","vnodeName","buildComponentFromVNode","replaceChild","appendChild","vchildren","fc","innerDiffNode","isHydrating","j","originalChildren","keyed","keyedLen","childrenLen","vlen","_child","f","__key","vchild","min","nextSibling","removeNode","insertBefore","unmountOnly","removeChildren","previousSibling","attrs","collectComponent","components","Ctor","inst","constructor","render","Component","createComponent","prototype","Omi","nextBase","$store","splice","state","scoper","css","prefix","re","g0","g1","g2","g3","appendClass","addStyle","id","ele","head","getElementsByTagName","someThingStyles","getElementById","textContent","window","ActiveXObject","styleSheet","addStyleWithoutId","attr","scopeVdom","_preStyle","scopedStyle","vdom","staticStyleRendered","setComponentProps","opts","_disable","componentWillReceiveProps","enqueueRender","prevProps","isChild","previousProps","previousState","isUpdate","initialBase","initialChildComponent","previousContext","rendered","shouldComponentUpdate","skip","cbase","componentWillUpdate","beforeUpdate","FORCE_RENDER","prevContext","addScopedAttr","_id","addScopedAttrStatic","staticStyle","getChildContext","childComponent","childProps","getNodeProps","toUnmount","baseParent","SYNC_RENDER","componentRef","t","unshift","_parentComponent","afterUpdate","componentDidUpdate","_renderCallbacks","flushMounts","oldDom","originalComponent","isDirectOwner","isOwner","unmountComponent","beforeUnmount","componentWillUnmount","ref","merge","instances","m","firstChild","componentWillMount","isElement","install","componentDidMount","br","hr","h1","h2","h3","h4","h5","h6","abbr","address","bdi","bdo","blockquote","cite","code","del","ins","dfn","em","strong","samp","kbd","var","mark","pre","q","ruby","rp","rt","small","sub","sup","time","u","wbr","form","input","textarea","button","select","option","optgroup","label","fieldset","datalist","legend","output","iframe","img","canvas","figure","figcaption","audio","source","video","track","nav","link","ul","ol","li","dl","dt","dd","menu","command","table","caption","th","td","tr","thead","tbody","tfoot","col","colgroup","div","main","span","header","footer","section","article","aside","details","dialog","summary","progress","meter","meta","area","script","noscript","embed","object","param","view","scroll-view","swiper","icon","text","checkbox","radio","picker","picker-view","slider","switch","navigator","image","contact-button","block","usePromise","Promise","global","__config__","platform","systemVersion","resolve","then","bind","setTimeout","ASYNC_RENDER","forceUpdate","callback","update","root","Math","self","getGlobal","version","module","exports"],"mappings":";;IACO,SAASA;ICmLT,SAAWC,EAAAA,UAAUC;QAC3B,IAA6BC,YAAYC,OAAOC,QAAQC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AoO,WAAAA;QARDrF,QAAAA;;QAWAyN,SAASI;;;IAIR3U,IAFc,sBAEdA,QAFc4U,OAAAC,UAAA3N,UAAAuN,KAAAvN,MAAAA","file":"omi.js","sourcesContent":["/** Virtual DOM Node */\r\nexport function VNode() {}\r\n","import { VNode } from './vnode';\r\nimport options from './options';\r\n\r\n\r\nconst stack = [];\r\n\r\nconst EMPTY_CHILDREN = [];\r\n\r\nconst map = {\r\n\t'br': 'view',\r\n\t'hr': 'view',\r\n\r\n\t'p': 'view',\r\n\t'h1': 'view',\r\n\t'h2': 'view',\r\n\t'h3': 'view',\r\n\t'h4': 'view',\r\n\t'h5': 'view',\r\n\t'h6': 'view',\r\n\t'abbr': 'view',\r\n\t'address': 'view',\r\n\t'b': 'view',\r\n\t'bdi': 'view',\r\n\t'bdo': 'view',\r\n\t'blockquote': 'view',\r\n\t'cite': 'view',\r\n\t'code': 'view',\r\n\t'del': 'view',\r\n\t'ins': 'view',\r\n\t'dfn': 'view',\r\n\t'em': 'view',\r\n\t'strong': 'view',\r\n\t'samp': 'view',\r\n\t'kbd': 'view',\r\n\t'var': 'view',\r\n\t'i': 'view',\r\n\t'mark': 'view',\r\n\t'pre': 'view',\r\n\t'q': 'view',\r\n\t'ruby': 'view',\r\n\t'rp': 'view',\r\n\t'rt': 'view',\r\n\t's': 'view',\r\n\t'small': 'view',\r\n\t'sub': 'view',\r\n\t'sup': 'view',\r\n\t'time': 'view',\r\n\t'u': 'view',\r\n\t'wbr': 'view',\r\n\r\n\t'form': 'form',\r\n\t'input': 'input',\r\n\t'textarea': 'textarea',\r\n\t'button': 'button',\r\n\t'select': 'picker',\r\n\t'option': 'view',\r\n\t'optgroup': 'view',\r\n\t'label': 'label',\r\n\t'fieldset': 'view',\r\n\t'datalist': 'picker',\r\n\t'legend': 'view',\r\n\t'output': 'view',\r\n\r\n\t'iframe': 'view',\r\n \r\n\t'img': 'image',\r\n\t'canvas': 'canvas',\r\n\t'figure': 'view',\r\n\t'figcaption': 'view',\r\n\r\n \r\n\t'audio': 'audio',\r\n\t'source': 'audio',\r\n\t'video': 'video',\r\n\t'track': 'video',\r\n \r\n\t'a': 'navigator',\r\n\t'nav': 'view',\r\n\t'link': 'navigator',\r\n\r\n\t'ul': 'view',\r\n\t'ol': 'view',\r\n\t'li': 'view',\r\n\t'dl': 'view',\r\n\t'dt': 'view',\r\n\t'dd': 'view',\r\n\t'menu': 'view',\r\n\t'command': 'view',\r\n\r\n\r\n\t'table': 'view',\r\n\t'caption': 'view',\r\n\t'th': 'view',\r\n\t'td': 'view',\r\n\t'tr': 'view',\r\n\t'thead': 'view',\r\n\t'tbody': 'view',\r\n\t'tfoot': 'view',\r\n\t'col': 'view',\r\n\t'colgroup': 'view',\r\n\r\n\r\n\t'div': 'view',\r\n\t'main': 'view',\r\n\t//'span': 'label',\r\n\t'span': 'text',\r\n\t'header': 'view',\r\n\t'footer': 'view',\r\n\t'section': 'view',\r\n\t'article': 'view',\r\n\t'aside': 'view',\r\n\t'details': 'view',\r\n\t'dialog': 'view',\r\n\t'summary': 'view',\r\n\r\n\t'progress': 'progress',\r\n\t'meter': 'progress',\r\n\t'head': 'view',\r\n\t'meta': 'view',\r\n\t'base': 'text',\r\n\t'map': 'map',\r\n\t'area': 'navigator',\r\n\r\n\t'script': 'view',\r\n\t'noscript': 'view',\r\n\t'embed': 'view',\r\n\t'object': 'view',\r\n\t'param': 'view',\r\n\r\n\t'view': 'view',\r\n\t'scroll-view': 'scroll-view',\r\n\t'swiper': 'swiper',\r\n\t'icon': 'icon',\r\n\t'text': 'text',\r\n\r\n\t\r\n\r\n\r\n\t'checkbox': 'checkbox',\r\n\t'radio': 'radio',\r\n\t'picker': 'picker',\r\n\t'picker-view': 'picker-view',\r\n\t'slider': 'slider',\r\n\t'switch': 'switch',\r\n\t'navigator': 'navigator',\r\n\t\r\n\t'image': 'image',\r\n\t'contact-button': 'contact-button',\r\n\t'block': 'block'\r\n};\r\n\r\n\r\n/**\r\n * JSX/hyperscript reviver.\r\n * @see http://jasonformat.com/wtf-is-jsx\r\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\r\n *\r\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\r\n *\r\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\r\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\r\n * the current _actual_ DOM structure, and applying only the differences.\r\n *\r\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\r\n * and optionally children to append to the element.\r\n *\r\n * @example The following DOM tree\r\n *\r\n * `Hello!
`\r\n *\r\n * can be constructed using this function as:\r\n *\r\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\r\n *\r\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\r\n * @param {Object} attributes\tAny attributes/props to set on the created element.\r\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\r\n *\r\n * @public\r\n */\r\nexport function h(nodeName, attributes) {\r\n\tlet children=EMPTY_CHILDREN, lastSimple, child, simple, i;\r\n\tfor (i=arguments.length; i-- > 2; ) {\r\n\t\tstack.push(arguments[i]);\r\n\t}\r\n\tif (attributes && attributes.children!=null) {\r\n\t\tif (!stack.length) stack.push(attributes.children);\r\n\t\tdelete attributes.children;\r\n\t}\r\n\twhile (stack.length) {\r\n\t\tif ((child = stack.pop()) && child.pop!==undefined) {\r\n\t\t\tfor (i=child.length; i--; ) stack.push(child[i]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (typeof child==='boolean') child = null;\r\n\r\n\t\t\tif ((simple = typeof nodeName!=='function')) {\r\n\t\t\t\tif (child==null) child = '';\r\n\t\t\t\telse if (typeof child==='number') child = String(child);\r\n\t\t\t\telse if (typeof child!=='string') simple = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (simple && lastSimple) {\r\n\t\t\t\tchildren[children.length-1] += child;\r\n\t\t\t}\r\n\t\t\telse if (children===EMPTY_CHILDREN) {\r\n\t\t\t\tchildren = [child];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tchildren.push(child);\r\n\t\t\t}\r\n\r\n\t\t\tlastSimple = simple;\r\n\t\t}\r\n\t}\r\n\r\n\tlet p = new VNode();\r\n\tp.nodeName = options.isWeb?nodeName:map[nodeName];\r\n\tp.attributes = attributes == null ? undefined : attributes;\r\n\tif (children && typeof children[0] === 'string'&& !options.isWeb) {\r\n\t\tif (p.attributes) {\r\n\t\t\tp.attributes.value = children[0];\r\n\t\t} else {\r\n\t\t\tp.attributes = { value: children[0] };\r\n\t\t}\r\n\t} else {\r\n\t\tp.children = children;\r\n\t}\r\n\tp.key = attributes==null ? undefined : attributes.key;\r\n\r\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\r\n\tif (options.vnode!==undefined) options.vnode(p);\r\n\r\n\treturn p;\r\n}\r\n","/**\r\n * Copy all properties from `props` onto `obj`.\r\n * @param {Object} obj\t\tObject onto which properties should be copied.\r\n * @param {Object} props\tObject from which to copy properties.\r\n * @returns obj\r\n * @private\r\n */\r\nexport function extend(obj, props) {\r\n\tfor (let i in props) obj[i] = props[i];\r\n\treturn obj;\r\n}\r\n\r\n/**\r\n * Call a function asynchronously, as soon as possible. Makes\r\n * use of HTML Promise to schedule the callback if available,\r\n * otherwise falling back to `setTimeout` (mainly for IE<11).\r\n *\r\n * @param {Function} callback\r\n */\r\n\r\nlet usePromise = typeof Promise == 'function';\r\n\r\n// for native\r\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\r\n\tif (global.__config__.platform === 'android') {\r\n\t\tusePromise = true;\r\n\t} else {\r\n\t\tlet systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\r\n\t\tif (systemVersion > 8) {\r\n\t\t\tusePromise = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\r\n","import { extend } from './util';\r\nimport { h } from './h';\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\r\n * @param {Object} props\tAttributes/props to add when cloning\r\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\r\n */\r\nexport function cloneElement(vnode, props) {\r\n\treturn h(\r\n\t\tvnode.nodeName,\r\n\t\textend(extend({}, vnode.attributes), props),\r\n\t\targuments.length>2 ? [].slice.call(arguments, 2) : vnode.children\r\n\t);\r\n}\r\n","// render modes\r\n\r\nexport const NO_RENDER = 0;\r\nexport const SYNC_RENDER = 1;\r\nexport const FORCE_RENDER = 2;\r\nexport const ASYNC_RENDER = 3;\r\n\r\n\r\nexport const ATTR_KEY = '__preactattr_';\r\n\r\n// DOM properties that should NOT have \"px\" added when numeric\r\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\r\n\r\n","import options from './options';\r\nimport { defer } from './util';\r\nimport { renderComponent } from './vdom/component';\r\n\r\n/** Managed queue of dirty components to be re-rendered */\r\n\r\nlet items = [];\r\n\r\nexport function enqueueRender(component) {\r\n\tif (!component._dirty && (component._dirty = true) && items.push(component)==1) {\r\n\t\t(options.debounceRendering || defer)(rerender);\r\n\t}\r\n}\r\n\r\nexport function rerender() {\r\n\tlet p, list = items;\r\n\titems = [];\r\n\tlet element;\r\n\twhile ( (p = list.pop()) ) {\r\n\t\telement = p.base;\r\n\t\tif (p._dirty) renderComponent(p);\r\n\t}\r\n\tif (!list.length) {\r\n\t\tif (options.componentChange) options.componentChange(p, element);\r\n\t}\r\n}\r\n","import { extend } from '../util';\r\n\r\n\r\n/**\r\n * Check if two nodes are equivalent.\r\n *\r\n * @param {Node} node\t\t\tDOM Node to compare\r\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\r\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\r\n * @private\r\n */\r\nexport function isSameNodeType(node, vnode, hydrating) {\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\t\treturn node.splitText!==undefined;\r\n\t}\r\n\tif (typeof vnode.nodeName==='string') {\r\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\r\n\t}\r\n\treturn hydrating || node._componentConstructor===vnode.nodeName;\r\n}\r\n\r\n\r\n/**\r\n * Check if an Element has a given nodeName, case-insensitively.\r\n *\r\n * @param {Element} node\tA DOM Element to inspect the name of.\r\n * @param {String} nodeName\tUnnormalized name to compare against.\r\n */\r\nexport function isNamedNode(node, nodeName) {\r\n\treturn node.normalizedNodeName===nodeName || node.nodeName.toLowerCase()===nodeName.toLowerCase();\r\n}\r\n\r\n\r\n/**\r\n * Reconstruct Component-style `props` from a VNode.\r\n * Ensures default/fallback values from `defaultProps`:\r\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\r\n *\r\n * @param {VNode} vnode\r\n * @returns {Object} props\r\n */\r\nexport function getNodeProps(vnode) {\r\n\tlet props = extend({}, vnode.attributes);\r\n\tprops.children = vnode.children;\r\n\r\n\tlet defaultProps = vnode.nodeName.defaultProps;\r\n\tif (defaultProps!==undefined) {\r\n\t\tfor (let i in defaultProps) {\r\n\t\t\tif (props[i]===undefined) {\r\n\t\t\t\tprops[i] = defaultProps[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn props;\r\n}\r\n","import { IS_NON_DIMENSIONAL } from '../constants';\r\nimport options from '../options';\r\n\r\n\r\n/** Create an element with the given nodeName.\r\n *\t@param {String} nodeName\r\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\r\n *\t@returns {Element} node\r\n */\r\nexport function createNode(nodeName, isSvg) {\r\n\tlet node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\r\n\tnode.normalizedNodeName = nodeName;\r\n\treturn node;\r\n}\r\n\r\nfunction parseCSSText(cssText) {\r\n\tlet cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\r\n\tlet style = {}, [a,b,rule] = cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt];\r\n\tlet cssToJs = s => s.replace(/\\W+\\w/g, match => match.slice(-1).toUpperCase());\r\n\tlet properties = rule.split(\";\").map(o => o.split(\":\").map(x => x && x.trim()));\r\n\tfor (let [property, value] of properties) style[cssToJs(property)] = value;\r\n\treturn style;\r\n}\r\n\r\n/** Remove a child node from its parent if attached.\r\n *\t@param {Element} node\t\tThe node to remove\r\n */\r\nexport function removeNode(node) {\r\n\tlet parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\n\r\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\r\n *\tIf `value` is `null`, the attribute/handler will be removed.\r\n *\t@param {Element} node\tAn element to mutate\r\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\r\n *\t@param {any} old\tThe last value that was set for this name/node pair\r\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\r\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\r\n *\t@private\r\n */\r\nexport function setAccessor(node, name, old, value, isSvg) {\r\n\tif (name==='className') name = 'class';\r\n\r\n\r\n\tif (name==='key') {\r\n\t\t// ignore\r\n\t}\r\n\telse if (name==='ref') {\r\n\t\tif (old) old(null);\r\n\t\tif (value) value(node);\r\n\t}\r\n\telse if (name==='class' && !isSvg) {\r\n\t\tnode.className = value || '';\r\n\t}\r\n\telse if (name==='style') {\r\n\t\tif (options.isWeb) {\r\n\t\t\tif (!value || typeof value==='string' || typeof old==='string') {\r\n\t\t\t\tnode.style.cssText = value || '';\r\n\t\t\t}\r\n\t\t\tif (value && typeof value==='object') {\r\n\t\t\t\tif (typeof old!=='string') {\r\n\t\t\t\t\tfor (let i in old) if (!(i in value)) node.style[i] = '';\r\n\t\t\t\t}\r\n\t\t\t\tfor (let i in value) {\r\n\t\t\t\t\tnode.style[i] = typeof value[i]==='number' && IS_NON_DIMENSIONAL.test(i)===false ? (value[i]+'px') : value[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet oldJson = old,\r\n\t\t\t\tcurrentJson = value;\r\n\t\t\tif (typeof old === 'string') {\r\n\t\t\t\toldJson = parseCSSText(old);\r\n\t\t\t}\r\n\t\t\tif (typeof value == 'string') {\r\n\t\t\t\tcurrentJson = parseCSSText(value);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlet result = {},\r\n\t\t\t\tchanged = false;\r\n\t\t\r\n\t\t\tif (oldJson) {\r\n\t\t\t\tfor (let key in oldJson) {\r\n\t\t\t\t\tif (typeof currentJson == 'object' && !(key in currentJson)) {\r\n\t\t\t\t\t\tresult[key] = '';\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tfor (let ckey in currentJson) {\r\n\t\t\t\t\tif (currentJson[ckey] !== oldJson[ckey]) {\r\n\t\t\t\t\t\tresult[ckey] = currentJson[ckey];\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tif (changed) {\r\n\t\t\t\t\tnode.setStyles(result);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnode.setStyles(currentJson);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse if (name==='dangerouslySetInnerHTML') {\r\n\t\tif (value) node.innerHTML = value.__html || '';\r\n\t}\r\n\telse if (name[0]=='o' && name[1]=='n') {\r\n\t\tlet useCapture = name !== (name=name.replace(/Capture$/, ''));\r\n\t\tname = name.toLowerCase().substring(2);\r\n\t\tif (value) {\r\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\r\n\t}\r\n\telse if (name!=='list' && name!=='type' && !isSvg && name in node) {\r\n\t\tsetProperty(node, name, value==null ? '' : value);\r\n\t\tif (value==null || value===false) node.removeAttribute(name);\r\n\t}\r\n\telse {\r\n\t\tlet ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));\r\n\t\tif (value==null || value===false) {\r\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());\r\n\t\t\telse node.removeAttribute(name);\r\n\t\t}\r\n\t\telse if (typeof value!=='function') {\r\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\r\n\t\t\telse node.setAttribute(name, value);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/** Attempt to set a DOM property to the given value.\r\n *\tIE & FF throw for certain property-value combinations.\r\n */\r\nfunction setProperty(node, name, value) {\r\n\ttry {\r\n\t\tnode[name] = value;\r\n\t} catch (e) { }\r\n}\r\n\r\n\r\n/** Proxy an event to hooked event handlers\r\n *\t@private\r\n */\r\nfunction eventProxy(e) {\r\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\r\n}\r\n","import { ATTR_KEY } from '../constants';\r\nimport { isSameNodeType, isNamedNode } from './index';\r\nimport { buildComponentFromVNode } from './component';\r\nimport { createNode, setAccessor } from '../dom/index';\r\nimport { unmountComponent } from './component';\r\nimport options from '../options';\r\nimport { removeNode } from '../dom/index';\r\n\r\n/** Queue of components that have been mounted and are awaiting componentDidMount */\r\nexport const mounts = [];\r\n\r\n/** Diff recursion count, used to track the end of the diff cycle. */\r\nexport let diffLevel = 0;\r\n\r\n/** Global flag indicating if the diff is currently within an SVG */\r\nlet isSvgMode = false;\r\n\r\n/** Global flag indicating if the diff is performing hydration */\r\nlet hydrating = false;\r\n\r\n/** Invoke queued componentDidMount lifecycle methods */\r\nexport function flushMounts() {\r\n\tlet c;\r\n\twhile ((c=mounts.pop())) {\r\n\t\tif (options.afterMount) options.afterMount(c);\r\n\t\tif (c.componentDidMount) c.componentDidMount();\r\n\t\tif (c.installed) c.installed();\r\n\t}\r\n}\r\n\r\n\r\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\r\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\r\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\r\n *\t@returns {Element} dom\t\t\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function diff(dom, vnode, context, mountAll, parent, componentRoot) {\r\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\r\n\tif (!diffLevel++) {\r\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\r\n\t\tisSvgMode = parent!=null && parent.ownerSVGElement!==undefined;\r\n\r\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\r\n\t\thydrating = dom!=null && !(ATTR_KEY in dom);\r\n\t}\r\n\r\n\tlet ret = idiff(dom, vnode, context, mountAll, componentRoot);\r\n\r\n\t// append the element if its a new parent\r\n\tif (parent && ret.parentNode!==parent) parent.appendChild(ret);\r\n\r\n\t// diffLevel being reduced to 0 means we're exiting the diff\r\n\tif (!--diffLevel) {\r\n\t\thydrating = false;\r\n\t\t// invoke queued componentDidMount lifecycle methods\r\n\t\tif (!componentRoot) flushMounts();\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\r\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\r\n\tlet out = dom,\r\n\t\tprevSvgMode = isSvgMode;\r\n\r\n\t// empty values (null, undefined, booleans) render as empty Text nodes\r\n\tif (vnode==null || typeof vnode==='boolean') vnode = '';\r\n\r\n\r\n\t// Fast case: Strings & Numbers create/update Text nodes.\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\r\n\t\t// update if it's already a Text node:\r\n\t\tif (dom && dom.splitText!==undefined && dom.parentNode && (!dom._component || componentRoot)) {\r\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\r\n\t\t\tif (dom.nodeValue!=vnode) {\r\n\t\t\t\tdom.nodeValue = vnode;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\r\n\t\t\tout = document.createTextNode(vnode);\r\n\t\t\tif (dom) {\r\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\t\t\t\trecollectNodeTree(dom, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout[ATTR_KEY] = true;\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\r\n\t// If the VNode represents a Component, perform a component diff:\r\n\tlet vnodeName = vnode.nodeName;\r\n\tif (typeof vnodeName==='function') {\r\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\r\n\t}\r\n\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tisSvgMode = vnodeName==='svg' ? true : vnodeName==='foreignObject' ? false : isSvgMode;\r\n\r\n\r\n\t// If there's no existing element or it's the wrong type, create a new one:\r\n\tvnodeName = String(vnodeName);\r\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\r\n\t\tout = createNode(vnodeName, isSvgMode);\r\n\r\n\t\tif (dom) {\r\n\t\t\t// move children into the replacement node\r\n\t\t\twhile (dom.firstChild) out.appendChild(dom.firstChild);\r\n\r\n\t\t\t// if the previous Element was mounted into the DOM, replace it inline\r\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\r\n\t\t\t// recycle the old element (skips non-Element node types)\r\n\t\t\trecollectNodeTree(dom, true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tlet fc = out.firstChild,\r\n\t\tprops = out[ATTR_KEY],\r\n\t\tvchildren = vnode.children;\r\n\r\n\tif (props==null) {\r\n\t\tprops = out[ATTR_KEY] = {};\r\n\t\tfor (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;\r\n\t}\r\n\r\n\t// Optimization: fast-path for elements containing a single TextNode:\r\n\tif (!hydrating && vchildren && vchildren.length===1 && typeof vchildren[0]==='string' && fc!=null && fc.splitText!==undefined && fc.nextSibling==null) {\r\n\t\tif (fc.nodeValue!=vchildren[0]) {\r\n\t\t\tfc.nodeValue = vchildren[0];\r\n\t\t}\r\n\t}\r\n\t// otherwise, if there are existing or new children, diff them:\r\n\telse if (vchildren && vchildren.length || fc!=null) {\r\n\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML!=null);\r\n\t}\r\n\r\n\r\n\t// Apply attributes/props from VNode to the DOM Element:\r\n\tdiffAttributes(out, vnode.attributes, props);\r\n\r\n\r\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\r\n\tisSvgMode = prevSvgMode;\r\n\r\n\treturn out;\r\n}\r\n\r\n\r\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\r\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\r\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\r\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\r\n *\t@param {Boolean} mountAll\r\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\r\n */\r\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\r\n\tlet originalChildren = dom.childNodes,\r\n\t\tchildren = [],\r\n\t\tkeyed = {},\r\n\t\tkeyedLen = 0,\r\n\t\tmin = 0,\r\n\t\tlen = originalChildren.length,\r\n\t\tchildrenLen = 0,\r\n\t\tvlen = vchildren ? vchildren.length : 0,\r\n\t\tj, c, f, vchild, child;\r\n\r\n\t// Build up a map of keyed children and an Array of unkeyed children:\r\n\tif (len!==0) {\r\n\t\tfor (let i=0; i {\r\n\t\tif (typeof g2 === 'undefined') {\r\n\t\t\tg2 = '';\r\n\t\t}\r\n\r\n\t\t/* eslint-ignore-next-line */\r\n\t\tif (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\r\n\t\t\treturn g1 + g2 + g3;\r\n\t\t}\r\n\r\n\t\tlet appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\r\n\t\t//let prependClass = prefix + ' ' + g1.trim() + g2;\r\n\r\n\t\treturn appendClass + g3;\r\n\t\t//return appendClass + ',' + prependClass + g3;\r\n\t});\r\n\r\n\treturn css;\r\n}\r\n\r\nexport function addStyle(cssText, id) {\r\n\tid = id.toLowerCase();\r\n\tlet ele = document.getElementById(id);\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tif (ele && ele.parentNode === head) {\r\n\t\thead.removeChild(ele);\r\n\t}\r\n\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\tsomeThingStyles.setAttribute('id', id);\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nexport function addStyleWithoutId(cssText) {\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\n\r\nexport function addScopedAttr(vdom, style, attr, component) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tstyle = scoper(style, attr);\r\n\t\tif (style !== component._preStyle) {\r\n\t\t\taddStyle(style, attr);\r\n\t\t}\r\n\t} else if (style !== component._preStyle) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n\tcomponent._preStyle = style;\r\n}\r\n\r\nexport function addScopedAttrStatic(vdom, style, attr) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tif (!options.staticStyleRendered) {\r\n\t\t\taddStyle(scoper(style, attr), attr);\r\n\t\t}\r\n\t} else if (!options.staticStyleRendered) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n}\r\n\r\nexport function scopeVdom(attr,vdom){\r\n\tif (typeof vdom!== 'string'){\r\n\t\tvdom.attributes = vdom.attributes||{};\r\n\t\tvdom.attributes[attr] = '';\r\n\t\tvdom.children.forEach(child=>scopeVdom(attr,child));\r\n\t}\r\n}","import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';\r\nimport options from '../options';\r\nimport { extend } from '../util';\r\nimport { enqueueRender } from '../render-queue';\r\nimport { getNodeProps } from './index';\r\nimport { diff, mounts, diffLevel, flushMounts, recollectNodeTree, removeChildren } from './diff';\r\nimport { createComponent, collectComponent } from './component-recycler';\r\nimport { removeNode } from '../dom/index';\r\nimport {addScopedAttr, addScopedAttrStatic} from '../style';\r\n\r\n/** Set a component's `props` (generally derived from JSX attributes).\r\n *\t@param {Object} props\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\r\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\r\n */\r\nexport function setComponentProps(component, props, opts, context, mountAll) {\r\n\tif (component._disable) return;\r\n\tcomponent._disable = true;\r\n\r\n\tif ((component.__ref = props.ref)) delete props.ref;\r\n\tif ((component.__key = props.key)) delete props.key;\r\n\r\n\tif (!component.base || mountAll) {\r\n\t\tif (component.componentWillMount) component.componentWillMount();\r\n\t\tif (component.install) component.install();\r\n\t}\r\n\telse if (component.componentWillReceiveProps) {\r\n\t\tcomponent.componentWillReceiveProps(props, context);\r\n\t}\r\n\r\n\tif (context && context!==component.context) {\r\n\t\tif (!component.prevContext) component.prevContext = component.context;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tif (!component.prevProps) component.prevProps = component.props;\r\n\tcomponent.props = props;\r\n\r\n\tcomponent._disable = false;\r\n\r\n\tif (opts!==NO_RENDER) {\r\n\t\tif (opts===SYNC_RENDER || options.syncComponentUpdates!==false || !component.base) {\r\n\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tenqueueRender(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(component);\r\n}\r\n\r\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\r\n *\t@param {Component} component\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\r\n *\t@private\r\n */\r\nexport function renderComponent(component, opts, mountAll, isChild) {\r\n\tif (component._disable) return;\r\n\r\n\tlet props = component.props,\r\n\t\tstate = component.state,\r\n\t\tcontext = component.context,\r\n\t\tpreviousProps = component.prevProps || props,\r\n\t\tpreviousState = component.prevState || state,\r\n\t\tpreviousContext = component.prevContext || context,\r\n\t\tisUpdate = component.base,\r\n\t\tnextBase = component.nextBase,\r\n\t\tinitialBase = isUpdate || nextBase,\r\n\t\tinitialChildComponent = component._component,\r\n\t\tskip = false,\r\n\t\trendered, inst, cbase;\r\n\r\n\t// if updating\r\n\tif (isUpdate) {\r\n\t\tcomponent.props = previousProps;\r\n\t\tcomponent.state = previousState;\r\n\t\tcomponent.context = previousContext;\r\n\t\tif (opts!==FORCE_RENDER\r\n\t\t\t&& component.shouldComponentUpdate\r\n\t\t\t&& component.shouldComponentUpdate(props, state, context) === false) {\r\n\t\t\tskip = true;\r\n\t\t}\r\n\t\telse if (component.componentWillUpdate) {\r\n\t\t\tcomponent.componentWillUpdate(props, state, context);\r\n\t\t}\r\n\t\telse if (component.beforeUpdate) {\r\n\t\t\tcomponent.beforeUpdate(props, state, context);\r\n\t\t}\r\n\t\tcomponent.props = props;\r\n\t\tcomponent.state = state;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\r\n\tcomponent._dirty = false;\r\n\r\n\tif (!skip) {\r\n\t\trendered = component.render(props, state, context);\r\n\t\r\n\t\tif (component.style){\r\n\t\t\taddScopedAttr(rendered,component.style(),'_style_'+component._id,component);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (component.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,component.staticStyle(),'_style_'+component.constructor.name);\r\n\t\t}\r\n\r\n\t\t// context to pass to the child, can be updated via (grand-)parent component\r\n\t\tif (component.getChildContext) {\r\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\r\n\t\t}\r\n\r\n\t\tlet childComponent = rendered && rendered.nodeName,\r\n\t\t\ttoUnmount, base;\r\n\r\n\t\tif (typeof childComponent==='function') {\r\n\t\t\t// set up high order component link\r\n\r\n\t\t\tlet childProps = getNodeProps(rendered);\r\n\t\t\tinst = initialChildComponent;\r\n\r\n\t\t\tif (inst && inst.constructor===childComponent && childProps.key==inst.__key) {\r\n\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttoUnmount = inst;\r\n\r\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\r\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\r\n\t\t\t\tinst._parentComponent = component;\r\n\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\r\n\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\r\n\t\t\t}\r\n\r\n\t\t\tbase = inst.base;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcbase = initialBase;\r\n\r\n\t\t\t// destroy high order component link\r\n\t\t\ttoUnmount = initialChildComponent;\r\n\t\t\tif (toUnmount) {\r\n\t\t\t\tcbase = component._component = null;\r\n\t\t\t}\r\n\r\n\t\t\tif (initialBase || opts===SYNC_RENDER) {\r\n\t\t\t\tif (cbase) cbase._component = null;\r\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (initialBase && base!==initialBase && inst!==initialChildComponent) {\r\n\t\t\tlet baseParent = initialBase.parentNode;\r\n\t\t\tif (baseParent && base!==baseParent) {\r\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\r\n\r\n\t\t\t\tif (!toUnmount) {\r\n\t\t\t\t\tinitialBase._component = null;\r\n\t\t\t\t\trecollectNodeTree(initialBase, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (toUnmount) {\r\n\t\t\tunmountComponent(toUnmount);\r\n\t\t}\r\n\r\n\t\tcomponent.base = base;\r\n\t\tif (base && !isChild) {\r\n\t\t\tlet componentRef = component,\r\n\t\t\t\tt = component;\r\n\t\t\twhile ((t=t._parentComponent)) {\r\n\t\t\t\t(componentRef = t).base = base;\r\n\t\t\t}\r\n\t\t\tbase._component = componentRef;\r\n\t\t\tbase._componentConstructor = componentRef.constructor;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!isUpdate || mountAll) {\r\n\t\tmounts.unshift(component);\r\n\t}\r\n\telse if (!skip) {\r\n\t\t// Ensure that pending componentDidMount() hooks of child components\r\n\t\t// are called before the componentDidUpdate() hook in the parent.\r\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\r\n\t\t// flushMounts();\r\n\r\n\t\tif (component.componentDidUpdate) {\r\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (component.afterUpdate) {\r\n\t\t\tcomponent.afterUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (options.afterUpdate) options.afterUpdate(component);\r\n\t}\r\n\r\n\tif (component._renderCallbacks!=null) {\r\n\t\twhile (component._renderCallbacks.length) component._renderCallbacks.pop().call(component);\r\n\t}\r\n\r\n\tif (!diffLevel && !isChild) flushMounts();\r\n}\r\n\r\n\r\n\r\n/** Apply the Component referenced by a VNode to the DOM.\r\n *\t@param {Element} dom\tThe DOM node to mutate\r\n *\t@param {VNode} vnode\tA Component-referencing VNode\r\n *\t@returns {Element} dom\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function buildComponentFromVNode(dom, vnode, context, mountAll) {\r\n\tlet c = dom && dom._component,\r\n\t\toriginalComponent = c,\r\n\t\toldDom = dom,\r\n\t\tisDirectOwner = c && dom._componentConstructor===vnode.nodeName,\r\n\t\tisOwner = isDirectOwner,\r\n\t\tprops = getNodeProps(vnode);\r\n\twhile (c && !isOwner && (c=c._parentComponent)) {\r\n\t\tisOwner = c.constructor===vnode.nodeName;\r\n\t}\r\n\r\n\tif (c && isOwner && (!mountAll || c._component)) {\r\n\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\t}\r\n\telse {\r\n\t\tif (originalComponent && !isDirectOwner) {\r\n\t\t\tunmountComponent(originalComponent);\r\n\t\t\tdom = oldDom = null;\r\n\t\t}\r\n\r\n\t\tc = createComponent(vnode.nodeName, props, context);\r\n\t\tif (dom && !c.nextBase) {\r\n\t\t\tc.nextBase = dom;\r\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\r\n\t\t\toldDom = null;\r\n\t\t}\r\n\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\r\n\t\tif (oldDom && dom!==oldDom) {\r\n\t\t\toldDom._component = null;\r\n\t\t\trecollectNodeTree(oldDom, false);\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n\r\n\r\n/** Remove a component from the DOM and recycle it.\r\n *\t@param {Component} component\tThe Component instance to unmount\r\n *\t@private\r\n */\r\nexport function unmountComponent(component) {\r\n\tif (options.beforeUnmount) options.beforeUnmount(component);\r\n\r\n\tlet base = component.base;\r\n\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.componentWillUnmount) component.componentWillUnmount();\r\n\tif (component.uninstall) component.uninstall();\r\n\t\r\n\tcomponent.base = null;\r\n\r\n\t// recursively tear down & recollect high-order component children:\r\n\tlet inner = component._component;\r\n\tif (inner) {\r\n\t\tunmountComponent(inner);\r\n\t}\r\n\telse if (base) {\r\n\t\tif (base[ATTR_KEY] && base[ATTR_KEY].ref) base[ATTR_KEY].ref(null);\r\n\r\n\t\tcomponent.nextBase = base;\r\n\r\n\t\tremoveNode(base);\r\n\t\tcollectComponent(component);\r\n\r\n\t\tremoveChildren(base);\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(null);\r\n}\r\n","import { FORCE_RENDER } from './constants';\r\nimport { extend } from './util';\r\nimport { renderComponent } from './vdom/component';\r\nimport { enqueueRender } from './render-queue';\r\nimport options from './options';\r\n\r\nlet id = 0;\r\nfunction getId(){\r\n\treturn id++;\r\n}\r\n/** Base Component class.\r\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\r\n *\t@public\r\n *\r\n *\t@example\r\n *\tclass MyFoo extends Component {\r\n *\t\trender(props, state) {\r\n *\t\t\treturn ;\r\n *\t\t}\r\n *\t}\r\n */\r\nexport function Component(props, context) {\r\n\tthis._dirty = true;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.context = context;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.props = props;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.state = this.state || {};\r\n\r\n\tthis._id = getId();\r\n\r\n\tthis._preStyle = null;\r\n\r\n\tthis.$store = null;\r\n\r\n}\r\n\r\n\r\nextend(Component.prototype, {\r\n\r\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\r\n\t *\t@param {object} nextProps\r\n\t *\t@param {object} nextState\r\n\t *\t@param {object} nextContext\r\n\t *\t@returns {Boolean} should the component re-render\r\n\t *\t@name shouldComponentUpdate\r\n\t *\t@function\r\n\t */\r\n\r\n\r\n\t/** Update component state by copying properties from `state` to `this.state`.\r\n\t *\t@param {object} state\t\tA hash of state properties to update with new values\r\n\t *\t@param {function} callback\tA function to be called once component state is updated\r\n\t */\r\n\tsetState(state, callback) {\r\n\t\tlet s = this.state;\r\n\t\tif (!this.prevState) this.prevState = extend({}, s);\r\n\t\textend(s, typeof state==='function' ? state(s, this.props) : state);\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\tenqueueRender(this);\r\n\t},\r\n\r\n\r\n\t/** Immediately perform a synchronous re-render of the component.\r\n\t *\t@param {function} callback\t\tA function to be called after component is re-rendered.\r\n\t *\t@private\r\n\t */\r\n\tforceUpdate(callback) {\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\trenderComponent(this, FORCE_RENDER);\r\n\t\tif (options.componentChange) options.componentChange(this, this.base);\r\n\t},\r\n\r\n\tupdate(callback){\r\n\t\tthis.forceUpdate(callback);\r\n\t},\r\n\r\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n\t *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n\t *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\r\n\t *\t@param {object} state\t\tThe component's current state\r\n\t *\t@param {object} context\t\tContext object (if a parent component has provided context)\r\n\t *\t@returns VNode\r\n\t */\r\n\trender() {}\r\n\r\n});\r\n","import { diff } from './vdom/diff';\r\nimport { Component } from './component';\r\nimport options from './options';\r\nimport {addScopedAttr, addScopedAttrStatic} from './style';\r\n\r\nfunction isElement(obj) {\r\n\ttry {\r\n\t //Using W3 DOM2 (works for FF, Opera and Chrome)\r\n\t return obj instanceof HTMLElement;\r\n\t}\r\n\tcatch (e){\r\n\t //Browsers not supporting W3 DOM2 don't have HTMLElement and\r\n\t //an exception is thrown and we end up here. Testing some\r\n\t //properties that all elements have (works on IE7)\r\n\t return (typeof obj===\"object\") &&\r\n\t\t(obj.nodeType===1) && (typeof obj.style === \"object\") &&\r\n\t\t(typeof obj.ownerDocument ===\"object\");\r\n\t}\r\n}\r\n\r\n/** Render JSX into a `parent` Element.\r\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\r\n *\t@param {Element} parent\t\tDOM element to render into\r\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\r\n *\t@public\r\n *\r\n *\t@example\r\n *\t// render a div into :\r\n *\trender(hello!
, document.body);\r\n *\r\n *\t@example\r\n *\t// render a \"Thing\" component into #foo:\r\n *\tconst Thing = ({ name }) => { name };\r\n *\trender(, document.querySelector('#foo'));\r\n */\r\nexport function render(vnode, parent, merge) {\r\n\toptions.staticStyleRendered = false;\r\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent;\r\n\tif (merge === true){\r\n\t\twhile (parent.firstChild){\r\n\t\t\tparent.removeChild(parent.firstChild);\r\n\t\t}\r\n\t}\r\n\tconst m = isElement(merge) || merge === undefined;\r\n\tif (vnode instanceof Component) {\r\n\t\tif (window && window.Omi){\r\n\t\t\twindow.Omi.instances.push(vnode);\r\n\t\t}\r\n\t\tif (!m){\r\n\t\t\tvnode.$store = options.$store = merge;\r\n\t\t}\r\n\t\tif (vnode.componentWillMount) vnode.componentWillMount();\r\n\t\tif (vnode.install) vnode.install();\r\n\t\tconst rendered = vnode.render();\r\n\t\tif (vnode.style){\r\n\t\t\taddScopedAttr(rendered,vnode.style(),'_style_'+vnode._id,vnode);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (vnode.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,vnode.staticStyle(),'_style_'+vnode.constructor.name, !vnode.base);\r\n\t\t}\r\n\r\n\t\tvnode.base = diff(m ? merge : undefined, rendered, {}, false, parent, false);\r\n\t\t\r\n\t\tif (vnode.componentDidMount) vnode.componentDidMount();\r\n\t\tif (vnode.installed) vnode.installed();\r\n\t\toptions.staticStyleRendered = true;\r\n\t\treturn vnode.base;\r\n\t}\r\n\t\r\n\tlet result = diff(merge, vnode, {}, false, parent, false);\r\n\toptions.staticStyleRendered = true;\r\n\treturn result;\r\n}\r\n","/** Global options\r\n *\t@public\r\n *\t@namespace options {Object}\r\n */\r\nexport default {\r\n\r\n\tscopedStyle: true,\r\n\t$store: null,\r\n\tisWeb: true,\r\n\tstaticStyleRendered: false,\r\n\tdoc: typeof document === 'object' ? document : null\r\n\t//componentChange(component, element) { },\r\n\t/** If `true`, `prop` changes trigger synchronous component updates.\r\n\t *\t@name syncComponentUpdates\r\n\t *\t@type Boolean\r\n\t *\t@default true\r\n\t */\r\n\t//syncComponentUpdates: true,\r\n\r\n\t/** Processes all created VNodes.\r\n\t *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\r\n\t */\r\n\t//vnode(vnode) { }\r\n\r\n\t/** Hook invoked after a component is mounted. */\r\n\t//afterMount(component) { },\r\n\r\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\r\n\t//afterUpdate(component) { }\r\n\r\n\t/** Hook invoked immediately before a component is unmounted. */\r\n\t// beforeUnmount(component) { }\r\n};\r\n","import { h, h as createElement } from './h';\r\nimport { cloneElement } from './clone-element';\r\nimport { Component } from './component';\r\nimport { render } from './render';\r\nimport { rerender } from './render-queue';\r\nimport options from './options';\r\n\r\nfunction getGlobal() {\r\n\tif (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\r\n\t\tif (typeof self !== 'undefined') {\r\n\t\t\treturn self;\r\n\t\t} else if (typeof window !== 'undefined') {\r\n\t\t\treturn window;\r\n\t\t} else if (typeof global !== 'undefined') {\r\n\t\t\treturn global;\r\n\t\t}\r\n\t\treturn (function(){\r\n\t\t\treturn this;\r\n\t\t})();\r\n\t\t\r\n\t}\r\n\treturn global;\r\n}\r\n\r\nconst instances = [];\r\nconst root = getGlobal();\r\nroot.Omi = {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nroot.Omi.version = '3.0.0';\r\n\r\nexport default {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nexport {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n"]}
\ No newline at end of file
diff --git a/dist/omi.min.js b/dist/omi.min.js
index 066eea2b4..efe0d255a 100644
--- a/dist/omi.min.js
+++ b/dist/omi.min.js
@@ -1,2 +1,2 @@
-!function(){"use strict";function e(){}function t(t,n){var o,i,r,l,a=H;for(l=arguments.length;l-- >2;)P.push(arguments[l]);n&&null!=n.children&&(P.length||P.push(n.children),delete n.children);while(P.length)if((i=P.pop())&&void 0!==i.pop)for(l=i.length;l--;)P.push(i[l]);else"boolean"==typeof i&&(i=null),(r="function"!=typeof t)&&(null==i?i="":"number"==typeof i?i+="":"string"!=typeof i&&(r=!1)),r&&o?a[a.length-1]+=i:a===H?a=[i]:a.push(i),o=r;var s=new e;return s.nodeName=B?t:q[t],s.attributes=null==n?void 0:n,a&&"string"==typeof a[0]&&!B?s.attributes?s.attributes.value=a[0]:s.attributes={value:a[0]}:s.children=a,s.key=null==n?void 0:n.key,void 0!==D.vnode&&D.vnode(s),s}function n(e,t){for(var n in t)e[n]=t[n];return e}function o(e,o){return t(e.nodeName,n(n({},e.attributes),o),arguments.length>2?[].slice.call(arguments,2):e.children)}function i(e){!e.__d&&(e.__d=!0)&&1==F.push(e)&&(D.debounceRendering||z)(r)}function r(){var e,t=F;F=[];var n;while(e=t.pop())n=e.base,e.__d&&L(e);t.length||D.componentChange&&D.componentChange(e,n)}function l(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&a(e,t.nodeName):n||e._componentConstructor===t.nodeName}function a(e,t){return e.__n===t||e.nodeName.toLowerCase()===t.toLowerCase()}function s(e){var t=n({},e.attributes);t.children=e.children;var o=e.nodeName.defaultProps;if(void 0!==o)for(var i in o)void 0===t[i]&&(t[i]=o[i]);return t}function c(e,t){var n=t?D.doc.createElementNS("http://www.w3.org/2000/svg",e):D.doc.createElement(e);return n.__n=e,n}function u(e){for(var t=e.replace(/\/\*(.|\s)*?\*\//g," ").replace(/\s+/g," "),n={},o=t.match(/ ?(.*?) ?{([^}]*)}/)||[i,r,t],i=o[0],r=o[1],l=o[2],a=l.split(";").map(function(e){return e.split(":").map(function(e){return e&&e.trim()})}),s=a,s=Array.isArray(s),s=0,s=s||s[Symbol.iterator]();;){var c;if(s){if(s>=s.length)break;c=s[s++]}else{if(s=s.next(),s.done)break;c=s.value}var u=c,p=u[0],d=u[1];n[function(e){return e.replace(/\W+\w/g,function(e){return e.slice(-1).toUpperCase()})}(p)]=d}return n}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function d(e,t,n,o,i){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),o&&o(e);else if("class"!==t||i)if("style"===t)if(J){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var r in n)r in o||(e.style[r]="");for(var r in o)e.style[r]="number"==typeof o[r]&&!1===G.test(r)?o[r]+"px":o[r]}}else{var l=n,a=o;"string"==typeof n&&(l=u(n)),"string"==typeof o&&(a=u(o));var s={},c=!1;if(l){for(var p in l)"object"!=typeof a||p in a||(s[p]="",c=!0);for(var d in a)a[d]!==l[d]&&(s[d]=a[d],c=!0);c&&e.setStyles(s)}else e.setStyles(a)}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var m=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,f,m):e.removeEventListener(t,f,m),(e.__l||(e.__l={}))[t]=o}else if("list"!==t&&"type"!==t&&!i&&t in e)v(e,t,null==o?"":o),null!=o&&!1!==o||e.removeAttribute(t);else{var w=i&&t!==(t=t.replace(/^xlink:?/,""));null==o||!1===o?w?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(w?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function v(e,t,n){try{e[t]=n}catch(e){}}function f(e){return this.__l[e.type](D.event&&D.event(e)||e)}function m(){var e;while(e=K.pop())D.afterMount&&D.afterMount(e),e.componentDidMount&&e.componentDidMount(),e.installed&&e.installed()}function w(e,t,n,o,i,r){Q++||(Y=null!=i&&void 0!==i.ownerSVGElement,Z=null!=e&&!("__preactattr_"in e));var l=h(e,t,n,o,r);return i&&l.parentNode!==i&&i.appendChild(l),--Q||(Z=!1,r||m()),l}function h(e,t,n,o,i){var r=e,l=Y;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||i)?e.nodeValue!=t&&(e.nodeValue=t):(r=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(r,e),b(e,!0))),r.t=!0,r;var s=t.nodeName;if("function"==typeof s)return W(e,t,n,o);if(Y="svg"===s||"foreignObject"!==s&&Y,s+="",(!e||!a(e,s))&&(r=c(s,Y),e)){while(e.firstChild)r.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(r,e),b(e,!0)}var u=r.firstChild,p=r.t,d=t.children;if(null==p){p=r.t={};for(var v=r.attributes,f=v.length;f--;)p[v[f].name]=v[f].value}return!Z&&d&&1===d.length&&"string"==typeof d[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=d[0]&&(u.nodeValue=d[0]):(d&&d.length||null!=u)&&_(r,d,n,o,Z||null!=p.dangerouslySetInnerHTML),g(r,t.attributes,p),Y=l,r}function _(e,t,n,o,i){var r,a,s,c,u,d=e.childNodes,v=[],f={},m=0,w=0,_=d.length,y=0,g=t?t.length:0;if(0!==_)for(var C=0;C<_;C++){var x=d[C],k=x.t,N=g&&k?x._component?x._component.__k:k.key:null;null!=N?(m++,f[N]=x):(k||(void 0!==x.splitText?!i||x.nodeValue.trim():i))&&(v[y++]=x)}if(0!==g)for(var C=0;C8&&(I=!0)}var z=I?Promise.resolve().then.bind(Promise.resolve()):setTimeout,G=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,F=[],J=D.isWeb,K=[],Q=0,Y=!1,Z=!1,ee={},te=0;n(R.prototype,{setState:function(e,t){var o=this.state;this.__s||(this.__s=n({},o)),n(o,"function"==typeof e?e(o,this.props):e),t&&(this.__h=this.__h||[]).push(t),i(this)},forceUpdate:function(e){e&&(this.__h=this.__h||[]).push(e),L(this,2),D.componentChange&&D.componentChange(this,this.base)},update:function(e){this.forceUpdate(e)},render:function(){}});var ne=[],oe=function(){return"object"==typeof global&&global&&global.Math===Math&&global.Array===Array?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:function(){return this}()}();oe.Omi={h:t,createElement:t,cloneElement:o,Component:R,render:V,rerender:r,options:D,instances:ne},oe.Omi.version="3.0.0";var ie={h:t,createElement:t,cloneElement:o,Component:R,render:V,rerender:r,options:D,instances:ne};"undefined"!=typeof module?module.exports=ie:self.Omi=ie}();
+!function(){"use strict";function e(){}function t(t,n){var o,i,r,l,a=H;for(l=arguments.length;l-- >2;)P.push(arguments[l]);n&&null!=n.children&&(P.length||P.push(n.children),delete n.children);while(P.length)if((i=P.pop())&&void 0!==i.pop)for(l=i.length;l--;)P.push(i[l]);else"boolean"==typeof i&&(i=null),(r="function"!=typeof t)&&(null==i?i="":"number"==typeof i?i+="":"string"!=typeof i&&(r=!1)),r&&o?a[a.length-1]+=i:a===H?a=[i]:a.push(i),o=r;var s=new e;return s.nodeName=D.isWeb?t:B[t],s.attributes=null==n?void 0:n,a&&"string"==typeof a[0]&&!D.isWeb?s.attributes?s.attributes.value=a[0]:s.attributes={value:a[0]}:s.children=a,s.key=null==n?void 0:n.key,void 0!==D.vnode&&D.vnode(s),s}function n(e,t){for(var n in t)e[n]=t[n];return e}function o(e,o){return t(e.nodeName,n(n({},e.attributes),o),arguments.length>2?[].slice.call(arguments,2):e.children)}function i(e){!e.__d&&(e.__d=!0)&&1==G.push(e)&&(D.debounceRendering||X)(r)}function r(){var e,t=G;G=[];var n;while(e=t.pop())n=e.base,e.__d&&A(e);t.length||D.componentChange&&D.componentChange(e,n)}function l(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&a(e,t.nodeName):n||e._componentConstructor===t.nodeName}function a(e,t){return e.__n===t||e.nodeName.toLowerCase()===t.toLowerCase()}function s(e){var t=n({},e.attributes);t.children=e.children;var o=e.nodeName.defaultProps;if(void 0!==o)for(var i in o)void 0===t[i]&&(t[i]=o[i]);return t}function c(e,t){var n=t?D.doc.createElementNS("http://www.w3.org/2000/svg",e):D.doc.createElement(e);return n.__n=e,n}function u(e){for(var t=e.replace(/\/\*(.|\s)*?\*\//g," ").replace(/\s+/g," "),n={},o=t.match(/ ?(.*?) ?{([^}]*)}/)||[i,r,t],i=o[0],r=o[1],l=o[2],a=l.split(";").map(function(e){return e.split(":").map(function(e){return e&&e.trim()})}),s=a,s=Array.isArray(s),s=0,s=s||s[Symbol.iterator]();;){var c;if(s){if(s>=s.length)break;c=s[s++]}else{if(s=s.next(),s.done)break;c=s.value}var u=c,p=u[0],d=u[1];n[function(e){return e.replace(/\W+\w/g,function(e){return e.slice(-1).toUpperCase()})}(p)]=d}return n}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function d(e,t,n,o,i){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),o&&o(e);else if("class"!==t||i)if("style"===t)if(D.isWeb){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var r in n)r in o||(e.style[r]="");for(var r in o)e.style[r]="number"==typeof o[r]&&!1===z.test(r)?o[r]+"px":o[r]}}else{var l=n,a=o;"string"==typeof n&&(l=u(n)),"string"==typeof o&&(a=u(o));var s={},c=!1;if(l){for(var p in l)"object"!=typeof a||p in a||(s[p]="",c=!0);for(var d in a)a[d]!==l[d]&&(s[d]=a[d],c=!0);c&&e.setStyles(s)}else e.setStyles(a)}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var m=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,f,m):e.removeEventListener(t,f,m),(e.__l||(e.__l={}))[t]=o}else if("list"!==t&&"type"!==t&&!i&&t in e)v(e,t,null==o?"":o),null!=o&&!1!==o||e.removeAttribute(t);else{var w=i&&t!==(t=t.replace(/^xlink:?/,""));null==o||!1===o?w?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(w?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function v(e,t,n){try{e[t]=n}catch(e){}}function f(e){return this.__l[e.type](D.event&&D.event(e)||e)}function m(){var e;while(e=F.pop())D.afterMount&&D.afterMount(e),e.componentDidMount&&e.componentDidMount(),e.installed&&e.installed()}function w(e,t,n,o,i,r){J++||(K=null!=i&&void 0!==i.ownerSVGElement,Q=null!=e&&!("__preactattr_"in e));var l=h(e,t,n,o,r);return i&&l.parentNode!==i&&i.appendChild(l),--J||(Q=!1,r||m()),l}function h(e,t,n,o,i){var r=e,l=K;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||i)?e.nodeValue!=t&&(e.nodeValue=t):(r=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(r,e),b(e,!0))),r.t=!0,r;var s=t.nodeName;if("function"==typeof s)return L(e,t,n,o);if(K="svg"===s||"foreignObject"!==s&&K,s+="",(!e||!a(e,s))&&(r=c(s,K),e)){while(e.firstChild)r.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(r,e),b(e,!0)}var u=r.firstChild,p=r.t,d=t.children;if(null==p){p=r.t={};for(var v=r.attributes,f=v.length;f--;)p[v[f].name]=v[f].value}return!Q&&d&&1===d.length&&"string"==typeof d[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=d[0]&&(u.nodeValue=d[0]):(d&&d.length||null!=u)&&_(r,d,n,o,Q||null!=p.dangerouslySetInnerHTML),g(r,t.attributes,p),K=l,r}function _(e,t,n,o,i){var r,a,s,c,u,d=e.childNodes,v=[],f={},m=0,w=0,_=d.length,y=0,g=t?t.length:0;if(0!==_)for(var C=0;C<_;C++){var x=d[C],k=x.t,N=g&&k?x._component?x._component.__k:k.key:null;null!=N?(m++,f[N]=x):(k||(void 0!==x.splitText?!i||x.nodeValue.trim():i))&&(v[y++]=x)}if(0!==g)for(var C=0;C8&&(q=!0)}var X=q?Promise.resolve().then.bind(Promise.resolve()):setTimeout,z=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,G=[],F=[],J=0,K=!1,Q=!1,Y={},Z=0;n(R.prototype,{setState:function(e,t){var o=this.state;this.__s||(this.__s=n({},o)),n(o,"function"==typeof e?e(o,this.props):e),t&&(this.__h=this.__h||[]).push(t),i(this)},forceUpdate:function(e){e&&(this.__h=this.__h||[]).push(e),A(this,2),D.componentChange&&D.componentChange(this,this.base)},update:function(e){this.forceUpdate(e)},render:function(){}});var ee=[],te=function(){return"object"==typeof global&&global&&global.Math===Math&&global.Array===Array?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:function(){return this}()}();te.Omi={h:t,createElement:t,cloneElement:o,Component:R,render:V,rerender:r,options:D,instances:ee},te.Omi.version="3.0.0";var ne={h:t,createElement:t,cloneElement:o,Component:R,render:V,rerender:r,options:D,instances:ee};"undefined"!=typeof module?module.exports=ne:self.Omi=ne}();
//# sourceMappingURL=omi.min.js.map
\ No newline at end of file
diff --git a/dist/omi.min.js.map b/dist/omi.min.js.map
index 1fdb8392e..c5b47e472 100644
--- a/dist/omi.min.js.map
+++ b/dist/omi.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["../src/vnode.js","../src/h.js","../src/util.js","../src/clone-element.js","../src/constants.js","../src/render-queue.js","../src/vdom/index.js","../src/dom/index.js","../src/vdom/diff.js","../src/vdom/component-recycler.js","../src/style.js","../src/vdom/component.js","../src/component.js","../src/render.js","../src/options.js","../src/omi.js"],"names":["VNode","nodeName","attributes","lastSimple","child","simple","i","children","EMPTY_CHILDREN","arguments","length","stack","push","pop","String","p","isH5","map","value","key","options","vnode","extend","obj","props","cloneElement","h","slice","call","ATTR_KEY","component","debounceRendering","defer","rerender","items","element","base","_dirty","renderComponent","list","componentChange","hydrating","node","_componentConstructor","normalizedNodeName","toLowerCase","defaultProps","doc","createElementNS","createElement","_ref","createNode","match","a","b","cssTxt","isSvg","rule","properties","o","split","x","trim","s","replace","Array","isArray","Symbol","iterator","_ref3","next","done","_ref2","property","style","parseCSSText","cssText","cssToJs","parentNode","removeChild","setAccessor","name","old","className","IS_NON_DIMENSIONAL","test","oldJson","currentJson","changed","ckey","result","substring","setStyles","addEventListener","eventProxy","useCapture","removeEventListener","innerHTML","_listeners","setProperty","removeAttribute","ns","setAttribute","e","this","type","event","diffLevel","c","mounts","isSvgMode","afterMount","installed","diff","dom","context","mountAll","parent","componentRoot","ret","idiff","ownerSVGElement","undefined","out","prevSvgMode","_component","nodeValue","splitText","recollectNodeTree","t","document","vnodeName","buildComponentFromVNode","replaceChild","appendChild","vchildren","innerDiffNode","fc","isHydrating","j","originalChildren","keyed","keyedLen","childrenLen","vlen","_child","f","__key","vchild","min","nextSibling","removeNode","insertBefore","unmountOnly","removeChildren","previousSibling","attrs","collectComponent","components","Ctor","inst","constructor","render","Component","createComponent","prototype","Omi","nextBase","$store","splice","state","scoper","css","prefix","g0","g1","g2","g3","id","appendClass","ele","prependClass","head","someThingStyles","getElementById","textContent","window","ActiveXObject","styleSheet","addStyleWithoutId","attr","scopeVdom","_preStyle","scopedStyle","addStyle","vdom","staticStyleRendered","setComponentProps","opts","_disable","componentWillReceiveProps","enqueueRender","prevProps","isChild","previousProps","previousState","isUpdate","initialBase","initialChildComponent","previousContext","rendered","shouldComponentUpdate","skip","cbase","componentWillUpdate","beforeUpdate","FORCE_RENDER","prevContext","addScopedAttr","_id","addScopedAttrStatic","staticStyle","getChildContext","childComponent","childProps","getNodeProps","toUnmount","baseParent","SYNC_RENDER","componentRef","unshift","_parentComponent","afterUpdate","componentDidUpdate","_renderCallbacks","flushMounts","oldDom","originalComponent","isDirectOwner","unmountComponent","isOwner","beforeUnmount","ref","merge","instances","m","firstChild","componentWillMount","isElement","install","componentDidMount","isWeb","br","hr","h1","h2","h3","h4","h5","h6","abbr","address","bdi","bdo","blockquote","cite","code","del","ins","dfn","em","strong","samp","kbd","var","mark","pre","q","ruby","rp","rt","small","sub","sup","time","u","wbr","form","input","textarea","button","select","option","optgroup","label","fieldset","datalist","legend","output","iframe","img","canvas","figure","figcaption","audio","source","video","track","nav","link","ul","ol","li","dl","dt","dd","menu","command","table","caption","th","td","tr","thead","tbody","tfoot","col","colgroup","div","main","span","header","footer","section","article","aside","details","dialog","summary","progress","meter","meta","area","script","noscript","embed","object","param","view","scroll-view","swiper","icon","text","checkbox","radio","picker","picker-view","slider","switch","navigator","image","contact-button","block","usePromise","Promise","global","__config__","platform","systemVersion","resolve","then","bind","setTimeout","ASYNC_RENDER","isH5$1","forceUpdate","callback","update","root","Math","self","getG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EAAWE,cAAcpT,MAAM,KAAK,IAAM,CACpGoT,GAAgB,IACnBL,GAAAA,GAKI,GAAM3U,GAAQ2U,EAAaC,QAAQK,UAAUC,KAAKC,KAAKP,QAAQK,WAAaG,sEE7BtEC,KGeZC,EAAAlW,EAAAuO,eAwIA7I,GAAAA,ECnJYD,GAAAA,EA0SV7B,MGxBDuE,GAAAA,CCtPDjI,GAAKoJ,EAAaA,+JAuBlB+B,EAAAjG,OAQC+Q,YAAA,SAAoB7I,GACpBjC,IAAcjG,KAAdkI,IAAAlI,KAAAkI,SAAA9N,KAAA4W,GArB0BlV,EAAAkE,KAAA,yDAyB3BiR,OAAA,SAAAD,6CG3DE,IAAApI,OACAsI,GFoDDtW,WACA,MAAA,gBAAOC,SAAPwV,QAAAA,OAAAc,OAAAA,MAAAd,OAAA5S,QAAAA,ME3DA4S,OF4DA,mBAAAe,MAAAA,KAEY,mBAAKzI,QACV/C,OACR,mBAAAyK,QACAA,OEnEQgB,WACR,MAAIrR,WAQHkR,IAAApN,KACC5I,EAAAA,EACAuB,cAFDvB,EAIAD,aAAAA,EACD0I,UAAO0M,EACP3M,OAAAA,aAED9I,QAAMgO,EACNA,UAAayI,IAGZ5U,GAAAA,IAAAA,QAFU,OAIVkH,IAAAA,KACAD,EAAAA,EACAjI,cAAAA,EACAb,aAAAA,EACAgO,UAAAA,EARDlF,OAAAA,aAWAwN,QAASI,eAEM,oBAEd7U,QAFc8U,OAAAC,QAAA1N,GAAAsN,KAAAtN,IAAAA","file":"omi.min.js","sourcesContent":["/** Virtual DOM Node */\r\nexport function VNode() {}\r\n","import { VNode } from './vnode';\r\nimport options from './options';\r\n\r\n\r\nconst stack = [];\r\n\r\nconst EMPTY_CHILDREN = [];\r\n\r\nconst isH5 = options.isWeb;\r\n\r\nconst map = {\r\n\t'br': 'view',\r\n\t'hr': 'view',\r\n\r\n\t'p': 'view',\r\n\t'h1': 'view',\r\n\t'h2': 'view',\r\n\t'h3': 'view',\r\n\t'h4': 'view',\r\n\t'h5': 'view',\r\n\t'h6': 'view',\r\n\t'abbr': 'view',\r\n\t'address': 'view',\r\n\t'b': 'view',\r\n\t'bdi': 'view',\r\n\t'bdo': 'view',\r\n\t'blockquote': 'view',\r\n\t'cite': 'view',\r\n\t'code': 'view',\r\n\t'del': 'view',\r\n\t'ins': 'view',\r\n\t'dfn': 'view',\r\n\t'em': 'view',\r\n\t'strong': 'view',\r\n\t'samp': 'view',\r\n\t'kbd': 'view',\r\n\t'var': 'view',\r\n\t'i': 'view',\r\n\t'mark': 'view',\r\n\t'pre': 'view',\r\n\t'q': 'view',\r\n\t'ruby': 'view',\r\n\t'rp': 'view',\r\n\t'rt': 'view',\r\n\t's': 'view',\r\n\t'small': 'view',\r\n\t'sub': 'view',\r\n\t'sup': 'view',\r\n\t'time': 'view',\r\n\t'u': 'view',\r\n\t'wbr': 'view',\r\n\r\n\t'form': 'form',\r\n\t'input': 'input',\r\n\t'textarea': 'textarea',\r\n\t'button': 'button',\r\n\t'select': 'picker',\r\n\t'option': 'view',\r\n\t'optgroup': 'view',\r\n\t'label': 'label',\r\n\t'fieldset': 'view',\r\n\t'datalist': 'picker',\r\n\t'legend': 'view',\r\n\t'output': 'view',\r\n\r\n\t'iframe': 'view',\r\n \r\n\t'img': 'image',\r\n\t'canvas': 'canvas',\r\n\t'figure': 'view',\r\n\t'figcaption': 'view',\r\n\r\n \r\n\t'audio': 'audio',\r\n\t'source': 'audio',\r\n\t'video': 'video',\r\n\t'track': 'video',\r\n \r\n\t'a': 'navigator',\r\n\t'nav': 'view',\r\n\t'link': 'navigator',\r\n\r\n\t'ul': 'view',\r\n\t'ol': 'view',\r\n\t'li': 'view',\r\n\t'dl': 'view',\r\n\t'dt': 'view',\r\n\t'dd': 'view',\r\n\t'menu': 'view',\r\n\t'command': 'view',\r\n\r\n\r\n\t'table': 'view',\r\n\t'caption': 'view',\r\n\t'th': 'view',\r\n\t'td': 'view',\r\n\t'tr': 'view',\r\n\t'thead': 'view',\r\n\t'tbody': 'view',\r\n\t'tfoot': 'view',\r\n\t'col': 'view',\r\n\t'colgroup': 'view',\r\n\r\n\r\n\t'div': 'view',\r\n\t'main': 'view',\r\n\t//'span': 'label',\r\n\t'span': 'text',\r\n\t'header': 'view',\r\n\t'footer': 'view',\r\n\t'section': 'view',\r\n\t'article': 'view',\r\n\t'aside': 'view',\r\n\t'details': 'view',\r\n\t'dialog': 'view',\r\n\t'summary': 'view',\r\n\r\n\t'progress': 'progress',\r\n\t'meter': 'progress',\r\n\t'head': 'view',\r\n\t'meta': 'view',\r\n\t'base': 'text',\r\n\t'map': 'map',\r\n\t'area': 'navigator',\r\n\r\n\t'script': 'view',\r\n\t'noscript': 'view',\r\n\t'embed': 'view',\r\n\t'object': 'view',\r\n\t'param': 'view',\r\n\r\n\t'view': 'view',\r\n\t'scroll-view': 'scroll-view',\r\n\t'swiper': 'swiper',\r\n\t'icon': 'icon',\r\n\t'text': 'text',\r\n\r\n\t\r\n\r\n\r\n\t'checkbox': 'checkbox',\r\n\t'radio': 'radio',\r\n\t'picker': 'picker',\r\n\t'picker-view': 'picker-view',\r\n\t'slider': 'slider',\r\n\t'switch': 'switch',\r\n\t'navigator': 'navigator',\r\n\t\r\n\t'image': 'image',\r\n\t'contact-button': 'contact-button',\r\n\t'block': 'block'\r\n};\r\n\r\n\r\n/**\r\n * JSX/hyperscript reviver.\r\n * @see http://jasonformat.com/wtf-is-jsx\r\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\r\n *\r\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\r\n *\r\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\r\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\r\n * the current _actual_ DOM structure, and applying only the differences.\r\n *\r\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\r\n * and optionally children to append to the element.\r\n *\r\n * @example The following DOM tree\r\n *\r\n * `Hello!
`\r\n *\r\n * can be constructed using this function as:\r\n *\r\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\r\n *\r\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\r\n * @param {Object} attributes\tAny attributes/props to set on the created element.\r\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\r\n *\r\n * @public\r\n */\r\nexport function h(nodeName, attributes) {\r\n\tlet children=EMPTY_CHILDREN, lastSimple, child, simple, i;\r\n\tfor (i=arguments.length; i-- > 2; ) {\r\n\t\tstack.push(arguments[i]);\r\n\t}\r\n\tif (attributes && attributes.children!=null) {\r\n\t\tif (!stack.length) stack.push(attributes.children);\r\n\t\tdelete attributes.children;\r\n\t}\r\n\twhile (stack.length) {\r\n\t\tif ((child = stack.pop()) && child.pop!==undefined) {\r\n\t\t\tfor (i=child.length; i--; ) stack.push(child[i]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (typeof child==='boolean') child = null;\r\n\r\n\t\t\tif ((simple = typeof nodeName!=='function')) {\r\n\t\t\t\tif (child==null) child = '';\r\n\t\t\t\telse if (typeof child==='number') child = String(child);\r\n\t\t\t\telse if (typeof child!=='string') simple = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (simple && lastSimple) {\r\n\t\t\t\tchildren[children.length-1] += child;\r\n\t\t\t}\r\n\t\t\telse if (children===EMPTY_CHILDREN) {\r\n\t\t\t\tchildren = [child];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tchildren.push(child);\r\n\t\t\t}\r\n\r\n\t\t\tlastSimple = simple;\r\n\t\t}\r\n\t}\r\n\r\n\tlet p = new VNode();\r\n\tp.nodeName = isH5?nodeName:map[nodeName];\r\n\tp.attributes = attributes == null ? undefined : attributes;\r\n\tif (children && typeof children[0] === 'string'&& !isH5) {\r\n\t\tif (p.attributes) {\r\n\t\t\tp.attributes.value = children[0];\r\n\t\t} else {\r\n\t\t\tp.attributes = { value: children[0] };\r\n\t\t}\r\n\t} else {\r\n\t\tp.children = children;\r\n\t}\r\n\tp.key = attributes==null ? undefined : attributes.key;\r\n\r\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\r\n\tif (options.vnode!==undefined) options.vnode(p);\r\n\r\n\treturn p;\r\n}\r\n","/**\r\n * Copy all properties from `props` onto `obj`.\r\n * @param {Object} obj\t\tObject onto which properties should be copied.\r\n * @param {Object} props\tObject from which to copy properties.\r\n * @returns obj\r\n * @private\r\n */\r\nexport function extend(obj, props) {\r\n\tfor (let i in props) obj[i] = props[i];\r\n\treturn obj;\r\n}\r\n\r\n/**\r\n * Call a function asynchronously, as soon as possible. Makes\r\n * use of HTML Promise to schedule the callback if available,\r\n * otherwise falling back to `setTimeout` (mainly for IE<11).\r\n *\r\n * @param {Function} callback\r\n */\r\n\r\nlet usePromise = typeof Promise == 'function';\r\n\r\n// for native\r\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\r\n\tif (global.__config__.platform === 'android') {\r\n\t\tusePromise = true;\r\n\t} else {\r\n\t\tlet systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\r\n\t\tif (systemVersion > 8) {\r\n\t\t\tusePromise = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\r\n","import { extend } from './util';\r\nimport { h } from './h';\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\r\n * @param {Object} props\tAttributes/props to add when cloning\r\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\r\n */\r\nexport function cloneElement(vnode, props) {\r\n\treturn h(\r\n\t\tvnode.nodeName,\r\n\t\textend(extend({}, vnode.attributes), props),\r\n\t\targuments.length>2 ? [].slice.call(arguments, 2) : vnode.children\r\n\t);\r\n}\r\n","// render modes\r\n\r\nexport const NO_RENDER = 0;\r\nexport const SYNC_RENDER = 1;\r\nexport const FORCE_RENDER = 2;\r\nexport const ASYNC_RENDER = 3;\r\n\r\n\r\nexport const ATTR_KEY = '__preactattr_';\r\n\r\n// DOM properties that should NOT have \"px\" added when numeric\r\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\r\n\r\n","import options from './options';\r\nimport { defer } from './util';\r\nimport { renderComponent } from './vdom/component';\r\n\r\n/** Managed queue of dirty components to be re-rendered */\r\n\r\nlet items = [];\r\n\r\nexport function enqueueRender(component) {\r\n\tif (!component._dirty && (component._dirty = true) && items.push(component)==1) {\r\n\t\t(options.debounceRendering || defer)(rerender);\r\n\t}\r\n}\r\n\r\nexport function rerender() {\r\n\tlet p, list = items;\r\n\titems = [];\r\n\tlet element;\r\n\twhile ( (p = list.pop()) ) {\r\n\t\telement = p.base;\r\n\t\tif (p._dirty) renderComponent(p);\r\n\t}\r\n\tif (!list.length) {\r\n\t\tif (options.componentChange) options.componentChange(p, element);\r\n\t}\r\n}\r\n","import { extend } from '../util';\r\n\r\n\r\n/**\r\n * Check if two nodes are equivalent.\r\n *\r\n * @param {Node} node\t\t\tDOM Node to compare\r\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\r\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\r\n * @private\r\n */\r\nexport function isSameNodeType(node, vnode, hydrating) {\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\t\treturn node.splitText!==undefined;\r\n\t}\r\n\tif (typeof vnode.nodeName==='string') {\r\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\r\n\t}\r\n\treturn hydrating || node._componentConstructor===vnode.nodeName;\r\n}\r\n\r\n\r\n/**\r\n * Check if an Element has a given nodeName, case-insensitively.\r\n *\r\n * @param {Element} node\tA DOM Element to inspect the name of.\r\n * @param {String} nodeName\tUnnormalized name to compare against.\r\n */\r\nexport function isNamedNode(node, nodeName) {\r\n\treturn node.normalizedNodeName===nodeName || node.nodeName.toLowerCase()===nodeName.toLowerCase();\r\n}\r\n\r\n\r\n/**\r\n * Reconstruct Component-style `props` from a VNode.\r\n * Ensures default/fallback values from `defaultProps`:\r\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\r\n *\r\n * @param {VNode} vnode\r\n * @returns {Object} props\r\n */\r\nexport function getNodeProps(vnode) {\r\n\tlet props = extend({}, vnode.attributes);\r\n\tprops.children = vnode.children;\r\n\r\n\tlet defaultProps = vnode.nodeName.defaultProps;\r\n\tif (defaultProps!==undefined) {\r\n\t\tfor (let i in defaultProps) {\r\n\t\t\tif (props[i]===undefined) {\r\n\t\t\t\tprops[i] = defaultProps[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn props;\r\n}\r\n","import { IS_NON_DIMENSIONAL } from '../constants';\r\nimport options from '../options';\r\n\r\n\r\n/** Create an element with the given nodeName.\r\n *\t@param {String} nodeName\r\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\r\n *\t@returns {Element} node\r\n */\r\nexport function createNode(nodeName, isSvg) {\r\n\tlet node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\r\n\tnode.normalizedNodeName = nodeName;\r\n\treturn node;\r\n}\r\n\r\nfunction parseCSSText(cssText) {\r\n\tlet cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\r\n\tlet style = {}, [a,b,rule] = cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt];\r\n\tlet cssToJs = s => s.replace(/\\W+\\w/g, match => match.slice(-1).toUpperCase());\r\n\tlet properties = rule.split(\";\").map(o => o.split(\":\").map(x => x && x.trim()));\r\n\tfor (let [property, value] of properties) style[cssToJs(property)] = value;\r\n\treturn style;\r\n}\r\n\r\nconst isH5 = options.isWeb;\r\n\r\n\r\n/** Remove a child node from its parent if attached.\r\n *\t@param {Element} node\t\tThe node to remove\r\n */\r\nexport function removeNode(node) {\r\n\tlet parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\n\r\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\r\n *\tIf `value` is `null`, the attribute/handler will be removed.\r\n *\t@param {Element} node\tAn element to mutate\r\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\r\n *\t@param {any} old\tThe last value that was set for this name/node pair\r\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\r\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\r\n *\t@private\r\n */\r\nexport function setAccessor(node, name, old, value, isSvg) {\r\n\tif (name==='className') name = 'class';\r\n\r\n\r\n\tif (name==='key') {\r\n\t\t// ignore\r\n\t}\r\n\telse if (name==='ref') {\r\n\t\tif (old) old(null);\r\n\t\tif (value) value(node);\r\n\t}\r\n\telse if (name==='class' && !isSvg) {\r\n\t\tnode.className = value || '';\r\n\t}\r\n\telse if (name==='style') {\r\n\t\tif (isH5) {\r\n\t\t\tif (!value || typeof value==='string' || typeof old==='string') {\r\n\t\t\t\tnode.style.cssText = value || '';\r\n\t\t\t}\r\n\t\t\tif (value && typeof value==='object') {\r\n\t\t\t\tif (typeof old!=='string') {\r\n\t\t\t\t\tfor (let i in old) if (!(i in value)) node.style[i] = '';\r\n\t\t\t\t}\r\n\t\t\t\tfor (let i in value) {\r\n\t\t\t\t\tnode.style[i] = typeof value[i]==='number' && IS_NON_DIMENSIONAL.test(i)===false ? (value[i]+'px') : value[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet oldJson = old,\r\n\t\t\t\tcurrentJson = value;\r\n\t\t\tif (typeof old === 'string') {\r\n\t\t\t\toldJson = parseCSSText(old);\r\n\t\t\t}\r\n\t\t\tif (typeof value == 'string') {\r\n\t\t\t\tcurrentJson = parseCSSText(value);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlet result = {},\r\n\t\t\t\tchanged = false;\r\n\t\t\r\n\t\t\tif (oldJson) {\r\n\t\t\t\tfor (let key in oldJson) {\r\n\t\t\t\t\tif (typeof currentJson == 'object' && !(key in currentJson)) {\r\n\t\t\t\t\t\tresult[key] = '';\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tfor (let ckey in currentJson) {\r\n\t\t\t\t\tif (currentJson[ckey] !== oldJson[ckey]) {\r\n\t\t\t\t\t\tresult[ckey] = currentJson[ckey];\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tif (changed) {\r\n\t\t\t\t\tnode.setStyles(result);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnode.setStyles(currentJson);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse if (name==='dangerouslySetInnerHTML') {\r\n\t\tif (value) node.innerHTML = value.__html || '';\r\n\t}\r\n\telse if (name[0]=='o' && name[1]=='n') {\r\n\t\tlet useCapture = name !== (name=name.replace(/Capture$/, ''));\r\n\t\tname = name.toLowerCase().substring(2);\r\n\t\tif (value) {\r\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\r\n\t}\r\n\telse if (name!=='list' && name!=='type' && !isSvg && name in node) {\r\n\t\tsetProperty(node, name, value==null ? '' : value);\r\n\t\tif (value==null || value===false) node.removeAttribute(name);\r\n\t}\r\n\telse {\r\n\t\tlet ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));\r\n\t\tif (value==null || value===false) {\r\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());\r\n\t\t\telse node.removeAttribute(name);\r\n\t\t}\r\n\t\telse if (typeof value!=='function') {\r\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\r\n\t\t\telse node.setAttribute(name, value);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/** Attempt to set a DOM property to the given value.\r\n *\tIE & FF throw for certain property-value combinations.\r\n */\r\nfunction setProperty(node, name, value) {\r\n\ttry {\r\n\t\tnode[name] = value;\r\n\t} catch (e) { }\r\n}\r\n\r\n\r\n/** Proxy an event to hooked event handlers\r\n *\t@private\r\n */\r\nfunction eventProxy(e) {\r\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\r\n}\r\n","import { ATTR_KEY } from '../constants';\r\nimport { isSameNodeType, isNamedNode } from './index';\r\nimport { buildComponentFromVNode } from './component';\r\nimport { createNode, setAccessor } from '../dom/index';\r\nimport { unmountComponent } from './component';\r\nimport options from '../options';\r\nimport { removeNode } from '../dom/index';\r\n\r\n/** Queue of components that have been mounted and are awaiting componentDidMount */\r\nexport const mounts = [];\r\n\r\n/** Diff recursion count, used to track the end of the diff cycle. */\r\nexport let diffLevel = 0;\r\n\r\n/** Global flag indicating if the diff is currently within an SVG */\r\nlet isSvgMode = false;\r\n\r\n/** Global flag indicating if the diff is performing hydration */\r\nlet hydrating = false;\r\n\r\n/** Invoke queued componentDidMount lifecycle methods */\r\nexport function flushMounts() {\r\n\tlet c;\r\n\twhile ((c=mounts.pop())) {\r\n\t\tif (options.afterMount) options.afterMount(c);\r\n\t\tif (c.componentDidMount) c.componentDidMount();\r\n\t\tif (c.installed) c.installed();\r\n\t}\r\n}\r\n\r\n\r\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\r\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\r\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\r\n *\t@returns {Element} dom\t\t\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function diff(dom, vnode, context, mountAll, parent, componentRoot) {\r\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\r\n\tif (!diffLevel++) {\r\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\r\n\t\tisSvgMode = parent!=null && parent.ownerSVGElement!==undefined;\r\n\r\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\r\n\t\thydrating = dom!=null && !(ATTR_KEY in dom);\r\n\t}\r\n\r\n\tlet ret = idiff(dom, vnode, context, mountAll, componentRoot);\r\n\r\n\t// append the element if its a new parent\r\n\tif (parent && ret.parentNode!==parent) parent.appendChild(ret);\r\n\r\n\t// diffLevel being reduced to 0 means we're exiting the diff\r\n\tif (!--diffLevel) {\r\n\t\thydrating = false;\r\n\t\t// invoke queued componentDidMount lifecycle methods\r\n\t\tif (!componentRoot) flushMounts();\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\r\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\r\n\tlet out = dom,\r\n\t\tprevSvgMode = isSvgMode;\r\n\r\n\t// empty values (null, undefined, booleans) render as empty Text nodes\r\n\tif (vnode==null || typeof vnode==='boolean') vnode = '';\r\n\r\n\r\n\t// Fast case: Strings & Numbers create/update Text nodes.\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\r\n\t\t// update if it's already a Text node:\r\n\t\tif (dom && dom.splitText!==undefined && dom.parentNode && (!dom._component || componentRoot)) {\r\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\r\n\t\t\tif (dom.nodeValue!=vnode) {\r\n\t\t\t\tdom.nodeValue = vnode;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\r\n\t\t\tout = document.createTextNode(vnode);\r\n\t\t\tif (dom) {\r\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\t\t\t\trecollectNodeTree(dom, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout[ATTR_KEY] = true;\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\r\n\t// If the VNode represents a Component, perform a component diff:\r\n\tlet vnodeName = vnode.nodeName;\r\n\tif (typeof vnodeName==='function') {\r\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\r\n\t}\r\n\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tisSvgMode = vnodeName==='svg' ? true : vnodeName==='foreignObject' ? false : isSvgMode;\r\n\r\n\r\n\t// If there's no existing element or it's the wrong type, create a new one:\r\n\tvnodeName = String(vnodeName);\r\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\r\n\t\tout = createNode(vnodeName, isSvgMode);\r\n\r\n\t\tif (dom) {\r\n\t\t\t// move children into the replacement node\r\n\t\t\twhile (dom.firstChild) out.appendChild(dom.firstChild);\r\n\r\n\t\t\t// if the previous Element was mounted into the DOM, replace it inline\r\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\r\n\t\t\t// recycle the old element (skips non-Element node types)\r\n\t\t\trecollectNodeTree(dom, true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tlet fc = out.firstChild,\r\n\t\tprops = out[ATTR_KEY],\r\n\t\tvchildren = vnode.children;\r\n\r\n\tif (props==null) {\r\n\t\tprops = out[ATTR_KEY] = {};\r\n\t\tfor (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;\r\n\t}\r\n\r\n\t// Optimization: fast-path for elements containing a single TextNode:\r\n\tif (!hydrating && vchildren && vchildren.length===1 && typeof vchildren[0]==='string' && fc!=null && fc.splitText!==undefined && fc.nextSibling==null) {\r\n\t\tif (fc.nodeValue!=vchildren[0]) {\r\n\t\t\tfc.nodeValue = vchildren[0];\r\n\t\t}\r\n\t}\r\n\t// otherwise, if there are existing or new children, diff them:\r\n\telse if (vchildren && vchildren.length || fc!=null) {\r\n\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML!=null);\r\n\t}\r\n\r\n\r\n\t// Apply attributes/props from VNode to the DOM Element:\r\n\tdiffAttributes(out, vnode.attributes, props);\r\n\r\n\r\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\r\n\tisSvgMode = prevSvgMode;\r\n\r\n\treturn out;\r\n}\r\n\r\n\r\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\r\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\r\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\r\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\r\n *\t@param {Boolean} mountAll\r\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\r\n */\r\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\r\n\tlet originalChildren = dom.childNodes,\r\n\t\tchildren = [],\r\n\t\tkeyed = {},\r\n\t\tkeyedLen = 0,\r\n\t\tmin = 0,\r\n\t\tlen = originalChildren.length,\r\n\t\tchildrenLen = 0,\r\n\t\tvlen = vchildren ? vchildren.length : 0,\r\n\t\tj, c, f, vchild, child;\r\n\r\n\t// Build up a map of keyed children and an Array of unkeyed children:\r\n\tif (len!==0) {\r\n\t\tfor (let i=0; i {\r\n\t\tif (typeof g2 === 'undefined') {\r\n\t\t\tg2 = '';\r\n\t\t}\r\n\r\n\t\t/* eslint-ignore-next-line */\r\n\t\tif (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\r\n\t\t\treturn g1 + g2 + g3;\r\n\t\t}\r\n\r\n\t\tlet appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\r\n\t\tlet prependClass = prefix + ' ' + g1.trim() + g2;\r\n\t\treturn appendClass + ',' + prependClass + g3;\r\n\t});\r\n\r\n\treturn css;\r\n}\r\n\r\nexport function addStyle(cssText, id) {\r\n\tid = id.toLowerCase();\r\n\tlet ele = document.getElementById(id);\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tif (ele && ele.parentNode === head) {\r\n\t\thead.removeChild(ele);\r\n\t}\r\n\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\tsomeThingStyles.setAttribute('id', id);\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nexport function addStyleWithoutId(cssText) {\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\n\r\nexport function addScopedAttr(vdom, style, attr, component) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tstyle = scoper(style, attr);\r\n\t\tif (style !== component._preStyle) {\r\n\t\t\taddStyle(style, attr);\r\n\t\t}\r\n\t} else if (style !== component._preStyle) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n\tcomponent._preStyle = style;\r\n}\r\n\r\nexport function addScopedAttrStatic(vdom, style, attr) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tif (!options.staticStyleRendered) {\r\n\t\t\taddStyle(scoper(style, attr), attr);\r\n\t\t}\r\n\t} else if (!options.staticStyleRendered) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n}\r\n\r\nexport function scopeVdom(attr,vdom){\r\n\tif (typeof vdom!== 'string'){\r\n\t\tvdom.attributes = vdom.attributes||{};\r\n\t\tvdom.attributes[attr] = '';\r\n\t\tvdom.children.forEach(child=>scopeVdom(attr,child));\r\n\t}\r\n}","import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';\r\nimport options from '../options';\r\nimport { extend } from '../util';\r\nimport { enqueueRender } from '../render-queue';\r\nimport { getNodeProps } from './index';\r\nimport { diff, mounts, diffLevel, flushMounts, recollectNodeTree, removeChildren } from './diff';\r\nimport { createComponent, collectComponent } from './component-recycler';\r\nimport { removeNode } from '../dom/index';\r\nimport {addScopedAttr, addScopedAttrStatic} from '../style';\r\n\r\n/** Set a component's `props` (generally derived from JSX attributes).\r\n *\t@param {Object} props\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\r\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\r\n */\r\nexport function setComponentProps(component, props, opts, context, mountAll) {\r\n\tif (component._disable) return;\r\n\tcomponent._disable = true;\r\n\r\n\tif ((component.__ref = props.ref)) delete props.ref;\r\n\tif ((component.__key = props.key)) delete props.key;\r\n\r\n\tif (!component.base || mountAll) {\r\n\t\tif (component.componentWillMount) component.componentWillMount();\r\n\t\tif (component.install) component.install();\r\n\t}\r\n\telse if (component.componentWillReceiveProps) {\r\n\t\tcomponent.componentWillReceiveProps(props, context);\r\n\t}\r\n\r\n\tif (context && context!==component.context) {\r\n\t\tif (!component.prevContext) component.prevContext = component.context;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tif (!component.prevProps) component.prevProps = component.props;\r\n\tcomponent.props = props;\r\n\r\n\tcomponent._disable = false;\r\n\r\n\tif (opts!==NO_RENDER) {\r\n\t\tif (opts===SYNC_RENDER || options.syncComponentUpdates!==false || !component.base) {\r\n\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tenqueueRender(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(component);\r\n}\r\n\r\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\r\n *\t@param {Component} component\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\r\n *\t@private\r\n */\r\nexport function renderComponent(component, opts, mountAll, isChild) {\r\n\tif (component._disable) return;\r\n\r\n\tlet props = component.props,\r\n\t\tstate = component.state,\r\n\t\tcontext = component.context,\r\n\t\tpreviousProps = component.prevProps || props,\r\n\t\tpreviousState = component.prevState || state,\r\n\t\tpreviousContext = component.prevContext || context,\r\n\t\tisUpdate = component.base,\r\n\t\tnextBase = component.nextBase,\r\n\t\tinitialBase = isUpdate || nextBase,\r\n\t\tinitialChildComponent = component._component,\r\n\t\tskip = false,\r\n\t\trendered, inst, cbase;\r\n\r\n\t// if updating\r\n\tif (isUpdate) {\r\n\t\tcomponent.props = previousProps;\r\n\t\tcomponent.state = previousState;\r\n\t\tcomponent.context = previousContext;\r\n\t\tif (opts!==FORCE_RENDER\r\n\t\t\t&& component.shouldComponentUpdate\r\n\t\t\t&& component.shouldComponentUpdate(props, state, context) === false) {\r\n\t\t\tskip = true;\r\n\t\t}\r\n\t\telse if (component.componentWillUpdate) {\r\n\t\t\tcomponent.componentWillUpdate(props, state, context);\r\n\t\t}\r\n\t\telse if (component.beforeUpdate) {\r\n\t\t\tcomponent.beforeUpdate(props, state, context);\r\n\t\t}\r\n\t\tcomponent.props = props;\r\n\t\tcomponent.state = state;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\r\n\tcomponent._dirty = false;\r\n\r\n\tif (!skip) {\r\n\t\trendered = component.render(props, state, context);\r\n\t\r\n\t\tif (component.style){\r\n\t\t\taddScopedAttr(rendered,component.style(),'_style_'+component._id,component);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (component.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,component.staticStyle(),'_style_'+component.constructor.name);\r\n\t\t}\r\n\r\n\t\t// context to pass to the child, can be updated via (grand-)parent component\r\n\t\tif (component.getChildContext) {\r\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\r\n\t\t}\r\n\r\n\t\tlet childComponent = rendered && rendered.nodeName,\r\n\t\t\ttoUnmount, base;\r\n\r\n\t\tif (typeof childComponent==='function') {\r\n\t\t\t// set up high order component link\r\n\r\n\t\t\tlet childProps = getNodeProps(rendered);\r\n\t\t\tinst = initialChildComponent;\r\n\r\n\t\t\tif (inst && inst.constructor===childComponent && childProps.key==inst.__key) {\r\n\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttoUnmount = inst;\r\n\r\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\r\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\r\n\t\t\t\tinst._parentComponent = component;\r\n\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\r\n\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\r\n\t\t\t}\r\n\r\n\t\t\tbase = inst.base;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcbase = initialBase;\r\n\r\n\t\t\t// destroy high order component link\r\n\t\t\ttoUnmount = initialChildComponent;\r\n\t\t\tif (toUnmount) {\r\n\t\t\t\tcbase = component._component = null;\r\n\t\t\t}\r\n\r\n\t\t\tif (initialBase || opts===SYNC_RENDER) {\r\n\t\t\t\tif (cbase) cbase._component = null;\r\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (initialBase && base!==initialBase && inst!==initialChildComponent) {\r\n\t\t\tlet baseParent = initialBase.parentNode;\r\n\t\t\tif (baseParent && base!==baseParent) {\r\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\r\n\r\n\t\t\t\tif (!toUnmount) {\r\n\t\t\t\t\tinitialBase._component = null;\r\n\t\t\t\t\trecollectNodeTree(initialBase, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (toUnmount) {\r\n\t\t\tunmountComponent(toUnmount);\r\n\t\t}\r\n\r\n\t\tcomponent.base = base;\r\n\t\tif (base && !isChild) {\r\n\t\t\tlet componentRef = component,\r\n\t\t\t\tt = component;\r\n\t\t\twhile ((t=t._parentComponent)) {\r\n\t\t\t\t(componentRef = t).base = base;\r\n\t\t\t}\r\n\t\t\tbase._component = componentRef;\r\n\t\t\tbase._componentConstructor = componentRef.constructor;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!isUpdate || mountAll) {\r\n\t\tmounts.unshift(component);\r\n\t}\r\n\telse if (!skip) {\r\n\t\t// Ensure that pending componentDidMount() hooks of child components\r\n\t\t// are called before the componentDidUpdate() hook in the parent.\r\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\r\n\t\t// flushMounts();\r\n\r\n\t\tif (component.componentDidUpdate) {\r\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (component.afterUpdate) {\r\n\t\t\tcomponent.afterUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (options.afterUpdate) options.afterUpdate(component);\r\n\t}\r\n\r\n\tif (component._renderCallbacks!=null) {\r\n\t\twhile (component._renderCallbacks.length) component._renderCallbacks.pop().call(component);\r\n\t}\r\n\r\n\tif (!diffLevel && !isChild) flushMounts();\r\n}\r\n\r\n\r\n\r\n/** Apply the Component referenced by a VNode to the DOM.\r\n *\t@param {Element} dom\tThe DOM node to mutate\r\n *\t@param {VNode} vnode\tA Component-referencing VNode\r\n *\t@returns {Element} dom\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function buildComponentFromVNode(dom, vnode, context, mountAll) {\r\n\tlet c = dom && dom._component,\r\n\t\toriginalComponent = c,\r\n\t\toldDom = dom,\r\n\t\tisDirectOwner = c && dom._componentConstructor===vnode.nodeName,\r\n\t\tisOwner = isDirectOwner,\r\n\t\tprops = getNodeProps(vnode);\r\n\twhile (c && !isOwner && (c=c._parentComponent)) {\r\n\t\tisOwner = c.constructor===vnode.nodeName;\r\n\t}\r\n\r\n\tif (c && isOwner && (!mountAll || c._component)) {\r\n\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\t}\r\n\telse {\r\n\t\tif (originalComponent && !isDirectOwner) {\r\n\t\t\tunmountComponent(originalComponent);\r\n\t\t\tdom = oldDom = null;\r\n\t\t}\r\n\r\n\t\tc = createComponent(vnode.nodeName, props, context);\r\n\t\tif (dom && !c.nextBase) {\r\n\t\t\tc.nextBase = dom;\r\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\r\n\t\t\toldDom = null;\r\n\t\t}\r\n\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\r\n\t\tif (oldDom && dom!==oldDom) {\r\n\t\t\toldDom._component = null;\r\n\t\t\trecollectNodeTree(oldDom, false);\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n\r\n\r\n/** Remove a component from the DOM and recycle it.\r\n *\t@param {Component} component\tThe Component instance to unmount\r\n *\t@private\r\n */\r\nexport function unmountComponent(component) {\r\n\tif (options.beforeUnmount) options.beforeUnmount(component);\r\n\r\n\tlet base = component.base;\r\n\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.componentWillUnmount) component.componentWillUnmount();\r\n\tif (component.uninstall) component.uninstall();\r\n\t\r\n\tcomponent.base = null;\r\n\r\n\t// recursively tear down & recollect high-order component children:\r\n\tlet inner = component._component;\r\n\tif (inner) {\r\n\t\tunmountComponent(inner);\r\n\t}\r\n\telse if (base) {\r\n\t\tif (base[ATTR_KEY] && base[ATTR_KEY].ref) base[ATTR_KEY].ref(null);\r\n\r\n\t\tcomponent.nextBase = base;\r\n\r\n\t\tremoveNode(base);\r\n\t\tcollectComponent(component);\r\n\r\n\t\tremoveChildren(base);\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(null);\r\n}\r\n","import { FORCE_RENDER } from './constants';\r\nimport { extend } from './util';\r\nimport { renderComponent } from './vdom/component';\r\nimport { enqueueRender } from './render-queue';\r\nimport options from './options';\r\n\r\nlet id = 0;\r\nfunction getId(){\r\n\treturn id++;\r\n}\r\n/** Base Component class.\r\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\r\n *\t@public\r\n *\r\n *\t@example\r\n *\tclass MyFoo extends Component {\r\n *\t\trender(props, state) {\r\n *\t\t\treturn ;\r\n *\t\t}\r\n *\t}\r\n */\r\nexport function Component(props, context) {\r\n\tthis._dirty = true;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.context = context;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.props = props;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.state = this.state || {};\r\n\r\n\tthis._id = getId();\r\n\r\n\tthis._preStyle = null;\r\n\r\n\tthis.$store = null;\r\n\r\n}\r\n\r\n\r\nextend(Component.prototype, {\r\n\r\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\r\n\t *\t@param {object} nextProps\r\n\t *\t@param {object} nextState\r\n\t *\t@param {object} nextContext\r\n\t *\t@returns {Boolean} should the component re-render\r\n\t *\t@name shouldComponentUpdate\r\n\t *\t@function\r\n\t */\r\n\r\n\r\n\t/** Update component state by copying properties from `state` to `this.state`.\r\n\t *\t@param {object} state\t\tA hash of state properties to update with new values\r\n\t *\t@param {function} callback\tA function to be called once component state is updated\r\n\t */\r\n\tsetState(state, callback) {\r\n\t\tlet s = this.state;\r\n\t\tif (!this.prevState) this.prevState = extend({}, s);\r\n\t\textend(s, typeof state==='function' ? state(s, this.props) : state);\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\tenqueueRender(this);\r\n\t},\r\n\r\n\r\n\t/** Immediately perform a synchronous re-render of the component.\r\n\t *\t@param {function} callback\t\tA function to be called after component is re-rendered.\r\n\t *\t@private\r\n\t */\r\n\tforceUpdate(callback) {\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\trenderComponent(this, FORCE_RENDER);\r\n\t\tif (options.componentChange) options.componentChange(this, this.base);\r\n\t},\r\n\r\n\tupdate(callback){\r\n\t\tthis.forceUpdate(callback);\r\n\t},\r\n\r\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n\t *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n\t *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\r\n\t *\t@param {object} state\t\tThe component's current state\r\n\t *\t@param {object} context\t\tContext object (if a parent component has provided context)\r\n\t *\t@returns VNode\r\n\t */\r\n\trender() {}\r\n\r\n});\r\n","import { diff } from './vdom/diff';\r\nimport { Component } from './component';\r\nimport options from './options';\r\nimport {addScopedAttr, addScopedAttrStatic} from './style';\r\n\r\nfunction isElement(obj) {\r\n\ttry {\r\n\t //Using W3 DOM2 (works for FF, Opera and Chrome)\r\n\t return obj instanceof HTMLElement;\r\n\t}\r\n\tcatch (e){\r\n\t //Browsers not supporting W3 DOM2 don't have HTMLElement and\r\n\t //an exception is thrown and we end up here. Testing some\r\n\t //properties that all elements have (works on IE7)\r\n\t return (typeof obj===\"object\") &&\r\n\t\t(obj.nodeType===1) && (typeof obj.style === \"object\") &&\r\n\t\t(typeof obj.ownerDocument ===\"object\");\r\n\t}\r\n}\r\n\r\n/** Render JSX into a `parent` Element.\r\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\r\n *\t@param {Element} parent\t\tDOM element to render into\r\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\r\n *\t@public\r\n *\r\n *\t@example\r\n *\t// render a div into :\r\n *\trender(hello!
, document.body);\r\n *\r\n *\t@example\r\n *\t// render a \"Thing\" component into #foo:\r\n *\tconst Thing = ({ name }) => { name };\r\n *\trender(, document.querySelector('#foo'));\r\n */\r\nexport function render(vnode, parent, merge) {\r\n\toptions.staticStyleRendered = false;\r\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent;\r\n\tif (merge === true){\r\n\t\twhile (parent.firstChild){\r\n\t\t\tparent.removeChild(parent.firstChild);\r\n\t\t}\r\n\t}\r\n\tconst m = isElement(merge) || merge === undefined;\r\n\tif (vnode instanceof Component) {\r\n\t\tif (window && window.Omi){\r\n\t\t\twindow.Omi.instances.push(vnode);\r\n\t\t}\r\n\t\tif (!m){\r\n\t\t\tvnode.$store = options.$store = merge;\r\n\t\t}\r\n\t\tif (vnode.componentWillMount) vnode.componentWillMount();\r\n\t\tif (vnode.install) vnode.install();\r\n\t\tconst rendered = vnode.render();\r\n\t\tif (vnode.style){\r\n\t\t\taddScopedAttr(rendered,vnode.style(),'_style_'+vnode._id,vnode);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (vnode.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,vnode.staticStyle(),'_style_'+vnode.constructor.name, !vnode.base);\r\n\t\t}\r\n\r\n\t\tvnode.base = diff(m ? merge : undefined, rendered, {}, false, parent, false);\r\n\t\t\r\n\t\tif (vnode.componentDidMount) vnode.componentDidMount();\r\n\t\tif (vnode.installed) vnode.installed();\r\n\t\toptions.staticStyleRendered = true;\r\n\t\treturn vnode.base;\r\n\t}\r\n\t\r\n\tlet result = diff(merge, vnode, {}, false, parent, false);\r\n\toptions.staticStyleRendered = true;\r\n\treturn result;\r\n}\r\n","/** Global options\r\n *\t@public\r\n *\t@namespace options {Object}\r\n */\r\nexport default {\r\n\r\n\tscopedStyle: true,\r\n\t$store: null,\r\n\tisWeb: true,\r\n\tstaticStyleRendered: false,\r\n\tdoc: typeof document === 'object' ? document : null\r\n\t//componentChange(component, element) { },\r\n\t/** If `true`, `prop` changes trigger synchronous component updates.\r\n\t *\t@name syncComponentUpdates\r\n\t *\t@type Boolean\r\n\t *\t@default true\r\n\t */\r\n\t//syncComponentUpdates: true,\r\n\r\n\t/** Processes all created VNodes.\r\n\t *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\r\n\t */\r\n\t//vnode(vnode) { }\r\n\r\n\t/** Hook invoked after a component is mounted. */\r\n\t//afterMount(component) { },\r\n\r\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\r\n\t//afterUpdate(component) { }\r\n\r\n\t/** Hook invoked immediately before a component is unmounted. */\r\n\t// beforeUnmount(component) { }\r\n};\r\n","import { h, h as createElement } from './h';\r\nimport { cloneElement } from './clone-element';\r\nimport { Component } from './component';\r\nimport { render } from './render';\r\nimport { rerender } from './render-queue';\r\nimport options from './options';\r\n\r\nfunction getGlobal() {\r\n\tif (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\r\n\t\tif (typeof self !== 'undefined') {\r\n\t\t\treturn self;\r\n\t\t} else if (typeof window !== 'undefined') {\r\n\t\t\treturn window;\r\n\t\t} else if (typeof global !== 'undefined') {\r\n\t\t\treturn global;\r\n\t\t}\r\n\t\treturn (function(){\r\n\t\t\treturn this;\r\n\t\t})();\r\n\t\t\r\n\t}\r\n\treturn global;\r\n}\r\n\r\nconst instances = [];\r\nconst root = getGlobal();\r\nroot.Omi = {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nroot.Omi.version = '3.0.0';\r\n\r\nexport default {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nexport {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n"]}
\ No newline at end of file
+{"version":3,"sources":["../src/vnode.js","../src/h.js","../src/util.js","../src/clone-element.js","../src/constants.js","../src/render-queue.js","../src/vdom/index.js","../src/dom/index.js","../src/vdom/diff.js","../src/vdom/component-recycler.js","../src/style.js","../src/vdom/component.js","../src/component.js","../src/render.js","../src/options.js","../src/omi.js"],"names":["VNode","nodeName","attributes","lastSimple","child","simple","i","children","EMPTY_CHILDREN","arguments","length","stack","push","pop","String","p","options","isWeb","map","value","key","vnode","extend","obj","props","cloneElement","h","slice","call","ATTR_KEY","component","debounceRendering","defer","rerender","items","element","base","_dirty","renderComponent","list","componentChange","hydrating","node","_componentConstructor","normalizedNodeName","toLowerCase","defaultProps","doc","createElementNS","createElement","_ref","createNode","match","a","b","cssTxt","isSvg","rule","properties","o","split","x","trim","s","replace","Array","isArray","Symbol","iterator","_ref3","next","done","_ref2","property","style","parseCSSText","cssText","parentNode","removeChild","setAccessor","name","old","className","IS_NON_DIMENSIONAL","test","oldJson","currentJson","changed","ckey","result","substring","setStyles","addEventListener","eventProxy","useCapture","removeEventListener","innerHTML","_listeners","setProperty","removeAttribute","ns","setAttribute","e","this","type","event","diffLevel","c","mounts","isSvgMode","afterMount","installed","diff","dom","context","mountAll","parent","componentRoot","ret","idiff","ownerSVGElement","undefined","out","prevSvgMode","_component","nodeValue","splitText","recollectNodeTree","t","document","vnodeName","buildComponentFromVNode","replaceChild","appendChild","vchildren","innerDiffNode","fc","isHydrating","j","originalChildren","keyed","keyedLen","childrenLen","vlen","_child","f","__key","vchild","min","nextSibling","removeNode","insertBefore","unmountOnly","removeChildren","previousSibling","attrs","collectComponent","components","Ctor","inst","constructor","render","Component","createComponent","prototype","Omi","nextBase","$store","splice","state","scoper","css","prefix","g0","g1","g2","g3","addStyle","id","ele","appendClass","head","getElementsByTagName","someThingStyles","getElementById","textContent","window","ActiveXObject","styleSheet","addStyleWithoutId","attr","scopeVdom","_preStyle","scopedStyle","vdom","staticStyleRendered","setComponentProps","opts","_disable","componentWillReceiveProps","enqueueRender","prevProps","isChild","previousProps","previousState","isUpdate","initialBase","initialChildComponent","previousContext","rendered","shouldComponentUpdate","skip","cbase","componentWillUpdate","beforeUpdate","FORCE_RENDER","prevContext","addScopedAttr","_id","addScopedAttrStatic","staticStyle","getChildContext","childComponent","childProps","getNodeProps","toUnmount","baseParent","SYNC_RENDER","componentRef","unshift","_parentComponent","afterUpdate","componentDidUpdate","_renderCallbacks","flushMounts","oldDom","originalComponent","isDirectOwner","unmountComponent","isOwner","beforeUnmount","ref","merge","instances","m","firstChild","componentWillMount","isElement","install","componentDidMount","br","hr","h1","h2","h3","h4","h5","h6","abbr","address","bdi","bdo","blockquote","cite","code","del","ins","dfn","em","strong","samp","kbd","var","mark","pre","q","ruby","rp","rt","small","sub","sup","time","u","wbr","form","input","textarea","button","select","option","optgroup","label","fieldset","datalist","legend","output","iframe","img","canvas","figure","figcaption","audio","source","video","track","nav","link","ul","ol","li","dl","dt","dd","menu","command","table","caption","th","td","tr","thead","tbody","tfoot","col","colgroup","div","main","span","header","footer","section","article","aside","details","dialog","summary","progress","meter","meta","area","script","noscript","embed","object","param","view","scroll-view","swiper","icon","text","checkbox","radio","picker","picker-view","slider","switch","navigator","image","contact-button","block","usePromise","Promise","global","__config__","platform","systemVersion","resolve","then","bind","setTimeout","ASYNC_RENDER","forceUpdate","callback","update","root","Math","self","getGlobal","version","module","exports"],"mappings":"wBACO,SAASA,MCmLT,QAAWC,GAAAA,EAAUC,GAC3B,GAA6BC,GAAYC,EAAOC,EAAQC,EAApDC,EAASC,CACb,KAAKF,EAAEG,UAAUC,OAAQJ,KAAM,GAC9BK,EAAMC,KAAKH,UAAUH,GAElBJ,IAAmC,MAArBA,EAAWK,WACvBI,EAAMD,QAAQC,EAAMC,KAAKV,EAAWK,gBAClCL,GAAWK,SAEnB,OAAOI,EAAMD,OACZ,IAAKN,EAAQO,EAAME,YAAAA,KAAUT,EAAMS,IAClC,IAAKP,EAAEF,EAAMM,OAAQ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,WACA,MAAA,gBAAOK,SAAPsV,QAAAA,OAAAa,OAAAA,MAAAb,OAAA1S,QAAAA,ME3DA0S,OF4DA,mBAAAc,MAAAA,KAEY,mBAAKvI,QACV/C,OACR,mBAAAwK,QACAA,OEnEQe,WACR,MAAInR,WAQHgR,IAAAlN,KACC3I,EAAAA,EACAuB,cAFDvB,EAIAD,aAAAA,EACDyI,UAAOyM,EACP1M,OAAAA,aAEDjJ,QAAMmO,EACNA,UAAauI,IAGZzU,GAAAA,IAAAA,QAFU,OAIViH,IAAAA,KACAD,EAAAA,EACAhI,cAAAA,EACAjB,aAAAA,EACAmO,UAAAA,EARDlF,OAAAA,aAWAsN,QAASI,eAEM,oBAEd1U,QAFc2U,OAAAC,QAAAxN,GAAAoN,KAAApN,IAAAA","file":"omi.min.js","sourcesContent":["/** Virtual DOM Node */\r\nexport function VNode() {}\r\n","import { VNode } from './vnode';\r\nimport options from './options';\r\n\r\n\r\nconst stack = [];\r\n\r\nconst EMPTY_CHILDREN = [];\r\n\r\nconst map = {\r\n\t'br': 'view',\r\n\t'hr': 'view',\r\n\r\n\t'p': 'view',\r\n\t'h1': 'view',\r\n\t'h2': 'view',\r\n\t'h3': 'view',\r\n\t'h4': 'view',\r\n\t'h5': 'view',\r\n\t'h6': 'view',\r\n\t'abbr': 'view',\r\n\t'address': 'view',\r\n\t'b': 'view',\r\n\t'bdi': 'view',\r\n\t'bdo': 'view',\r\n\t'blockquote': 'view',\r\n\t'cite': 'view',\r\n\t'code': 'view',\r\n\t'del': 'view',\r\n\t'ins': 'view',\r\n\t'dfn': 'view',\r\n\t'em': 'view',\r\n\t'strong': 'view',\r\n\t'samp': 'view',\r\n\t'kbd': 'view',\r\n\t'var': 'view',\r\n\t'i': 'view',\r\n\t'mark': 'view',\r\n\t'pre': 'view',\r\n\t'q': 'view',\r\n\t'ruby': 'view',\r\n\t'rp': 'view',\r\n\t'rt': 'view',\r\n\t's': 'view',\r\n\t'small': 'view',\r\n\t'sub': 'view',\r\n\t'sup': 'view',\r\n\t'time': 'view',\r\n\t'u': 'view',\r\n\t'wbr': 'view',\r\n\r\n\t'form': 'form',\r\n\t'input': 'input',\r\n\t'textarea': 'textarea',\r\n\t'button': 'button',\r\n\t'select': 'picker',\r\n\t'option': 'view',\r\n\t'optgroup': 'view',\r\n\t'label': 'label',\r\n\t'fieldset': 'view',\r\n\t'datalist': 'picker',\r\n\t'legend': 'view',\r\n\t'output': 'view',\r\n\r\n\t'iframe': 'view',\r\n \r\n\t'img': 'image',\r\n\t'canvas': 'canvas',\r\n\t'figure': 'view',\r\n\t'figcaption': 'view',\r\n\r\n \r\n\t'audio': 'audio',\r\n\t'source': 'audio',\r\n\t'video': 'video',\r\n\t'track': 'video',\r\n \r\n\t'a': 'navigator',\r\n\t'nav': 'view',\r\n\t'link': 'navigator',\r\n\r\n\t'ul': 'view',\r\n\t'ol': 'view',\r\n\t'li': 'view',\r\n\t'dl': 'view',\r\n\t'dt': 'view',\r\n\t'dd': 'view',\r\n\t'menu': 'view',\r\n\t'command': 'view',\r\n\r\n\r\n\t'table': 'view',\r\n\t'caption': 'view',\r\n\t'th': 'view',\r\n\t'td': 'view',\r\n\t'tr': 'view',\r\n\t'thead': 'view',\r\n\t'tbody': 'view',\r\n\t'tfoot': 'view',\r\n\t'col': 'view',\r\n\t'colgroup': 'view',\r\n\r\n\r\n\t'div': 'view',\r\n\t'main': 'view',\r\n\t//'span': 'label',\r\n\t'span': 'text',\r\n\t'header': 'view',\r\n\t'footer': 'view',\r\n\t'section': 'view',\r\n\t'article': 'view',\r\n\t'aside': 'view',\r\n\t'details': 'view',\r\n\t'dialog': 'view',\r\n\t'summary': 'view',\r\n\r\n\t'progress': 'progress',\r\n\t'meter': 'progress',\r\n\t'head': 'view',\r\n\t'meta': 'view',\r\n\t'base': 'text',\r\n\t'map': 'map',\r\n\t'area': 'navigator',\r\n\r\n\t'script': 'view',\r\n\t'noscript': 'view',\r\n\t'embed': 'view',\r\n\t'object': 'view',\r\n\t'param': 'view',\r\n\r\n\t'view': 'view',\r\n\t'scroll-view': 'scroll-view',\r\n\t'swiper': 'swiper',\r\n\t'icon': 'icon',\r\n\t'text': 'text',\r\n\r\n\t\r\n\r\n\r\n\t'checkbox': 'checkbox',\r\n\t'radio': 'radio',\r\n\t'picker': 'picker',\r\n\t'picker-view': 'picker-view',\r\n\t'slider': 'slider',\r\n\t'switch': 'switch',\r\n\t'navigator': 'navigator',\r\n\t\r\n\t'image': 'image',\r\n\t'contact-button': 'contact-button',\r\n\t'block': 'block'\r\n};\r\n\r\n\r\n/**\r\n * JSX/hyperscript reviver.\r\n * @see http://jasonformat.com/wtf-is-jsx\r\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\r\n *\r\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\r\n *\r\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\r\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\r\n * the current _actual_ DOM structure, and applying only the differences.\r\n *\r\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\r\n * and optionally children to append to the element.\r\n *\r\n * @example The following DOM tree\r\n *\r\n * `Hello!
`\r\n *\r\n * can be constructed using this function as:\r\n *\r\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\r\n *\r\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\r\n * @param {Object} attributes\tAny attributes/props to set on the created element.\r\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\r\n *\r\n * @public\r\n */\r\nexport function h(nodeName, attributes) {\r\n\tlet children=EMPTY_CHILDREN, lastSimple, child, simple, i;\r\n\tfor (i=arguments.length; i-- > 2; ) {\r\n\t\tstack.push(arguments[i]);\r\n\t}\r\n\tif (attributes && attributes.children!=null) {\r\n\t\tif (!stack.length) stack.push(attributes.children);\r\n\t\tdelete attributes.children;\r\n\t}\r\n\twhile (stack.length) {\r\n\t\tif ((child = stack.pop()) && child.pop!==undefined) {\r\n\t\t\tfor (i=child.length; i--; ) stack.push(child[i]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (typeof child==='boolean') child = null;\r\n\r\n\t\t\tif ((simple = typeof nodeName!=='function')) {\r\n\t\t\t\tif (child==null) child = '';\r\n\t\t\t\telse if (typeof child==='number') child = String(child);\r\n\t\t\t\telse if (typeof child!=='string') simple = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (simple && lastSimple) {\r\n\t\t\t\tchildren[children.length-1] += child;\r\n\t\t\t}\r\n\t\t\telse if (children===EMPTY_CHILDREN) {\r\n\t\t\t\tchildren = [child];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tchildren.push(child);\r\n\t\t\t}\r\n\r\n\t\t\tlastSimple = simple;\r\n\t\t}\r\n\t}\r\n\r\n\tlet p = new VNode();\r\n\tp.nodeName = options.isWeb?nodeName:map[nodeName];\r\n\tp.attributes = attributes == null ? undefined : attributes;\r\n\tif (children && typeof children[0] === 'string'&& !options.isWeb) {\r\n\t\tif (p.attributes) {\r\n\t\t\tp.attributes.value = children[0];\r\n\t\t} else {\r\n\t\t\tp.attributes = { value: children[0] };\r\n\t\t}\r\n\t} else {\r\n\t\tp.children = children;\r\n\t}\r\n\tp.key = attributes==null ? undefined : attributes.key;\r\n\r\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\r\n\tif (options.vnode!==undefined) options.vnode(p);\r\n\r\n\treturn p;\r\n}\r\n","/**\r\n * Copy all properties from `props` onto `obj`.\r\n * @param {Object} obj\t\tObject onto which properties should be copied.\r\n * @param {Object} props\tObject from which to copy properties.\r\n * @returns obj\r\n * @private\r\n */\r\nexport function extend(obj, props) {\r\n\tfor (let i in props) obj[i] = props[i];\r\n\treturn obj;\r\n}\r\n\r\n/**\r\n * Call a function asynchronously, as soon as possible. Makes\r\n * use of HTML Promise to schedule the callback if available,\r\n * otherwise falling back to `setTimeout` (mainly for IE<11).\r\n *\r\n * @param {Function} callback\r\n */\r\n\r\nlet usePromise = typeof Promise == 'function';\r\n\r\n// for native\r\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\r\n\tif (global.__config__.platform === 'android') {\r\n\t\tusePromise = true;\r\n\t} else {\r\n\t\tlet systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\r\n\t\tif (systemVersion > 8) {\r\n\t\t\tusePromise = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\r\n","import { extend } from './util';\r\nimport { h } from './h';\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\r\n * @param {Object} props\tAttributes/props to add when cloning\r\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\r\n */\r\nexport function cloneElement(vnode, props) {\r\n\treturn h(\r\n\t\tvnode.nodeName,\r\n\t\textend(extend({}, vnode.attributes), props),\r\n\t\targuments.length>2 ? [].slice.call(arguments, 2) : vnode.children\r\n\t);\r\n}\r\n","// render modes\r\n\r\nexport const NO_RENDER = 0;\r\nexport const SYNC_RENDER = 1;\r\nexport const FORCE_RENDER = 2;\r\nexport const ASYNC_RENDER = 3;\r\n\r\n\r\nexport const ATTR_KEY = '__preactattr_';\r\n\r\n// DOM properties that should NOT have \"px\" added when numeric\r\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\r\n\r\n","import options from './options';\r\nimport { defer } from './util';\r\nimport { renderComponent } from './vdom/component';\r\n\r\n/** Managed queue of dirty components to be re-rendered */\r\n\r\nlet items = [];\r\n\r\nexport function enqueueRender(component) {\r\n\tif (!component._dirty && (component._dirty = true) && items.push(component)==1) {\r\n\t\t(options.debounceRendering || defer)(rerender);\r\n\t}\r\n}\r\n\r\nexport function rerender() {\r\n\tlet p, list = items;\r\n\titems = [];\r\n\tlet element;\r\n\twhile ( (p = list.pop()) ) {\r\n\t\telement = p.base;\r\n\t\tif (p._dirty) renderComponent(p);\r\n\t}\r\n\tif (!list.length) {\r\n\t\tif (options.componentChange) options.componentChange(p, element);\r\n\t}\r\n}\r\n","import { extend } from '../util';\r\n\r\n\r\n/**\r\n * Check if two nodes are equivalent.\r\n *\r\n * @param {Node} node\t\t\tDOM Node to compare\r\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\r\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\r\n * @private\r\n */\r\nexport function isSameNodeType(node, vnode, hydrating) {\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\t\treturn node.splitText!==undefined;\r\n\t}\r\n\tif (typeof vnode.nodeName==='string') {\r\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\r\n\t}\r\n\treturn hydrating || node._componentConstructor===vnode.nodeName;\r\n}\r\n\r\n\r\n/**\r\n * Check if an Element has a given nodeName, case-insensitively.\r\n *\r\n * @param {Element} node\tA DOM Element to inspect the name of.\r\n * @param {String} nodeName\tUnnormalized name to compare against.\r\n */\r\nexport function isNamedNode(node, nodeName) {\r\n\treturn node.normalizedNodeName===nodeName || node.nodeName.toLowerCase()===nodeName.toLowerCase();\r\n}\r\n\r\n\r\n/**\r\n * Reconstruct Component-style `props` from a VNode.\r\n * Ensures default/fallback values from `defaultProps`:\r\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\r\n *\r\n * @param {VNode} vnode\r\n * @returns {Object} props\r\n */\r\nexport function getNodeProps(vnode) {\r\n\tlet props = extend({}, vnode.attributes);\r\n\tprops.children = vnode.children;\r\n\r\n\tlet defaultProps = vnode.nodeName.defaultProps;\r\n\tif (defaultProps!==undefined) {\r\n\t\tfor (let i in defaultProps) {\r\n\t\t\tif (props[i]===undefined) {\r\n\t\t\t\tprops[i] = defaultProps[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn props;\r\n}\r\n","import { IS_NON_DIMENSIONAL } from '../constants';\r\nimport options from '../options';\r\n\r\n\r\n/** Create an element with the given nodeName.\r\n *\t@param {String} nodeName\r\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\r\n *\t@returns {Element} node\r\n */\r\nexport function createNode(nodeName, isSvg) {\r\n\tlet node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\r\n\tnode.normalizedNodeName = nodeName;\r\n\treturn node;\r\n}\r\n\r\nfunction parseCSSText(cssText) {\r\n\tlet cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\r\n\tlet style = {}, [a,b,rule] = cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt];\r\n\tlet cssToJs = s => s.replace(/\\W+\\w/g, match => match.slice(-1).toUpperCase());\r\n\tlet properties = rule.split(\";\").map(o => o.split(\":\").map(x => x && x.trim()));\r\n\tfor (let [property, value] of properties) style[cssToJs(property)] = value;\r\n\treturn style;\r\n}\r\n\r\n/** Remove a child node from its parent if attached.\r\n *\t@param {Element} node\t\tThe node to remove\r\n */\r\nexport function removeNode(node) {\r\n\tlet parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\n\r\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\r\n *\tIf `value` is `null`, the attribute/handler will be removed.\r\n *\t@param {Element} node\tAn element to mutate\r\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\r\n *\t@param {any} old\tThe last value that was set for this name/node pair\r\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\r\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\r\n *\t@private\r\n */\r\nexport function setAccessor(node, name, old, value, isSvg) {\r\n\tif (name==='className') name = 'class';\r\n\r\n\r\n\tif (name==='key') {\r\n\t\t// ignore\r\n\t}\r\n\telse if (name==='ref') {\r\n\t\tif (old) old(null);\r\n\t\tif (value) value(node);\r\n\t}\r\n\telse if (name==='class' && !isSvg) {\r\n\t\tnode.className = value || '';\r\n\t}\r\n\telse if (name==='style') {\r\n\t\tif (options.isWeb) {\r\n\t\t\tif (!value || typeof value==='string' || typeof old==='string') {\r\n\t\t\t\tnode.style.cssText = value || '';\r\n\t\t\t}\r\n\t\t\tif (value && typeof value==='object') {\r\n\t\t\t\tif (typeof old!=='string') {\r\n\t\t\t\t\tfor (let i in old) if (!(i in value)) node.style[i] = '';\r\n\t\t\t\t}\r\n\t\t\t\tfor (let i in value) {\r\n\t\t\t\t\tnode.style[i] = typeof value[i]==='number' && IS_NON_DIMENSIONAL.test(i)===false ? (value[i]+'px') : value[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet oldJson = old,\r\n\t\t\t\tcurrentJson = value;\r\n\t\t\tif (typeof old === 'string') {\r\n\t\t\t\toldJson = parseCSSText(old);\r\n\t\t\t}\r\n\t\t\tif (typeof value == 'string') {\r\n\t\t\t\tcurrentJson = parseCSSText(value);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlet result = {},\r\n\t\t\t\tchanged = false;\r\n\t\t\r\n\t\t\tif (oldJson) {\r\n\t\t\t\tfor (let key in oldJson) {\r\n\t\t\t\t\tif (typeof currentJson == 'object' && !(key in currentJson)) {\r\n\t\t\t\t\t\tresult[key] = '';\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tfor (let ckey in currentJson) {\r\n\t\t\t\t\tif (currentJson[ckey] !== oldJson[ckey]) {\r\n\t\t\t\t\t\tresult[ckey] = currentJson[ckey];\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tif (changed) {\r\n\t\t\t\t\tnode.setStyles(result);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnode.setStyles(currentJson);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse if (name==='dangerouslySetInnerHTML') {\r\n\t\tif (value) node.innerHTML = value.__html || '';\r\n\t}\r\n\telse if (name[0]=='o' && name[1]=='n') {\r\n\t\tlet useCapture = name !== (name=name.replace(/Capture$/, ''));\r\n\t\tname = name.toLowerCase().substring(2);\r\n\t\tif (value) {\r\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\r\n\t}\r\n\telse if (name!=='list' && name!=='type' && !isSvg && name in node) {\r\n\t\tsetProperty(node, name, value==null ? '' : value);\r\n\t\tif (value==null || value===false) node.removeAttribute(name);\r\n\t}\r\n\telse {\r\n\t\tlet ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));\r\n\t\tif (value==null || value===false) {\r\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());\r\n\t\t\telse node.removeAttribute(name);\r\n\t\t}\r\n\t\telse if (typeof value!=='function') {\r\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\r\n\t\t\telse node.setAttribute(name, value);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/** Attempt to set a DOM property to the given value.\r\n *\tIE & FF throw for certain property-value combinations.\r\n */\r\nfunction setProperty(node, name, value) {\r\n\ttry {\r\n\t\tnode[name] = value;\r\n\t} catch (e) { }\r\n}\r\n\r\n\r\n/** Proxy an event to hooked event handlers\r\n *\t@private\r\n */\r\nfunction eventProxy(e) {\r\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\r\n}\r\n","import { ATTR_KEY } from '../constants';\r\nimport { isSameNodeType, isNamedNode } from './index';\r\nimport { buildComponentFromVNode } from './component';\r\nimport { createNode, setAccessor } from '../dom/index';\r\nimport { unmountComponent } from './component';\r\nimport options from '../options';\r\nimport { removeNode } from '../dom/index';\r\n\r\n/** Queue of components that have been mounted and are awaiting componentDidMount */\r\nexport const mounts = [];\r\n\r\n/** Diff recursion count, used to track the end of the diff cycle. */\r\nexport let diffLevel = 0;\r\n\r\n/** Global flag indicating if the diff is currently within an SVG */\r\nlet isSvgMode = false;\r\n\r\n/** Global flag indicating if the diff is performing hydration */\r\nlet hydrating = false;\r\n\r\n/** Invoke queued componentDidMount lifecycle methods */\r\nexport function flushMounts() {\r\n\tlet c;\r\n\twhile ((c=mounts.pop())) {\r\n\t\tif (options.afterMount) options.afterMount(c);\r\n\t\tif (c.componentDidMount) c.componentDidMount();\r\n\t\tif (c.installed) c.installed();\r\n\t}\r\n}\r\n\r\n\r\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\r\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\r\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\r\n *\t@returns {Element} dom\t\t\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function diff(dom, vnode, context, mountAll, parent, componentRoot) {\r\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\r\n\tif (!diffLevel++) {\r\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\r\n\t\tisSvgMode = parent!=null && parent.ownerSVGElement!==undefined;\r\n\r\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\r\n\t\thydrating = dom!=null && !(ATTR_KEY in dom);\r\n\t}\r\n\r\n\tlet ret = idiff(dom, vnode, context, mountAll, componentRoot);\r\n\r\n\t// append the element if its a new parent\r\n\tif (parent && ret.parentNode!==parent) parent.appendChild(ret);\r\n\r\n\t// diffLevel being reduced to 0 means we're exiting the diff\r\n\tif (!--diffLevel) {\r\n\t\thydrating = false;\r\n\t\t// invoke queued componentDidMount lifecycle methods\r\n\t\tif (!componentRoot) flushMounts();\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\r\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\r\n\tlet out = dom,\r\n\t\tprevSvgMode = isSvgMode;\r\n\r\n\t// empty values (null, undefined, booleans) render as empty Text nodes\r\n\tif (vnode==null || typeof vnode==='boolean') vnode = '';\r\n\r\n\r\n\t// Fast case: Strings & Numbers create/update Text nodes.\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\r\n\t\t// update if it's already a Text node:\r\n\t\tif (dom && dom.splitText!==undefined && dom.parentNode && (!dom._component || componentRoot)) {\r\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\r\n\t\t\tif (dom.nodeValue!=vnode) {\r\n\t\t\t\tdom.nodeValue = vnode;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\r\n\t\t\tout = document.createTextNode(vnode);\r\n\t\t\tif (dom) {\r\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\t\t\t\trecollectNodeTree(dom, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout[ATTR_KEY] = true;\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\r\n\t// If the VNode represents a Component, perform a component diff:\r\n\tlet vnodeName = vnode.nodeName;\r\n\tif (typeof vnodeName==='function') {\r\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\r\n\t}\r\n\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tisSvgMode = vnodeName==='svg' ? true : vnodeName==='foreignObject' ? false : isSvgMode;\r\n\r\n\r\n\t// If there's no existing element or it's the wrong type, create a new one:\r\n\tvnodeName = String(vnodeName);\r\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\r\n\t\tout = createNode(vnodeName, isSvgMode);\r\n\r\n\t\tif (dom) {\r\n\t\t\t// move children into the replacement node\r\n\t\t\twhile (dom.firstChild) out.appendChild(dom.firstChild);\r\n\r\n\t\t\t// if the previous Element was mounted into the DOM, replace it inline\r\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\r\n\t\t\t// recycle the old element (skips non-Element node types)\r\n\t\t\trecollectNodeTree(dom, true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tlet fc = out.firstChild,\r\n\t\tprops = out[ATTR_KEY],\r\n\t\tvchildren = vnode.children;\r\n\r\n\tif (props==null) {\r\n\t\tprops = out[ATTR_KEY] = {};\r\n\t\tfor (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;\r\n\t}\r\n\r\n\t// Optimization: fast-path for elements containing a single TextNode:\r\n\tif (!hydrating && vchildren && vchildren.length===1 && typeof vchildren[0]==='string' && fc!=null && fc.splitText!==undefined && fc.nextSibling==null) {\r\n\t\tif (fc.nodeValue!=vchildren[0]) {\r\n\t\t\tfc.nodeValue = vchildren[0];\r\n\t\t}\r\n\t}\r\n\t// otherwise, if there are existing or new children, diff them:\r\n\telse if (vchildren && vchildren.length || fc!=null) {\r\n\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML!=null);\r\n\t}\r\n\r\n\r\n\t// Apply attributes/props from VNode to the DOM Element:\r\n\tdiffAttributes(out, vnode.attributes, props);\r\n\r\n\r\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\r\n\tisSvgMode = prevSvgMode;\r\n\r\n\treturn out;\r\n}\r\n\r\n\r\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\r\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\r\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\r\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\r\n *\t@param {Boolean} mountAll\r\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\r\n */\r\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\r\n\tlet originalChildren = dom.childNodes,\r\n\t\tchildren = [],\r\n\t\tkeyed = {},\r\n\t\tkeyedLen = 0,\r\n\t\tmin = 0,\r\n\t\tlen = originalChildren.length,\r\n\t\tchildrenLen = 0,\r\n\t\tvlen = vchildren ? vchildren.length : 0,\r\n\t\tj, c, f, vchild, child;\r\n\r\n\t// Build up a map of keyed children and an Array of unkeyed children:\r\n\tif (len!==0) {\r\n\t\tfor (let i=0; i {\r\n\t\tif (typeof g2 === 'undefined') {\r\n\t\t\tg2 = '';\r\n\t\t}\r\n\r\n\t\t/* eslint-ignore-next-line */\r\n\t\tif (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\r\n\t\t\treturn g1 + g2 + g3;\r\n\t\t}\r\n\r\n\t\tlet appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\r\n\t\t//let prependClass = prefix + ' ' + g1.trim() + g2;\r\n\r\n\t\treturn appendClass + g3;\r\n\t\t//return appendClass + ',' + prependClass + g3;\r\n\t});\r\n\r\n\treturn css;\r\n}\r\n\r\nexport function addStyle(cssText, id) {\r\n\tid = id.toLowerCase();\r\n\tlet ele = document.getElementById(id);\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tif (ele && ele.parentNode === head) {\r\n\t\thead.removeChild(ele);\r\n\t}\r\n\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\tsomeThingStyles.setAttribute('id', id);\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nexport function addStyleWithoutId(cssText) {\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\n\r\nexport function addScopedAttr(vdom, style, attr, component) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tstyle = scoper(style, attr);\r\n\t\tif (style !== component._preStyle) {\r\n\t\t\taddStyle(style, attr);\r\n\t\t}\r\n\t} else if (style !== component._preStyle) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n\tcomponent._preStyle = style;\r\n}\r\n\r\nexport function addScopedAttrStatic(vdom, style, attr) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tif (!options.staticStyleRendered) {\r\n\t\t\taddStyle(scoper(style, attr), attr);\r\n\t\t}\r\n\t} else if (!options.staticStyleRendered) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n}\r\n\r\nexport function scopeVdom(attr,vdom){\r\n\tif (typeof vdom!== 'string'){\r\n\t\tvdom.attributes = vdom.attributes||{};\r\n\t\tvdom.attributes[attr] = '';\r\n\t\tvdom.children.forEach(child=>scopeVdom(attr,child));\r\n\t}\r\n}","import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';\r\nimport options from '../options';\r\nimport { extend } from '../util';\r\nimport { enqueueRender } from '../render-queue';\r\nimport { getNodeProps } from './index';\r\nimport { diff, mounts, diffLevel, flushMounts, recollectNodeTree, removeChildren } from './diff';\r\nimport { createComponent, collectComponent } from './component-recycler';\r\nimport { removeNode } from '../dom/index';\r\nimport {addScopedAttr, addScopedAttrStatic} from '../style';\r\n\r\n/** Set a component's `props` (generally derived from JSX attributes).\r\n *\t@param {Object} props\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\r\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\r\n */\r\nexport function setComponentProps(component, props, opts, context, mountAll) {\r\n\tif (component._disable) return;\r\n\tcomponent._disable = true;\r\n\r\n\tif ((component.__ref = props.ref)) delete props.ref;\r\n\tif ((component.__key = props.key)) delete props.key;\r\n\r\n\tif (!component.base || mountAll) {\r\n\t\tif (component.componentWillMount) component.componentWillMount();\r\n\t\tif (component.install) component.install();\r\n\t}\r\n\telse if (component.componentWillReceiveProps) {\r\n\t\tcomponent.componentWillReceiveProps(props, context);\r\n\t}\r\n\r\n\tif (context && context!==component.context) {\r\n\t\tif (!component.prevContext) component.prevContext = component.context;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tif (!component.prevProps) component.prevProps = component.props;\r\n\tcomponent.props = props;\r\n\r\n\tcomponent._disable = false;\r\n\r\n\tif (opts!==NO_RENDER) {\r\n\t\tif (opts===SYNC_RENDER || options.syncComponentUpdates!==false || !component.base) {\r\n\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tenqueueRender(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(component);\r\n}\r\n\r\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\r\n *\t@param {Component} component\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\r\n *\t@private\r\n */\r\nexport function renderComponent(component, opts, mountAll, isChild) {\r\n\tif (component._disable) return;\r\n\r\n\tlet props = component.props,\r\n\t\tstate = component.state,\r\n\t\tcontext = component.context,\r\n\t\tpreviousProps = component.prevProps || props,\r\n\t\tpreviousState = component.prevState || state,\r\n\t\tpreviousContext = component.prevContext || context,\r\n\t\tisUpdate = component.base,\r\n\t\tnextBase = component.nextBase,\r\n\t\tinitialBase = isUpdate || nextBase,\r\n\t\tinitialChildComponent = component._component,\r\n\t\tskip = false,\r\n\t\trendered, inst, cbase;\r\n\r\n\t// if updating\r\n\tif (isUpdate) {\r\n\t\tcomponent.props = previousProps;\r\n\t\tcomponent.state = previousState;\r\n\t\tcomponent.context = previousContext;\r\n\t\tif (opts!==FORCE_RENDER\r\n\t\t\t&& component.shouldComponentUpdate\r\n\t\t\t&& component.shouldComponentUpdate(props, state, context) === false) {\r\n\t\t\tskip = true;\r\n\t\t}\r\n\t\telse if (component.componentWillUpdate) {\r\n\t\t\tcomponent.componentWillUpdate(props, state, context);\r\n\t\t}\r\n\t\telse if (component.beforeUpdate) {\r\n\t\t\tcomponent.beforeUpdate(props, state, context);\r\n\t\t}\r\n\t\tcomponent.props = props;\r\n\t\tcomponent.state = state;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\r\n\tcomponent._dirty = false;\r\n\r\n\tif (!skip) {\r\n\t\trendered = component.render(props, state, context);\r\n\t\r\n\t\tif (component.style){\r\n\t\t\taddScopedAttr(rendered,component.style(),'_style_'+component._id,component);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (component.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,component.staticStyle(),'_style_'+component.constructor.name);\r\n\t\t}\r\n\r\n\t\t// context to pass to the child, can be updated via (grand-)parent component\r\n\t\tif (component.getChildContext) {\r\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\r\n\t\t}\r\n\r\n\t\tlet childComponent = rendered && rendered.nodeName,\r\n\t\t\ttoUnmount, base;\r\n\r\n\t\tif (typeof childComponent==='function') {\r\n\t\t\t// set up high order component link\r\n\r\n\t\t\tlet childProps = getNodeProps(rendered);\r\n\t\t\tinst = initialChildComponent;\r\n\r\n\t\t\tif (inst && inst.constructor===childComponent && childProps.key==inst.__key) {\r\n\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttoUnmount = inst;\r\n\r\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\r\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\r\n\t\t\t\tinst._parentComponent = component;\r\n\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\r\n\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\r\n\t\t\t}\r\n\r\n\t\t\tbase = inst.base;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcbase = initialBase;\r\n\r\n\t\t\t// destroy high order component link\r\n\t\t\ttoUnmount = initialChildComponent;\r\n\t\t\tif (toUnmount) {\r\n\t\t\t\tcbase = component._component = null;\r\n\t\t\t}\r\n\r\n\t\t\tif (initialBase || opts===SYNC_RENDER) {\r\n\t\t\t\tif (cbase) cbase._component = null;\r\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (initialBase && base!==initialBase && inst!==initialChildComponent) {\r\n\t\t\tlet baseParent = initialBase.parentNode;\r\n\t\t\tif (baseParent && base!==baseParent) {\r\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\r\n\r\n\t\t\t\tif (!toUnmount) {\r\n\t\t\t\t\tinitialBase._component = null;\r\n\t\t\t\t\trecollectNodeTree(initialBase, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (toUnmount) {\r\n\t\t\tunmountComponent(toUnmount);\r\n\t\t}\r\n\r\n\t\tcomponent.base = base;\r\n\t\tif (base && !isChild) {\r\n\t\t\tlet componentRef = component,\r\n\t\t\t\tt = component;\r\n\t\t\twhile ((t=t._parentComponent)) {\r\n\t\t\t\t(componentRef = t).base = base;\r\n\t\t\t}\r\n\t\t\tbase._component = componentRef;\r\n\t\t\tbase._componentConstructor = componentRef.constructor;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!isUpdate || mountAll) {\r\n\t\tmounts.unshift(component);\r\n\t}\r\n\telse if (!skip) {\r\n\t\t// Ensure that pending componentDidMount() hooks of child components\r\n\t\t// are called before the componentDidUpdate() hook in the parent.\r\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\r\n\t\t// flushMounts();\r\n\r\n\t\tif (component.componentDidUpdate) {\r\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (component.afterUpdate) {\r\n\t\t\tcomponent.afterUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (options.afterUpdate) options.afterUpdate(component);\r\n\t}\r\n\r\n\tif (component._renderCallbacks!=null) {\r\n\t\twhile (component._renderCallbacks.length) component._renderCallbacks.pop().call(component);\r\n\t}\r\n\r\n\tif (!diffLevel && !isChild) flushMounts();\r\n}\r\n\r\n\r\n\r\n/** Apply the Component referenced by a VNode to the DOM.\r\n *\t@param {Element} dom\tThe DOM node to mutate\r\n *\t@param {VNode} vnode\tA Component-referencing VNode\r\n *\t@returns {Element} dom\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function buildComponentFromVNode(dom, vnode, context, mountAll) {\r\n\tlet c = dom && dom._component,\r\n\t\toriginalComponent = c,\r\n\t\toldDom = dom,\r\n\t\tisDirectOwner = c && dom._componentConstructor===vnode.nodeName,\r\n\t\tisOwner = isDirectOwner,\r\n\t\tprops = getNodeProps(vnode);\r\n\twhile (c && !isOwner && (c=c._parentComponent)) {\r\n\t\tisOwner = c.constructor===vnode.nodeName;\r\n\t}\r\n\r\n\tif (c && isOwner && (!mountAll || c._component)) {\r\n\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\t}\r\n\telse {\r\n\t\tif (originalComponent && !isDirectOwner) {\r\n\t\t\tunmountComponent(originalComponent);\r\n\t\t\tdom = oldDom = null;\r\n\t\t}\r\n\r\n\t\tc = createComponent(vnode.nodeName, props, context);\r\n\t\tif (dom && !c.nextBase) {\r\n\t\t\tc.nextBase = dom;\r\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\r\n\t\t\toldDom = null;\r\n\t\t}\r\n\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\r\n\t\tif (oldDom && dom!==oldDom) {\r\n\t\t\toldDom._component = null;\r\n\t\t\trecollectNodeTree(oldDom, false);\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n\r\n\r\n/** Remove a component from the DOM and recycle it.\r\n *\t@param {Component} component\tThe Component instance to unmount\r\n *\t@private\r\n */\r\nexport function unmountComponent(component) {\r\n\tif (options.beforeUnmount) options.beforeUnmount(component);\r\n\r\n\tlet base = component.base;\r\n\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.componentWillUnmount) component.componentWillUnmount();\r\n\tif (component.uninstall) component.uninstall();\r\n\t\r\n\tcomponent.base = null;\r\n\r\n\t// recursively tear down & recollect high-order component children:\r\n\tlet inner = component._component;\r\n\tif (inner) {\r\n\t\tunmountComponent(inner);\r\n\t}\r\n\telse if (base) {\r\n\t\tif (base[ATTR_KEY] && base[ATTR_KEY].ref) base[ATTR_KEY].ref(null);\r\n\r\n\t\tcomponent.nextBase = base;\r\n\r\n\t\tremoveNode(base);\r\n\t\tcollectComponent(component);\r\n\r\n\t\tremoveChildren(base);\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(null);\r\n}\r\n","import { FORCE_RENDER } from './constants';\r\nimport { extend } from './util';\r\nimport { renderComponent } from './vdom/component';\r\nimport { enqueueRender } from './render-queue';\r\nimport options from './options';\r\n\r\nlet id = 0;\r\nfunction getId(){\r\n\treturn id++;\r\n}\r\n/** Base Component class.\r\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\r\n *\t@public\r\n *\r\n *\t@example\r\n *\tclass MyFoo extends Component {\r\n *\t\trender(props, state) {\r\n *\t\t\treturn ;\r\n *\t\t}\r\n *\t}\r\n */\r\nexport function Component(props, context) {\r\n\tthis._dirty = true;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.context = context;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.props = props;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.state = this.state || {};\r\n\r\n\tthis._id = getId();\r\n\r\n\tthis._preStyle = null;\r\n\r\n\tthis.$store = null;\r\n\r\n}\r\n\r\n\r\nextend(Component.prototype, {\r\n\r\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\r\n\t *\t@param {object} nextProps\r\n\t *\t@param {object} nextState\r\n\t *\t@param {object} nextContext\r\n\t *\t@returns {Boolean} should the component re-render\r\n\t *\t@name shouldComponentUpdate\r\n\t *\t@function\r\n\t */\r\n\r\n\r\n\t/** Update component state by copying properties from `state` to `this.state`.\r\n\t *\t@param {object} state\t\tA hash of state properties to update with new values\r\n\t *\t@param {function} callback\tA function to be called once component state is updated\r\n\t */\r\n\tsetState(state, callback) {\r\n\t\tlet s = this.state;\r\n\t\tif (!this.prevState) this.prevState = extend({}, s);\r\n\t\textend(s, typeof state==='function' ? state(s, this.props) : state);\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\tenqueueRender(this);\r\n\t},\r\n\r\n\r\n\t/** Immediately perform a synchronous re-render of the component.\r\n\t *\t@param {function} callback\t\tA function to be called after component is re-rendered.\r\n\t *\t@private\r\n\t */\r\n\tforceUpdate(callback) {\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\trenderComponent(this, FORCE_RENDER);\r\n\t\tif (options.componentChange) options.componentChange(this, this.base);\r\n\t},\r\n\r\n\tupdate(callback){\r\n\t\tthis.forceUpdate(callback);\r\n\t},\r\n\r\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n\t *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n\t *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\r\n\t *\t@param {object} state\t\tThe component's current state\r\n\t *\t@param {object} context\t\tContext object (if a parent component has provided context)\r\n\t *\t@returns VNode\r\n\t */\r\n\trender() {}\r\n\r\n});\r\n","import { diff } from './vdom/diff';\r\nimport { Component } from './component';\r\nimport options from './options';\r\nimport {addScopedAttr, addScopedAttrStatic} from './style';\r\n\r\nfunction isElement(obj) {\r\n\ttry {\r\n\t //Using W3 DOM2 (works for FF, Opera and Chrome)\r\n\t return obj instanceof HTMLElement;\r\n\t}\r\n\tcatch (e){\r\n\t //Browsers not supporting W3 DOM2 don't have HTMLElement and\r\n\t //an exception is thrown and we end up here. Testing some\r\n\t //properties that all elements have (works on IE7)\r\n\t return (typeof obj===\"object\") &&\r\n\t\t(obj.nodeType===1) && (typeof obj.style === \"object\") &&\r\n\t\t(typeof obj.ownerDocument ===\"object\");\r\n\t}\r\n}\r\n\r\n/** Render JSX into a `parent` Element.\r\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\r\n *\t@param {Element} parent\t\tDOM element to render into\r\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\r\n *\t@public\r\n *\r\n *\t@example\r\n *\t// render a div into :\r\n *\trender(hello!
, document.body);\r\n *\r\n *\t@example\r\n *\t// render a \"Thing\" component into #foo:\r\n *\tconst Thing = ({ name }) => { name };\r\n *\trender(, document.querySelector('#foo'));\r\n */\r\nexport function render(vnode, parent, merge) {\r\n\toptions.staticStyleRendered = false;\r\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent;\r\n\tif (merge === true){\r\n\t\twhile (parent.firstChild){\r\n\t\t\tparent.removeChild(parent.firstChild);\r\n\t\t}\r\n\t}\r\n\tconst m = isElement(merge) || merge === undefined;\r\n\tif (vnode instanceof Component) {\r\n\t\tif (window && window.Omi){\r\n\t\t\twindow.Omi.instances.push(vnode);\r\n\t\t}\r\n\t\tif (!m){\r\n\t\t\tvnode.$store = options.$store = merge;\r\n\t\t}\r\n\t\tif (vnode.componentWillMount) vnode.componentWillMount();\r\n\t\tif (vnode.install) vnode.install();\r\n\t\tconst rendered = vnode.render();\r\n\t\tif (vnode.style){\r\n\t\t\taddScopedAttr(rendered,vnode.style(),'_style_'+vnode._id,vnode);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (vnode.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,vnode.staticStyle(),'_style_'+vnode.constructor.name, !vnode.base);\r\n\t\t}\r\n\r\n\t\tvnode.base = diff(m ? merge : undefined, rendered, {}, false, parent, false);\r\n\t\t\r\n\t\tif (vnode.componentDidMount) vnode.componentDidMount();\r\n\t\tif (vnode.installed) vnode.installed();\r\n\t\toptions.staticStyleRendered = true;\r\n\t\treturn vnode.base;\r\n\t}\r\n\t\r\n\tlet result = diff(merge, vnode, {}, false, parent, false);\r\n\toptions.staticStyleRendered = true;\r\n\treturn result;\r\n}\r\n","/** Global options\r\n *\t@public\r\n *\t@namespace options {Object}\r\n */\r\nexport default {\r\n\r\n\tscopedStyle: true,\r\n\t$store: null,\r\n\tisWeb: true,\r\n\tstaticStyleRendered: false,\r\n\tdoc: typeof document === 'object' ? document : null\r\n\t//componentChange(component, element) { },\r\n\t/** If `true`, `prop` changes trigger synchronous component updates.\r\n\t *\t@name syncComponentUpdates\r\n\t *\t@type Boolean\r\n\t *\t@default true\r\n\t */\r\n\t//syncComponentUpdates: true,\r\n\r\n\t/** Processes all created VNodes.\r\n\t *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\r\n\t */\r\n\t//vnode(vnode) { }\r\n\r\n\t/** Hook invoked after a component is mounted. */\r\n\t//afterMount(component) { },\r\n\r\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\r\n\t//afterUpdate(component) { }\r\n\r\n\t/** Hook invoked immediately before a component is unmounted. */\r\n\t// beforeUnmount(component) { }\r\n};\r\n","import { h, h as createElement } from './h';\r\nimport { cloneElement } from './clone-element';\r\nimport { Component } from './component';\r\nimport { render } from './render';\r\nimport { rerender } from './render-queue';\r\nimport options from './options';\r\n\r\nfunction getGlobal() {\r\n\tif (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\r\n\t\tif (typeof self !== 'undefined') {\r\n\t\t\treturn self;\r\n\t\t} else if (typeof window !== 'undefined') {\r\n\t\t\treturn window;\r\n\t\t} else if (typeof global !== 'undefined') {\r\n\t\t\treturn global;\r\n\t\t}\r\n\t\treturn (function(){\r\n\t\t\treturn this;\r\n\t\t})();\r\n\t\t\r\n\t}\r\n\treturn global;\r\n}\r\n\r\nconst instances = [];\r\nconst root = getGlobal();\r\nroot.Omi = {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nroot.Omi.version = '3.0.0';\r\n\r\nexport default {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nexport {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n"]}
\ No newline at end of file
diff --git a/examples/simple/b.js b/examples/simple/b.js
index c1a758570..c67557001 100644
--- a/examples/simple/b.js
+++ b/examples/simple/b.js
@@ -1,193 +1,184 @@
-(function () {
- 'use strict';
-
- /**
- * omi v3.0.0
- * Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.
- * By dntzhang https://github.com/dntzhang
- * Github: https://github.com/AlloyTeam/omi
- * MIT Licensed.
- */
-
- /** Virtual DOM Node */
- function VNode() {}
-
+(function () {
+ 'use strict';
+
+ /** Virtual DOM Node */
+ function VNode() {}
+
/** Global options
* @public
* @namespace options {Object}
- */
- var options = {
-
- scopedStyle: true,
- $store: null,
- isWeb: true,
- doc: typeof document === 'object' ? document : null
- //componentChange(component, element) { },
+ */
+ var options = {
+
+ scopedStyle: true,
+ $store: null,
+ isWeb: true,
+ staticStyleRendered: false,
+ doc: typeof document === 'object' ? document : null
+ //componentChange(component, element) { },
/** If `true`, `prop` changes trigger synchronous component updates.
* @name syncComponentUpdates
* @type Boolean
* @default true
- */
- //syncComponentUpdates: true,
-
+ */
+ //syncComponentUpdates: true,
+
/** Processes all created VNodes.
* @param {VNode} vnode A newly-created VNode to normalize/process
- */
- //vnode(vnode) { }
-
- /** Hook invoked after a component is mounted. */
- //afterMount(component) { },
-
- /** Hook invoked after the DOM is updated with a component's latest render. */
- //afterUpdate(component) { }
-
- /** Hook invoked immediately before a component is unmounted. */
- // beforeUnmount(component) { }
- };
-
- var stack = [];
-
- var EMPTY_CHILDREN = [];
-
- var isH5 = options.isWeb;
-
- var map = {
- 'br': 'view',
- 'hr': 'view',
-
- 'p': 'view',
- 'h1': 'view',
- 'h2': 'view',
- 'h3': 'view',
- 'h4': 'view',
- 'h5': 'view',
- 'h6': 'view',
- 'abbr': 'view',
- 'address': 'view',
- 'b': 'view',
- 'bdi': 'view',
- 'bdo': 'view',
- 'blockquote': 'view',
- 'cite': 'view',
- 'code': 'view',
- 'del': 'view',
- 'ins': 'view',
- 'dfn': 'view',
- 'em': 'view',
- 'strong': 'view',
- 'samp': 'view',
- 'kbd': 'view',
- 'var': 'view',
- 'i': 'view',
- 'mark': 'view',
- 'pre': 'view',
- 'q': 'view',
- 'ruby': 'view',
- 'rp': 'view',
- 'rt': 'view',
- 's': 'view',
- 'small': 'view',
- 'sub': 'view',
- 'sup': 'view',
- 'time': 'view',
- 'u': 'view',
- 'wbr': 'view',
-
- 'form': 'form',
- 'input': 'input',
- 'textarea': 'textarea',
- 'button': 'button',
- 'select': 'picker',
- 'option': 'view',
- 'optgroup': 'view',
- 'label': 'label',
- 'fieldset': 'view',
- 'datalist': 'picker',
- 'legend': 'view',
- 'output': 'view',
-
- 'iframe': 'view',
-
- 'img': 'image',
- 'canvas': 'canvas',
- 'figure': 'view',
- 'figcaption': 'view',
-
- 'audio': 'audio',
- 'source': 'audio',
- 'video': 'video',
- 'track': 'video',
-
- 'a': 'navigator',
- 'nav': 'view',
- 'link': 'navigator',
-
- 'ul': 'view',
- 'ol': 'view',
- 'li': 'view',
- 'dl': 'view',
- 'dt': 'view',
- 'dd': 'view',
- 'menu': 'view',
- 'command': 'view',
-
- 'table': 'view',
- 'caption': 'view',
- 'th': 'view',
- 'td': 'view',
- 'tr': 'view',
- 'thead': 'view',
- 'tbody': 'view',
- 'tfoot': 'view',
- 'col': 'view',
- 'colgroup': 'view',
-
- 'div': 'view',
- 'main': 'view',
- //'span': 'label',
- 'span': 'text',
- 'header': 'view',
- 'footer': 'view',
- 'section': 'view',
- 'article': 'view',
- 'aside': 'view',
- 'details': 'view',
- 'dialog': 'view',
- 'summary': 'view',
-
- 'progress': 'progress',
- 'meter': 'progress',
- 'head': 'view',
- 'meta': 'view',
- 'base': 'text',
- 'map': 'map',
- 'area': 'navigator',
-
- 'script': 'view',
- 'noscript': 'view',
- 'embed': 'view',
- 'object': 'view',
- 'param': 'view',
-
- 'view': 'view',
- 'scroll-view': 'scroll-view',
- 'swiper': 'swiper',
- 'icon': 'icon',
- 'text': 'text',
-
- 'checkbox': 'checkbox',
- 'radio': 'radio',
- 'picker': 'picker',
- 'picker-view': 'picker-view',
- 'slider': 'slider',
- 'switch': 'switch',
- 'navigator': 'navigator',
-
- 'image': 'image',
- 'contact-button': 'contact-button',
- 'block': 'block'
- };
-
+ */
+ //vnode(vnode) { }
+
+ /** Hook invoked after a component is mounted. */
+ //afterMount(component) { },
+
+ /** Hook invoked after the DOM is updated with a component's latest render. */
+ //afterUpdate(component) { }
+
+ /** Hook invoked immediately before a component is unmounted. */
+ // beforeUnmount(component) { }
+ };
+
+ var stack = [];
+
+ var EMPTY_CHILDREN = [];
+
+ var map = {
+ 'br': 'view',
+ 'hr': 'view',
+
+ 'p': 'view',
+ 'h1': 'view',
+ 'h2': 'view',
+ 'h3': 'view',
+ 'h4': 'view',
+ 'h5': 'view',
+ 'h6': 'view',
+ 'abbr': 'view',
+ 'address': 'view',
+ 'b': 'view',
+ 'bdi': 'view',
+ 'bdo': 'view',
+ 'blockquote': 'view',
+ 'cite': 'view',
+ 'code': 'view',
+ 'del': 'view',
+ 'ins': 'view',
+ 'dfn': 'view',
+ 'em': 'view',
+ 'strong': 'view',
+ 'samp': 'view',
+ 'kbd': 'view',
+ 'var': 'view',
+ 'i': 'view',
+ 'mark': 'view',
+ 'pre': 'view',
+ 'q': 'view',
+ 'ruby': 'view',
+ 'rp': 'view',
+ 'rt': 'view',
+ 's': 'view',
+ 'small': 'view',
+ 'sub': 'view',
+ 'sup': 'view',
+ 'time': 'view',
+ 'u': 'view',
+ 'wbr': 'view',
+
+ 'form': 'form',
+ 'input': 'input',
+ 'textarea': 'textarea',
+ 'button': 'button',
+ 'select': 'picker',
+ 'option': 'view',
+ 'optgroup': 'view',
+ 'label': 'label',
+ 'fieldset': 'view',
+ 'datalist': 'picker',
+ 'legend': 'view',
+ 'output': 'view',
+
+ 'iframe': 'view',
+
+ 'img': 'image',
+ 'canvas': 'canvas',
+ 'figure': 'view',
+ 'figcaption': 'view',
+
+ 'audio': 'audio',
+ 'source': 'audio',
+ 'video': 'video',
+ 'track': 'video',
+
+ 'a': 'navigator',
+ 'nav': 'view',
+ 'link': 'navigator',
+
+ 'ul': 'view',
+ 'ol': 'view',
+ 'li': 'view',
+ 'dl': 'view',
+ 'dt': 'view',
+ 'dd': 'view',
+ 'menu': 'view',
+ 'command': 'view',
+
+ 'table': 'view',
+ 'caption': 'view',
+ 'th': 'view',
+ 'td': 'view',
+ 'tr': 'view',
+ 'thead': 'view',
+ 'tbody': 'view',
+ 'tfoot': 'view',
+ 'col': 'view',
+ 'colgroup': 'view',
+
+ 'div': 'view',
+ 'main': 'view',
+ //'span': 'label',
+ 'span': 'text',
+ 'header': 'view',
+ 'footer': 'view',
+ 'section': 'view',
+ 'article': 'view',
+ 'aside': 'view',
+ 'details': 'view',
+ 'dialog': 'view',
+ 'summary': 'view',
+
+ 'progress': 'progress',
+ 'meter': 'progress',
+ 'head': 'view',
+ 'meta': 'view',
+ 'base': 'text',
+ 'map': 'map',
+ 'area': 'navigator',
+
+ 'script': 'view',
+ 'noscript': 'view',
+ 'embed': 'view',
+ 'object': 'view',
+ 'param': 'view',
+
+ 'view': 'view',
+ 'scroll-view': 'scroll-view',
+ 'swiper': 'swiper',
+ 'icon': 'icon',
+ 'text': 'text',
+
+ 'checkbox': 'checkbox',
+ 'radio': 'radio',
+ 'picker': 'picker',
+ 'picker-view': 'picker-view',
+ 'slider': 'slider',
+ 'switch': 'switch',
+ 'navigator': 'navigator',
+
+ 'image': 'image',
+ 'contact-button': 'contact-button',
+ 'block': 'block'
+ };
+
/**
* JSX/hyperscript reviver.
* @see http://jasonformat.com/wtf-is-jsx
@@ -215,138 +206,147 @@
* @param rest Additional arguments are taken to be children to append. Can be infinitely nested Arrays.
*
* @public
- */
- function h(nodeName, attributes) {
- var children = EMPTY_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 === EMPTY_CHILDREN) {
- children = [child];
- } else {
- children.push(child);
- }
-
- lastSimple = simple;
- }
- }
-
- var p = new VNode();
- p.nodeName = isH5 ? nodeName : map[nodeName];
- p.attributes = attributes == null ? undefined : attributes;
- if (children && typeof children[0] === 'string' && !isH5) {
- if (p.attributes) {
- p.attributes.value = children[0];
- } else {
- p.attributes = { value: children[0] };
- }
- } else {
- p.children = children;
- }
- p.key = attributes == null ? undefined : attributes.key;
-
- // if a "vnode hook" is defined, pass every created VNode to it
- if (options.vnode !== undefined) options.vnode(p);
-
- return p;
- }
-
+ */
+ function h(nodeName, attributes) {
+ var children = EMPTY_CHILDREN,
+ lastSimple = void 0,
+ child = void 0,
+ simple = void 0,
+ i = void 0;
+ 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 === EMPTY_CHILDREN) {
+ children = [child];
+ } else {
+ children.push(child);
+ }
+
+ lastSimple = simple;
+ }
+ }
+
+ var p = new VNode();
+ p.nodeName = options.isWeb ? nodeName : map[nodeName];
+ p.attributes = attributes == null ? undefined : attributes;
+ if (children && typeof children[0] === 'string' && !options.isWeb) {
+ if (p.attributes) {
+ p.attributes.value = children[0];
+ } else {
+ p.attributes = { value: children[0] };
+ }
+ } else {
+ p.children = children;
+ }
+ p.key = attributes == null ? undefined : attributes.key;
+
+ // if a "vnode hook" is defined, pass every created VNode to it
+ if (options.vnode !== undefined) options.vnode(p);
+
+ return p;
+ }
+
/**
* Copy all properties from `props` onto `obj`.
* @param {Object} obj Object onto which properties should be copied.
* @param {Object} props Object from which to copy properties.
* @returns obj
* @private
- */
- function extend(obj, props) {
- for (var i in props) {
- obj[i] = props[i];
- }return obj;
- }
-
+ */
+ function extend(obj, props) {
+ for (var i in props) {
+ obj[i] = props[i];
+ }return obj;
+ }
+
/**
* Call a function asynchronously, as soon as possible. Makes
* use of HTML Promise to schedule the callback if available,
* otherwise falling back to `setTimeout` (mainly for IE<11).
*
* @param {Function} callback
- */
-
- var usePromise = typeof Promise == 'function';
-
- // for native
- if (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {
- if (global.__config__.platform === 'android') {
- usePromise = true;
- } else {
- var systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;
- if (systemVersion > 8) {
- usePromise = true;
- }
- }
- }
-
- var defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;
-
+ */
+
+ var usePromise = typeof Promise == 'function';
+
+ // for native
+ if (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {
+ if (global.__config__.platform === 'android') {
+ usePromise = true;
+ } else {
+ var systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;
+ if (systemVersion > 8) {
+ usePromise = true;
+ }
+ }
+ }
+
+ var defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;
+
/**
* Clones the given VNode, optionally adding attributes/props and replacing its children.
* @param {VNode} vnode The virtual DOM element to clone
* @param {Object} props Attributes/props to add when cloning
* @param {VNode} rest Any additional arguments will be used as replacement children.
- */
- function cloneElement(vnode, props) {
- return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);
- }
-
- // DOM properties that should NOT have "px" added when numeric
- var IS_NON_DIMENSIONAL = /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 (!component._dirty && (component._dirty = true) && items.push(component) == 1) {
- (options.debounceRendering || defer)(rerender);
- }
- }
-
- function rerender() {
- var p,
- list = items;
- items = [];
- var element;
- while (p = list.pop()) {
- element = p.base;
- if (p._dirty) renderComponent(p);
- }
- if (!list.length) {
- if (options.componentChange) options.componentChange(p, element);
- }
- }
-
+ */
+ function cloneElement(vnode, props) {
+ return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);
+ }
+
+ // render modes
+
+ var NO_RENDER = 0;
+ var SYNC_RENDER = 1;
+ var FORCE_RENDER = 2;
+ var ASYNC_RENDER = 3;
+
+ var ATTR_KEY = '__preactattr_';
+
+ // DOM properties that should NOT have "px" added when numeric
+ var IS_NON_DIMENSIONAL = /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 (!component._dirty && (component._dirty = true) && items.push(component) == 1) {
+ (options.debounceRendering || defer)(rerender);
+ }
+ }
+
+ function rerender() {
+ var p = void 0,
+ list = items;
+ items = [];
+ var element = void 0;
+ while (p = list.pop()) {
+ element = p.base;
+ if (p._dirty) renderComponent(p);
+ }
+ if (!list.length) {
+ if (options.componentChange) options.componentChange(p, element);
+ }
+ }
+
/**
* Check if two nodes are equivalent.
*
@@ -354,27 +354,27 @@
* @param {VNode} vnode Virtual DOM node to compare
* @param {boolean} [hydrating=false] If true, ignores component constructors when comparing.
* @private
- */
- function isSameNodeType(node, vnode, hydrating) {
- if (typeof vnode === 'string' || typeof vnode === 'number') {
- return node.splitText !== undefined;
- }
- if (typeof vnode.nodeName === 'string') {
- return !node._componentConstructor && isNamedNode(node, vnode.nodeName);
- }
- return hydrating || node._componentConstructor === vnode.nodeName;
- }
-
+ */
+ function isSameNodeType(node, vnode, hydrating) {
+ if (typeof vnode === 'string' || typeof vnode === 'number') {
+ return node.splitText !== undefined;
+ }
+ if (typeof vnode.nodeName === 'string') {
+ return !node._componentConstructor && isNamedNode(node, vnode.nodeName);
+ }
+ return hydrating || node._componentConstructor === vnode.nodeName;
+ }
+
/**
* Check if an Element has a given nodeName, case-insensitively.
*
* @param {Element} node A DOM Element to inspect the name of.
* @param {String} nodeName Unnormalized name to compare against.
- */
- function isNamedNode(node, nodeName) {
- return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();
- }
-
+ */
+ function isNamedNode(node, nodeName) {
+ return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();
+ }
+
/**
* Reconstruct Component-style `props` from a VNode.
* Ensures default/fallback values from `defaultProps`:
@@ -382,80 +382,78 @@
*
* @param {VNode} vnode
* @returns {Object} props
- */
- 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;
- }
-
+ */
+ 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.
* @param {String} nodeName
* @param {Boolean} [isSvg=false] If `true`, creates an element within the SVG namespace.
* @returns {Element} node
- */
- 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;
- }
-
- var isH5$1 = options.isWeb;
-
+ */
+ 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 _iterator = properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
+ var _ref3;
+
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref3 = _iterator[_i++];
+ } else {
+ _i = _iterator.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.
* @param {Element} node The node to remove
- */
- function removeNode(node) {
- var parentNode = node.parentNode;
- if (parentNode) parentNode.removeChild(node);
- }
-
+ */
+ 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.
* If `value` is `null`, the attribute/handler will be removed.
* @param {Element} node An element to mutate
@@ -464,453 +462,453 @@
* @param {any} value An attribute value, such as a function to be used as an event handler
* @param {Boolean} isSvg Are we currently diffing inside an svg?
* @private
- */
- function setAccessor(node, name, old, value, isSvg) {
- if (name === 'className') name = 'class';
-
- if (name === 'key') {
- // ignore
- } else if (name === 'ref') {
- if (old) old(null);
- if (value) value(node);
- } else if (name === 'class' && !isSvg) {
- node.className = value || '';
- } else if (name === 'style') {
- if (isH5$1) {
- if (!value || typeof value === 'string' || typeof old === 'string') {
- node.style.cssText = value || '';
- }
- if (value && 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.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 == '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$/, ''));
- name = name.toLowerCase().substring(2);
- if (value) {
- if (!old) node.addEventListener(name, eventProxy, useCapture);
- } else {
- node.removeEventListener(name, eventProxy, 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);
- }
- }
- }
-
+ */
+ function setAccessor(node, name, old, value, isSvg) {
+ if (name === 'className') name = 'class';
+
+ if (name === 'key') {
+ // ignore
+ } else if (name === 'ref') {
+ if (old) old(null);
+ if (value) 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 === 'object') {
+ if (typeof old !== 'string') {
+ for (var i in old) {
+ if (!(i in value)) node.style[i] = '';
+ }
+ }
+ for (var _i2 in value) {
+ node.style[_i2] = typeof value[_i2] === 'number' && IS_NON_DIMENSIONAL.test(_i2) === false ? value[_i2] + 'px' : value[_i2];
+ }
+ }
+ } 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 == '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$/, ''));
+ name = name.toLowerCase().substring(2);
+ if (value) {
+ if (!old) node.addEventListener(name, eventProxy, useCapture);
+ } else {
+ node.removeEventListener(name, eventProxy, 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.
* IE & FF throw for certain property-value combinations.
- */
- function setProperty(node, name, value) {
- try {
- node[name] = value;
- } catch (e) {}
- }
-
+ */
+ function setProperty(node, name, value) {
+ try {
+ node[name] = value;
+ } catch (e) {}
+ }
+
/** Proxy an event to hooked event handlers
* @private
- */
- function eventProxy(e) {
- return this._listeners[e.type](options.event && options.event(e) || e);
- }
-
- /** Queue of components that have been mounted and are awaiting componentDidMount */
- var mounts = [];
-
- /** Diff recursion count, used to track the end of the diff cycle. */
- var diffLevel = 0;
-
- /** Global flag indicating if the diff is currently within an SVG */
- var isSvgMode = false;
-
- /** Global flag indicating if the diff is performing hydration */
- var hydrating = false;
-
- /** Invoke queued componentDidMount lifecycle methods */
- function flushMounts() {
- var c;
- while (c = mounts.pop()) {
- if (options.afterMount) options.afterMount(c);
- if (c.componentDidMount) c.componentDidMount();
- if (c.installed) c.installed();
- }
- }
-
+ */
+ function eventProxy(e) {
+ return this._listeners[e.type](options.event && options.event(e) || e);
+ }
+
+ /** Queue of components that have been mounted and are awaiting componentDidMount */
+ var mounts = [];
+
+ /** Diff recursion count, used to track the end of the diff cycle. */
+ var diffLevel = 0;
+
+ /** Global flag indicating if the diff is currently within an SVG */
+ var isSvgMode = false;
+
+ /** Global flag indicating if the diff is performing hydration */
+ var hydrating = false;
+
+ /** Invoke queued componentDidMount lifecycle methods */
+ function flushMounts() {
+ var c = void 0;
+ while (c = mounts.pop()) {
+ if (options.afterMount) options.afterMount(c);
+ if (c.componentDidMount) c.componentDidMount();
+ if (c.installed) c.installed();
+ }
+ }
+
/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.
* @param {Element} [dom=null] A DOM node to mutate into the shape of the `vnode`
* @param {VNode} vnode A VNode (with descendants forming a tree) representing the desired DOM structure
* @returns {Element} dom The created/mutated element
* @private
- */
- function diff(dom, vnode, context, mountAll, parent, componentRoot) {
- // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)
- if (!diffLevel++) {
- // when first starting the diff, check if we're diffing an SVG or within an SVG
- isSvgMode = parent != null && parent.ownerSVGElement !== undefined;
-
- // hydration is indicated by the existing element to be diffed not having a prop cache
- hydrating = dom != null && !('__preactattr_' in dom);
- }
-
- var ret = idiff(dom, vnode, context, mountAll, componentRoot);
-
- // append the element if its a new parent
- if (parent && ret.parentNode !== parent) parent.appendChild(ret);
-
- // diffLevel being reduced to 0 means we're exiting the diff
- if (! --diffLevel) {
- hydrating = false;
- // invoke queued componentDidMount lifecycle methods
- if (!componentRoot) flushMounts();
- }
-
- return ret;
- }
-
- /** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */
- function idiff(dom, vnode, context, mountAll, componentRoot) {
- var out = dom,
- prevSvgMode = isSvgMode;
-
- // empty values (null, undefined, booleans) render as empty Text nodes
- if (vnode == null || typeof vnode === 'boolean') vnode = '';
-
- // Fast case: Strings & Numbers create/update Text nodes.
- if (typeof vnode === 'string' || typeof vnode === 'number') {
-
- // update if it's already a Text node:
- if (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {
- /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */
- if (dom.nodeValue != vnode) {
- dom.nodeValue = vnode;
- }
- } else {
- // it wasn't a Text node: replace it with one and recycle the old Element
- out = document.createTextNode(vnode);
- if (dom) {
- if (dom.parentNode) dom.parentNode.replaceChild(out, dom);
- recollectNodeTree(dom, true);
- }
- }
-
- out['__preactattr_'] = true;
-
- return out;
- }
-
- // If the VNode represents a Component, perform a component diff:
- var vnodeName = vnode.nodeName;
- if (typeof vnodeName === 'function') {
- return buildComponentFromVNode(dom, vnode, context, mountAll);
- }
-
- // Tracks entering and exiting SVG namespace when descending through the tree.
- isSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;
-
- // If there's no existing element or it's the wrong type, create a new one:
- vnodeName = String(vnodeName);
- if (!dom || !isNamedNode(dom, vnodeName)) {
- out = createNode(vnodeName, isSvgMode);
-
- if (dom) {
- // move children into the replacement node
- while (dom.firstChild) {
- out.appendChild(dom.firstChild);
- } // if the previous Element was mounted into the DOM, replace it inline
- if (dom.parentNode) dom.parentNode.replaceChild(out, dom);
-
- // recycle the old element (skips non-Element node types)
- recollectNodeTree(dom, true);
- }
- }
-
- var fc = out.firstChild,
- props = out['__preactattr_'],
- vchildren = vnode.children;
-
- if (props == null) {
- props = out['__preactattr_'] = {};
- for (var a = out.attributes, i = a.length; i--;) {
- props[a[i].name] = a[i].value;
- }
- }
-
- // Optimization: fast-path for elements containing a single TextNode:
- if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {
- if (fc.nodeValue != vchildren[0]) {
- fc.nodeValue = vchildren[0];
- }
- }
- // otherwise, if there are existing or new children, diff them:
- else if (vchildren && vchildren.length || fc != null) {
- innerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);
- }
-
- // Apply attributes/props from VNode to the DOM Element:
- diffAttributes(out, vnode.attributes, props);
-
- // restore previous SVG mode: (in case we're exiting an SVG namespace)
- isSvgMode = prevSvgMode;
-
- return out;
- }
-
+ */
+ function diff(dom, vnode, context, mountAll, parent, componentRoot) {
+ // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)
+ if (!diffLevel++) {
+ // when first starting the diff, check if we're diffing an SVG or within an SVG
+ isSvgMode = parent != null && parent.ownerSVGElement !== undefined;
+
+ // hydration is indicated by the existing element to be diffed not having a prop cache
+ hydrating = dom != null && !(ATTR_KEY in dom);
+ }
+
+ var ret = idiff(dom, vnode, context, mountAll, componentRoot);
+
+ // append the element if its a new parent
+ if (parent && ret.parentNode !== parent) parent.appendChild(ret);
+
+ // diffLevel being reduced to 0 means we're exiting the diff
+ if (! --diffLevel) {
+ hydrating = false;
+ // invoke queued componentDidMount lifecycle methods
+ if (!componentRoot) flushMounts();
+ }
+
+ return ret;
+ }
+
+ /** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */
+ function idiff(dom, vnode, context, mountAll, componentRoot) {
+ var out = dom,
+ prevSvgMode = isSvgMode;
+
+ // empty values (null, undefined, booleans) render as empty Text nodes
+ if (vnode == null || typeof vnode === 'boolean') vnode = '';
+
+ // Fast case: Strings & Numbers create/update Text nodes.
+ if (typeof vnode === 'string' || typeof vnode === 'number') {
+
+ // update if it's already a Text node:
+ if (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {
+ /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */
+ if (dom.nodeValue != vnode) {
+ dom.nodeValue = vnode;
+ }
+ } else {
+ // it wasn't a Text node: replace it with one and recycle the old Element
+ out = document.createTextNode(vnode);
+ if (dom) {
+ if (dom.parentNode) dom.parentNode.replaceChild(out, dom);
+ recollectNodeTree(dom, true);
+ }
+ }
+
+ out[ATTR_KEY] = true;
+
+ return out;
+ }
+
+ // If the VNode represents a Component, perform a component diff:
+ var vnodeName = vnode.nodeName;
+ if (typeof vnodeName === 'function') {
+ return buildComponentFromVNode(dom, vnode, context, mountAll);
+ }
+
+ // Tracks entering and exiting SVG namespace when descending through the tree.
+ isSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;
+
+ // If there's no existing element or it's the wrong type, create a new one:
+ vnodeName = String(vnodeName);
+ if (!dom || !isNamedNode(dom, vnodeName)) {
+ out = createNode(vnodeName, isSvgMode);
+
+ if (dom) {
+ // move children into the replacement node
+ while (dom.firstChild) {
+ out.appendChild(dom.firstChild);
+ } // if the previous Element was mounted into the DOM, replace it inline
+ if (dom.parentNode) dom.parentNode.replaceChild(out, dom);
+
+ // recycle the old element (skips non-Element node types)
+ recollectNodeTree(dom, true);
+ }
+ }
+
+ var fc = out.firstChild,
+ props = out[ATTR_KEY],
+ vchildren = vnode.children;
+
+ if (props == null) {
+ props = out[ATTR_KEY] = {};
+ for (var a = out.attributes, i = a.length; i--;) {
+ props[a[i].name] = a[i].value;
+ }
+ }
+
+ // Optimization: fast-path for elements containing a single TextNode:
+ if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {
+ if (fc.nodeValue != vchildren[0]) {
+ fc.nodeValue = vchildren[0];
+ }
+ }
+ // otherwise, if there are existing or new children, diff them:
+ else if (vchildren && vchildren.length || fc != null) {
+ innerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);
+ }
+
+ // Apply attributes/props from VNode to the DOM Element:
+ diffAttributes(out, vnode.attributes, props);
+
+ // restore previous SVG mode: (in case we're exiting an SVG namespace)
+ isSvgMode = prevSvgMode;
+
+ return out;
+ }
+
/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.
* @param {Element} dom Element whose children should be compared & mutated
* @param {Array} vchildren Array of VNodes to compare to `dom.childNodes`
* @param {Object} context Implicitly descendant context object (from most recent `getChildContext()`)
* @param {Boolean} mountAll
* @param {Boolean} isHydrating If `true`, consumes externally created elements similar to hydration
- */
- function innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {
- var originalChildren = dom.childNodes,
- children = [],
- keyed = {},
- keyedLen = 0,
- min = 0,
- len = originalChildren.length,
- childrenLen = 0,
- vlen = vchildren ? vchildren.length : 0,
- j,
- c,
- f,
- vchild,
- child;
-
- // Build up a map of keyed children and an Array of unkeyed children:
- if (len !== 0) {
- for (var i = 0; i < len; i++) {
- var _child = originalChildren[i],
- props = _child['__preactattr_'],
- key = vlen && props ? _child._component ? _child._component.__key : props.key : null;
- if (key != null) {
- keyedLen++;
- keyed[key] = _child;
- } else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {
- children[childrenLen++] = _child;
- }
- }
- }
-
- if (vlen !== 0) {
- for (var i = 0; i < vlen; i++) {
- vchild = vchildren[i];
- child = null;
-
- // attempt to find a node based on key matching
- var key = vchild.key;
- if (key != null) {
- if (keyedLen && keyed[key] !== undefined) {
- child = keyed[key];
- keyed[key] = undefined;
- keyedLen--;
- }
- }
- // attempt to pluck a node of the same type from the existing children
- else if (!child && min < childrenLen) {
- for (j = min; j < childrenLen; j++) {
- if (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {
- child = c;
- children[j] = undefined;
- if (j === childrenLen - 1) childrenLen--;
- if (j === min) min++;
- break;
- }
- }
- }
-
- // morph the matched/found/created DOM child to match vchild (deep)
- child = idiff(child, vchild, context, mountAll);
-
- f = originalChildren[i];
- if (child && child !== dom && child !== f) {
- if (f == null) {
- dom.appendChild(child);
- } else if (child === f.nextSibling) {
- removeNode(f);
- } else {
- dom.insertBefore(child, f);
- }
- }
- }
- }
-
- // remove unused keyed children:
- if (keyedLen) {
- for (var i in keyed) {
- if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);
- }
- }
-
- // remove orphaned unkeyed children:
- while (min <= childrenLen) {
- if ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);
- }
- }
-
+ */
+ function innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {
+ var originalChildren = dom.childNodes,
+ children = [],
+ keyed = {},
+ keyedLen = 0,
+ min = 0,
+ len = originalChildren.length,
+ childrenLen = 0,
+ vlen = vchildren ? vchildren.length : 0,
+ j = void 0,
+ c = void 0,
+ f = void 0,
+ vchild = void 0,
+ child = void 0;
+
+ // Build up a map of keyed children and an Array of unkeyed children:
+ if (len !== 0) {
+ for (var i = 0; i < len; i++) {
+ var _child = originalChildren[i],
+ props = _child[ATTR_KEY],
+ key = vlen && props ? _child._component ? _child._component.__key : props.key : null;
+ if (key != null) {
+ keyedLen++;
+ keyed[key] = _child;
+ } else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {
+ children[childrenLen++] = _child;
+ }
+ }
+ }
+
+ if (vlen !== 0) {
+ for (var _i = 0; _i < vlen; _i++) {
+ vchild = vchildren[_i];
+ child = null;
+
+ // attempt to find a node based on key matching
+ var _key = vchild.key;
+ if (_key != null) {
+ if (keyedLen && keyed[_key] !== undefined) {
+ child = keyed[_key];
+ keyed[_key] = undefined;
+ keyedLen--;
+ }
+ }
+ // attempt to pluck a node of the same type from the existing children
+ else if (!child && min < childrenLen) {
+ for (j = min; j < childrenLen; j++) {
+ if (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {
+ child = c;
+ children[j] = undefined;
+ if (j === childrenLen - 1) childrenLen--;
+ if (j === min) min++;
+ break;
+ }
+ }
+ }
+
+ // morph the matched/found/created DOM child to match vchild (deep)
+ child = idiff(child, vchild, context, mountAll);
+
+ f = originalChildren[_i];
+ if (child && child !== dom && child !== f) {
+ if (f == null) {
+ dom.appendChild(child);
+ } else if (child === f.nextSibling) {
+ removeNode(f);
+ } else {
+ dom.insertBefore(child, f);
+ }
+ }
+ }
+ }
+
+ // remove unused keyed children:
+ if (keyedLen) {
+ for (var _i2 in keyed) {
+ if (keyed[_i2] !== undefined) recollectNodeTree(keyed[_i2], false);
+ }
+ }
+
+ // remove orphaned unkeyed children:
+ while (min <= childrenLen) {
+ if ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);
+ }
+ }
+
/** Recursively recycle (or just unmount) a node and its descendants.
* @param {Node} node DOM node to start unmount/removal from
* @param {Boolean} [unmountOnly=false] If `true`, only triggers unmount lifecycle, skips removal
- */
- function recollectNodeTree(node, unmountOnly) {
- var component = node._component;
- if (component) {
- // if node is owned by a Component, unmount that component (ends up recursing back here)
- unmountComponent(component);
- } else {
- // If the node's VNode had a ref function, invoke it with null here.
- // (this is part of the React spec, and smart for unsetting references)
- if (node['__preactattr_'] != null && node['__preactattr_'].ref) node['__preactattr_'].ref(null);
-
- if (unmountOnly === false || node['__preactattr_'] == null) {
- removeNode(node);
- }
-
- removeChildren(node);
- }
- }
-
+ */
+ function recollectNodeTree(node, unmountOnly) {
+ var component = node._component;
+ if (component) {
+ // if node is owned by a Component, unmount that component (ends up recursing back here)
+ unmountComponent(component);
+ } else {
+ // If the node's VNode had a ref function, invoke it with null here.
+ // (this is part of the React spec, and smart for unsetting references)
+ if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) node[ATTR_KEY].ref(null);
+
+ if (unmountOnly === false || node[ATTR_KEY] == null) {
+ removeNode(node);
+ }
+
+ removeChildren(node);
+ }
+ }
+
/** Recollect/unmount all children.
* - we use .lastChild here because it causes less reflow than .firstChild
* - it's also cheaper than accessing the .childNodes Live NodeList
- */
- function removeChildren(node) {
- node = node.lastChild;
- while (node) {
- var next = node.previousSibling;
- recollectNodeTree(node, true);
- node = next;
- }
- }
-
+ */
+ function removeChildren(node) {
+ node = node.lastChild;
+ while (node) {
+ var next = node.previousSibling;
+ recollectNodeTree(node, true);
+ node = next;
+ }
+ }
+
/** Apply differences in attributes from a VNode to the given DOM Element.
* @param {Element} dom Element with attributes to diff `attrs` against
* @param {Object} attrs The desired end-state key-value attribute pairs
* @param {Object} old Current/previous attributes (from previous VNode or element's prop cache)
- */
- function diffAttributes(dom, attrs, old) {
- var name;
-
- // remove attributes no longer present on the vnode by setting them to undefined
- for (name in old) {
- if (!(attrs && attrs[name] != null) && old[name] != null) {
- setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);
- }
- }
-
- // add new & update changed attributes
- for (name in attrs) {
- if (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {
- setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);
- }
- }
- }
-
+ */
+ function diffAttributes(dom, attrs, old) {
+ var name = void 0;
+
+ // remove attributes no longer present on the vnode by setting them to undefined
+ for (name in old) {
+ if (!(attrs && attrs[name] != null) && old[name] != null) {
+ setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);
+ }
+ }
+
+ // add new & update changed attributes
+ for (name in attrs) {
+ if (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {
+ setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);
+ }
+ }
+ }
+
/** Retains a pool of Components for re-use, keyed on component name.
* Note: since component names are not unique or even necessarily available, these are primarily a form of sharding.
* @private
- */
- var components = {};
-
- /** Reclaim a component for later re-use by the recycler. */
- function collectComponent(component) {
- var name = component.constructor.name;
- (components[name] || (components[name] = [])).push(component);
- }
-
- /** Create a component. Normalizes differences between PFC's and classful Components. */
- function createComponent(Ctor, props, context) {
- var list = components[Ctor.name],
- inst;
-
- if (Ctor.prototype && Ctor.prototype.render) {
- inst = new Ctor(props, context);
- Component.call(inst, props, context);
- } else {
- inst = new Component(props, context);
- inst.constructor = Ctor;
- inst.render = doRender;
- }
- inst.$store = options.$store;
- if (window && window.Omi) {
- window.Omi.instances.push(inst);
- }
-
- if (list) {
- for (var i = list.length; i--;) {
- if (list[i].constructor === Ctor) {
- inst.nextBase = list[i].nextBase;
- list.splice(i, 1);
- break;
- }
- }
- }
- return inst;
- }
-
- /** The `.render()` method for a PFC backing instance. */
- function doRender(props, state, context) {
- return this.constructor(props, context);
- }
-
- // many thanks to https://github.com/thomaspark/scoper/
- function scoper(css, prefix) {
- prefix = '[' + prefix.toLowerCase() + ']';
- // https://www.w3.org/TR/css-syntax-3/#lexical
- css = css.replace(/\/\*[^*]*\*+([^/][^*]*\*+)*\//g, '');
- // eslint-disable-next-line
- var re = new RegExp('([^\r\n,{}:]+)(:[^\r\n,{}]+)?(,(?=[^{}]*{)|\s*{)', 'g');
+ */
+ var components = {};
+
+ /** Reclaim a component for later re-use by the recycler. */
+ function collectComponent(component) {
+ var name = component.constructor.name;
+ (components[name] || (components[name] = [])).push(component);
+ }
+
+ /** Create a component. Normalizes differences between PFC's and classful Components. */
+ function createComponent(Ctor, props, context) {
+ var list = components[Ctor.name],
+ inst = void 0;
+
+ if (Ctor.prototype && Ctor.prototype.render) {
+ inst = new Ctor(props, context);
+ Component.call(inst, props, context);
+ } else {
+ inst = new Component(props, context);
+ inst.constructor = Ctor;
+ inst.render = doRender;
+ }
+ inst.$store = options.$store;
+ if (window && window.Omi) {
+ window.Omi.instances.push(inst);
+ }
+
+ if (list) {
+ for (var i = list.length; i--;) {
+ if (list[i].constructor === Ctor) {
+ inst.nextBase = list[i].nextBase;
+ list.splice(i, 1);
+ break;
+ }
+ }
+ }
+ return inst;
+ }
+
+ /** The `.render()` method for a PFC backing instance. */
+ function doRender(props, state, context) {
+ return this.constructor(props, context);
+ }
+
+ // many thanks to https://github.com/thomaspark/scoper/
+ function scoper(css, prefix) {
+ prefix = '[' + prefix.toLowerCase() + ']';
+ // https://www.w3.org/TR/css-syntax-3/#lexical
+ css = css.replace(/\/\*[^*]*\*+([^/][^*]*\*+)*\//g, '');
+ // eslint-disable-next-line
+ var re = new RegExp('([^\r\n,{}:]+)(:[^\r\n,{}]+)?(,(?=[^{}]*{)|\s*{)', 'g');
/**
* Example:
*
@@ -919,367 +917,369 @@
* g1 is normal selector `.classname`
* g2 is pesudo class or pesudo element
* g3 is the suffix
- */
- css = css.replace(re, function (g0, g1, g2, g3) {
- if (typeof g2 === 'undefined') {
- g2 = '';
- }
-
- /* eslint-ignore-next-line */
- if (g1.match(/^\s*(@media|\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {
- return g1 + g2 + g3;
- }
-
- var appendClass = g1.replace(/(\s*)$/, '') + prefix + g2;
- var prependClass = prefix + ' ' + g1.trim() + g2;
- return appendClass + ',' + prependClass + g3;
- });
-
- return css;
- }
-
- function addStyle(cssText, id) {
- id = id.toLowerCase();
- var ele = document.getElementById(id);
- var head = document.getElementsByTagName('head')[0];
- if (ele && ele.parentNode === head) {
- head.removeChild(ele);
- }
-
- var someThingStyles = document.createElement('style');
- head.appendChild(someThingStyles);
- someThingStyles.setAttribute('type', 'text/css');
- someThingStyles.setAttribute('id', id);
- if (window.ActiveXObject) {
- someThingStyles.styleSheet.cssText = cssText;
- } else {
- someThingStyles.textContent = cssText;
- }
- }
-
- function addStyleWithoutId(cssText) {
- var head = document.getElementsByTagName('head')[0];
- var someThingStyles = document.createElement('style');
- head.appendChild(someThingStyles);
- someThingStyles.setAttribute('type', 'text/css');
-
- if (window.ActiveXObject) {
- someThingStyles.styleSheet.cssText = cssText;
- } else {
- someThingStyles.textContent = cssText;
- }
- }
-
- function addScopedAttr(vdom, style, attr, component) {
- if (options.scopedStyle) {
- scopeVdom(attr, vdom);
- style = scoper(style, attr);
- if (style !== component._preStyle) {
- addStyle(style, attr);
- }
- } else if (style !== component._preStyle) {
- addStyleWithoutId(style);
- }
- component._preStyle = style;
- }
-
- function addScopedAttrStatic(vdom, style, attr, firstTime) {
- if (options.scopedStyle) {
- scopeVdom(attr, vdom);
- if (firstTime) {
- addStyle(scoper(style, attr), attr);
- }
- } else if (firstTime) {
- addStyleWithoutId(style);
- }
- }
-
- function scopeVdom(attr, vdom) {
- if (typeof vdom !== 'string') {
- vdom.attributes = vdom.attributes || {};
- vdom.attributes[attr] = '';
- vdom.children.forEach(function (child) {
- return scopeVdom(attr, child);
- });
- }
- }
-
+ */
+ css = css.replace(re, function (g0, g1, g2, g3) {
+ if (typeof g2 === 'undefined') {
+ g2 = '';
+ }
+
+ /* eslint-ignore-next-line */
+ if (g1.match(/^\s*(@media|\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {
+ return g1 + g2 + g3;
+ }
+
+ var appendClass = g1.replace(/(\s*)$/, '') + prefix + g2;
+ var prependClass = prefix + ' ' + g1.trim() + g2;
+
+ return appendClass + g3;
+ //return appendClass + ',' + prependClass + g3;
+ });
+
+ return css;
+ }
+
+ function addStyle(cssText, id) {
+ id = id.toLowerCase();
+ var ele = document.getElementById(id);
+ var head = document.getElementsByTagName('head')[0];
+ if (ele && ele.parentNode === head) {
+ head.removeChild(ele);
+ }
+
+ var someThingStyles = document.createElement('style');
+ head.appendChild(someThingStyles);
+ someThingStyles.setAttribute('type', 'text/css');
+ someThingStyles.setAttribute('id', id);
+ if (window.ActiveXObject) {
+ someThingStyles.styleSheet.cssText = cssText;
+ } else {
+ someThingStyles.textContent = cssText;
+ }
+ }
+
+ function addStyleWithoutId(cssText) {
+ var head = document.getElementsByTagName('head')[0];
+ var someThingStyles = document.createElement('style');
+ head.appendChild(someThingStyles);
+ someThingStyles.setAttribute('type', 'text/css');
+
+ if (window.ActiveXObject) {
+ someThingStyles.styleSheet.cssText = cssText;
+ } else {
+ someThingStyles.textContent = cssText;
+ }
+ }
+
+ function addScopedAttr(vdom, style, attr, component) {
+ if (options.scopedStyle) {
+ scopeVdom(attr, vdom);
+ style = scoper(style, attr);
+ if (style !== component._preStyle) {
+ addStyle(style, attr);
+ }
+ } else if (style !== component._preStyle) {
+ addStyleWithoutId(style);
+ }
+ component._preStyle = style;
+ }
+
+ function addScopedAttrStatic(vdom, style, attr) {
+ if (options.scopedStyle) {
+ scopeVdom(attr, vdom);
+ if (!options.staticStyleRendered) {
+ addStyle(scoper(style, attr), attr);
+ }
+ } else if (!options.staticStyleRendered) {
+ addStyleWithoutId(style);
+ }
+ }
+
+ function scopeVdom(attr, vdom) {
+ if (typeof vdom !== 'string') {
+ vdom.attributes = vdom.attributes || {};
+ vdom.attributes[attr] = '';
+ vdom.children.forEach(function (child) {
+ return scopeVdom(attr, child);
+ });
+ }
+ }
+
/** Set a component's `props` (generally derived from JSX attributes).
* @param {Object} props
* @param {Object} [opts]
* @param {boolean} [opts.renderSync=false] If `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.
* @param {boolean} [opts.render=true] If `false`, no render will be triggered.
- */
- function setComponentProps(component, props, opts, context, mountAll) {
- if (component._disable) return;
- component._disable = true;
-
- if (component.__ref = props.ref) delete props.ref;
- if (component.__key = props.key) delete props.key;
-
- if (!component.base || mountAll) {
- if (component.componentWillMount) component.componentWillMount();
- if (component.install) component.install();
- } else if (component.componentWillReceiveProps) {
- component.componentWillReceiveProps(props, context);
- }
-
- if (context && context !== component.context) {
- if (!component.prevContext) component.prevContext = component.context;
- component.context = context;
- }
-
- if (!component.prevProps) component.prevProps = component.props;
- component.props = props;
-
- component._disable = false;
-
- if (opts !== 0) {
- if (opts === 1 || options.syncComponentUpdates !== false || !component.base) {
- renderComponent(component, 1, mountAll);
- } else {
- enqueueRender(component);
- }
- }
-
- if (component.__ref) component.__ref(component);
- }
-
+ */
+ function setComponentProps(component, props, opts, context, mountAll) {
+ if (component._disable) return;
+ component._disable = true;
+
+ if (component.__ref = props.ref) delete props.ref;
+ if (component.__key = props.key) delete props.key;
+
+ if (!component.base || mountAll) {
+ if (component.componentWillMount) component.componentWillMount();
+ if (component.install) component.install();
+ } else if (component.componentWillReceiveProps) {
+ component.componentWillReceiveProps(props, context);
+ }
+
+ if (context && context !== component.context) {
+ if (!component.prevContext) component.prevContext = component.context;
+ component.context = context;
+ }
+
+ if (!component.prevProps) component.prevProps = component.props;
+ component.props = props;
+
+ component._disable = false;
+
+ if (opts !== NO_RENDER) {
+ if (opts === SYNC_RENDER || options.syncComponentUpdates !== false || !component.base) {
+ renderComponent(component, SYNC_RENDER, mountAll);
+ } else {
+ enqueueRender(component);
+ }
+ }
+
+ if (component.__ref) component.__ref(component);
+ }
+
/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.
* @param {Component} component
* @param {Object} [opts]
* @param {boolean} [opts.build=false] If `true`, component will build and store a DOM node if not already associated with one.
* @private
- */
- function renderComponent(component, opts, mountAll, isChild) {
- if (component._disable) return;
-
- var props = component.props,
- state = component.state,
- context = component.context,
- previousProps = component.prevProps || props,
- previousState = component.prevState || state,
- previousContext = component.prevContext || context,
- isUpdate = component.base,
- nextBase = component.nextBase,
- initialBase = isUpdate || nextBase,
- initialChildComponent = component._component,
- skip = false,
- rendered,
- inst,
- cbase;
-
- // if updating
- if (isUpdate) {
- component.props = previousProps;
- component.state = previousState;
- component.context = previousContext;
- if (opts !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {
- skip = true;
- } else if (component.componentWillUpdate) {
- component.componentWillUpdate(props, state, context);
- } else if (component.beforeUpdate) {
- component.beforeUpdate(props, state, context);
- }
- component.props = props;
- component.state = state;
- component.context = context;
- }
-
- component.prevProps = component.prevState = component.prevContext = component.nextBase = null;
- component._dirty = false;
-
- if (!skip) {
- rendered = component.render(props, state, context);
-
- if (component.style) {
- addScopedAttr(rendered, component.style(), '_style_' + component._id, component);
- }
-
- //don't rerender
- if (component.staticStyle) {
- addScopedAttrStatic(rendered, component.staticStyle(), '_style_' + component.constructor.name, !component.base);
- }
-
- // context to pass to the child, can be updated via (grand-)parent component
- if (component.getChildContext) {
- context = extend(extend({}, context), component.getChildContext());
- }
-
- var childComponent = rendered && rendered.nodeName,
- toUnmount,
- base;
-
- if (typeof childComponent === 'function') {
- // set up high order component link
-
- var childProps = getNodeProps(rendered);
- inst = initialChildComponent;
-
- if (inst && inst.constructor === childComponent && childProps.key == inst.__key) {
- setComponentProps(inst, childProps, 1, context, false);
- } else {
- toUnmount = inst;
-
- component._component = inst = createComponent(childComponent, childProps, context);
- inst.nextBase = inst.nextBase || nextBase;
- inst._parentComponent = component;
- setComponentProps(inst, childProps, 0, context, false);
- renderComponent(inst, 1, mountAll, true);
- }
-
- base = inst.base;
- } else {
- cbase = initialBase;
-
- // destroy high order component link
- toUnmount = initialChildComponent;
- if (toUnmount) {
- cbase = component._component = null;
- }
-
- if (initialBase || opts === 1) {
- if (cbase) cbase._component = null;
- base = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);
- }
- }
-
- if (initialBase && base !== initialBase && inst !== initialChildComponent) {
- var baseParent = initialBase.parentNode;
- if (baseParent && base !== baseParent) {
- baseParent.replaceChild(base, initialBase);
-
- if (!toUnmount) {
- initialBase._component = null;
- recollectNodeTree(initialBase, false);
- }
- }
- }
-
- if (toUnmount) {
- unmountComponent(toUnmount);
- }
-
- component.base = base;
- if (base && !isChild) {
- var componentRef = component,
- t = component;
- while (t = t._parentComponent) {
- (componentRef = t).base = base;
- }
- base._component = componentRef;
- base._componentConstructor = componentRef.constructor;
- }
- }
-
- if (!isUpdate || mountAll) {
- mounts.unshift(component);
- } else if (!skip) {
- // Ensure that pending componentDidMount() hooks of child components
- // are called before the componentDidUpdate() hook in the parent.
- // Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750
- // flushMounts();
-
- if (component.componentDidUpdate) {
- component.componentDidUpdate(previousProps, previousState, previousContext);
- }
- if (component.afterUpdate) {
- component.afterUpdate(previousProps, previousState, previousContext);
- }
- if (options.afterUpdate) options.afterUpdate(component);
- }
-
- if (component._renderCallbacks != null) {
- while (component._renderCallbacks.length) {
- component._renderCallbacks.pop().call(component);
- }
- }
-
- if (!diffLevel && !isChild) flushMounts();
- }
-
+ */
+ function renderComponent(component, opts, mountAll, isChild) {
+ if (component._disable) return;
+
+ var props = component.props,
+ state = component.state,
+ context = component.context,
+ previousProps = component.prevProps || props,
+ previousState = component.prevState || state,
+ previousContext = component.prevContext || context,
+ isUpdate = component.base,
+ nextBase = component.nextBase,
+ initialBase = isUpdate || nextBase,
+ initialChildComponent = component._component,
+ skip = false,
+ rendered = void 0,
+ inst = void 0,
+ cbase = void 0;
+
+ // if updating
+ if (isUpdate) {
+ component.props = previousProps;
+ component.state = previousState;
+ component.context = previousContext;
+ if (opts !== FORCE_RENDER && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {
+ skip = true;
+ } else if (component.componentWillUpdate) {
+ component.componentWillUpdate(props, state, context);
+ } else if (component.beforeUpdate) {
+ component.beforeUpdate(props, state, context);
+ }
+ component.props = props;
+ component.state = state;
+ component.context = context;
+ }
+
+ component.prevProps = component.prevState = component.prevContext = component.nextBase = null;
+ component._dirty = false;
+
+ if (!skip) {
+ rendered = component.render(props, state, context);
+
+ if (component.style) {
+ addScopedAttr(rendered, component.style(), '_style_' + component._id, component);
+ }
+
+ //don't rerender
+ if (component.staticStyle) {
+ addScopedAttrStatic(rendered, component.staticStyle(), '_style_' + component.constructor.name);
+ }
+
+ // context to pass to the child, can be updated via (grand-)parent component
+ if (component.getChildContext) {
+ context = extend(extend({}, context), component.getChildContext());
+ }
+
+ var childComponent = rendered && rendered.nodeName,
+ toUnmount = void 0,
+ base = void 0;
+
+ if (typeof childComponent === 'function') {
+ // set up high order component link
+
+ var childProps = getNodeProps(rendered);
+ inst = initialChildComponent;
+
+ if (inst && inst.constructor === childComponent && childProps.key == inst.__key) {
+ setComponentProps(inst, childProps, SYNC_RENDER, context, false);
+ } else {
+ toUnmount = inst;
+
+ component._component = inst = createComponent(childComponent, childProps, context);
+ inst.nextBase = inst.nextBase || nextBase;
+ inst._parentComponent = component;
+ setComponentProps(inst, childProps, NO_RENDER, context, false);
+ renderComponent(inst, SYNC_RENDER, mountAll, true);
+ }
+
+ base = inst.base;
+ } else {
+ cbase = initialBase;
+
+ // destroy high order component link
+ toUnmount = initialChildComponent;
+ if (toUnmount) {
+ cbase = component._component = null;
+ }
+
+ if (initialBase || opts === SYNC_RENDER) {
+ if (cbase) cbase._component = null;
+ base = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);
+ }
+ }
+
+ if (initialBase && base !== initialBase && inst !== initialChildComponent) {
+ var baseParent = initialBase.parentNode;
+ if (baseParent && base !== baseParent) {
+ baseParent.replaceChild(base, initialBase);
+
+ if (!toUnmount) {
+ initialBase._component = null;
+ recollectNodeTree(initialBase, false);
+ }
+ }
+ }
+
+ if (toUnmount) {
+ unmountComponent(toUnmount);
+ }
+
+ component.base = base;
+ if (base && !isChild) {
+ var componentRef = component,
+ t = component;
+ while (t = t._parentComponent) {
+ (componentRef = t).base = base;
+ }
+ base._component = componentRef;
+ base._componentConstructor = componentRef.constructor;
+ }
+ }
+
+ if (!isUpdate || mountAll) {
+ mounts.unshift(component);
+ } else if (!skip) {
+ // Ensure that pending componentDidMount() hooks of child components
+ // are called before the componentDidUpdate() hook in the parent.
+ // Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750
+ // flushMounts();
+
+ if (component.componentDidUpdate) {
+ component.componentDidUpdate(previousProps, previousState, previousContext);
+ }
+ if (component.afterUpdate) {
+ component.afterUpdate(previousProps, previousState, previousContext);
+ }
+ if (options.afterUpdate) options.afterUpdate(component);
+ }
+
+ if (component._renderCallbacks != null) {
+ while (component._renderCallbacks.length) {
+ component._renderCallbacks.pop().call(component);
+ }
+ }
+
+ if (!diffLevel && !isChild) flushMounts();
+ }
+
/** Apply the Component referenced by a VNode to the DOM.
* @param {Element} dom The DOM node to mutate
* @param {VNode} vnode A Component-referencing VNode
* @returns {Element} dom The created/mutated element
* @private
- */
- function buildComponentFromVNode(dom, vnode, context, mountAll) {
- var c = dom && dom._component,
- originalComponent = c,
- oldDom = dom,
- isDirectOwner = c && dom._componentConstructor === vnode.nodeName,
- isOwner = isDirectOwner,
- props = getNodeProps(vnode);
- while (c && !isOwner && (c = c._parentComponent)) {
- isOwner = c.constructor === vnode.nodeName;
- }
-
- if (c && isOwner && (!mountAll || c._component)) {
- setComponentProps(c, props, 3, context, mountAll);
- dom = c.base;
- } else {
- if (originalComponent && !isDirectOwner) {
- unmountComponent(originalComponent);
- dom = oldDom = null;
- }
-
- c = createComponent(vnode.nodeName, props, context);
- if (dom && !c.nextBase) {
- c.nextBase = dom;
- // passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:
- oldDom = null;
- }
- setComponentProps(c, props, 1, context, mountAll);
- dom = c.base;
-
- if (oldDom && dom !== oldDom) {
- oldDom._component = null;
- recollectNodeTree(oldDom, false);
- }
- }
-
- return dom;
- }
-
+ */
+ function buildComponentFromVNode(dom, vnode, context, mountAll) {
+ var c = dom && dom._component,
+ originalComponent = c,
+ oldDom = dom,
+ isDirectOwner = c && dom._componentConstructor === vnode.nodeName,
+ isOwner = isDirectOwner,
+ props = getNodeProps(vnode);
+ while (c && !isOwner && (c = c._parentComponent)) {
+ isOwner = c.constructor === vnode.nodeName;
+ }
+
+ if (c && isOwner && (!mountAll || c._component)) {
+ setComponentProps(c, props, ASYNC_RENDER, context, mountAll);
+ dom = c.base;
+ } else {
+ if (originalComponent && !isDirectOwner) {
+ unmountComponent(originalComponent);
+ dom = oldDom = null;
+ }
+
+ c = createComponent(vnode.nodeName, props, context);
+ if (dom && !c.nextBase) {
+ c.nextBase = dom;
+ // passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:
+ oldDom = null;
+ }
+ setComponentProps(c, props, SYNC_RENDER, context, mountAll);
+ dom = c.base;
+
+ if (oldDom && dom !== oldDom) {
+ oldDom._component = null;
+ recollectNodeTree(oldDom, false);
+ }
+ }
+
+ return dom;
+ }
+
/** Remove a component from the DOM and recycle it.
* @param {Component} component The Component instance to unmount
* @private
- */
- function unmountComponent(component) {
- if (options.beforeUnmount) options.beforeUnmount(component);
-
- var base = component.base;
-
- component._disable = true;
-
- if (component.componentWillUnmount) component.componentWillUnmount();
- if (component.uninstall) component.uninstall();
-
- component.base = null;
-
- // recursively tear down & recollect high-order component children:
- var inner = component._component;
- if (inner) {
- unmountComponent(inner);
- } else if (base) {
- if (base['__preactattr_'] && base['__preactattr_'].ref) base['__preactattr_'].ref(null);
-
- component.nextBase = base;
-
- removeNode(base);
- collectComponent(component);
-
- removeChildren(base);
- }
-
- if (component.__ref) component.__ref(null);
- }
-
- var id = 0;
- function getId() {
- return id++;
- }
+ */
+ function unmountComponent(component) {
+ if (options.beforeUnmount) options.beforeUnmount(component);
+
+ var base = component.base;
+
+ component._disable = true;
+
+ if (component.componentWillUnmount) component.componentWillUnmount();
+ if (component.uninstall) component.uninstall();
+
+ component.base = null;
+
+ // recursively tear down & recollect high-order component children:
+ var inner = component._component;
+ if (inner) {
+ unmountComponent(inner);
+ } else if (base) {
+ if (base[ATTR_KEY] && base[ATTR_KEY].ref) base[ATTR_KEY].ref(null);
+
+ component.nextBase = base;
+
+ removeNode(base);
+ collectComponent(component);
+
+ removeChildren(base);
+ }
+
+ if (component.__ref) component.__ref(null);
+ }
+
+ var id = 0;
+ function getId() {
+ return id++;
+ }
/** Base Component class.
* Provides `setState()` and `forceUpdate()`, which trigger rendering.
* @public
@@ -1290,34 +1290,34 @@
* return ;
* }
* }
- */
- function Component(props, context) {
- this._dirty = true;
-
+ */
+ function Component(props, context) {
+ this._dirty = true;
+
/** @public
* @type {object}
- */
- this.context = context;
-
+ */
+ this.context = context;
+
/** @public
* @type {object}
- */
- this.props = props;
-
+ */
+ this.props = props;
+
/** @public
* @type {object}
- */
- this.state = this.state || {};
-
- this._id = getId();
-
- this._preStyle = null;
-
- this.$store = null;
- }
-
- extend(Component.prototype, {
-
+ */
+ this.state = this.state || {};
+
+ this._id = getId();
+
+ this._preStyle = null;
+
+ this.$store = null;
+ }
+
+ extend(Component.prototype, {
+
/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.
* @param {object} nextProps
* @param {object} nextState
@@ -1325,55 +1325,57 @@
* @returns {Boolean} should the component re-render
* @name shouldComponentUpdate
* @function
- */
-
+ */
+
/** Update component state by copying properties from `state` to `this.state`.
* @param {object} state A hash of state properties to update with new values
* @param {function} callback A function to be called once component state is updated
- */
- setState: function setState(state, callback) {
- var s = this.state;
- if (!this.prevState) this.prevState = extend({}, s);
- extend(s, typeof state === 'function' ? state(s, this.props) : state);
- if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);
- enqueueRender(this);
- },
-
+ */
+ setState: function setState(state, callback) {
+ var s = this.state;
+ if (!this.prevState) this.prevState = extend({}, s);
+ extend(s, typeof state === 'function' ? state(s, this.props) : state);
+ if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);
+ enqueueRender(this);
+ },
+
+
/** Immediately perform a synchronous re-render of the component.
* @param {function} callback A function to be called after component is re-rendered.
* @private
- */
- forceUpdate: function forceUpdate(callback) {
- if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);
- renderComponent(this, 2);
- if (options.componentChange) options.componentChange(this, this.base);
- },
- update: function update(callback) {
- this.forceUpdate(callback);
- },
-
+ */
+ forceUpdate: function forceUpdate(callback) {
+ if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);
+ renderComponent(this, FORCE_RENDER);
+ if (options.componentChange) options.componentChange(this, this.base);
+ },
+ update: function update(callback) {
+ this.forceUpdate(callback);
+ },
+
+
/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.
* Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).
* @param {object} props Props (eg: JSX attributes) received from parent element/component
* @param {object} state The component's current state
* @param {object} context Context object (if a parent component has provided context)
* @returns VNode
- */
- render: function render() {}
- });
-
- function isElement(obj) {
- try {
- //Using W3 DOM2 (works for FF, Opera and Chrome)
- return obj instanceof HTMLElement;
- } catch (e) {
- //Browsers not supporting W3 DOM2 don't have HTMLElement and
- //an exception is thrown and we end up here. Testing some
- //properties that all elements have (works on IE7)
- return typeof obj === "object" && obj.nodeType === 1 && typeof obj.style === "object" && typeof obj.ownerDocument === "object";
- }
- }
-
+ */
+ render: function render() {}
+ });
+
+ function isElement(obj) {
+ try {
+ //Using W3 DOM2 (works for FF, Opera and Chrome)
+ return obj instanceof HTMLElement;
+ } catch (e) {
+ //Browsers not supporting W3 DOM2 don't have HTMLElement and
+ //an exception is thrown and we end up here. Testing some
+ //properties that all elements have (works on IE7)
+ return typeof obj === "object" && obj.nodeType === 1 && typeof obj.style === "object" && typeof obj.ownerDocument === "object";
+ }
+ }
+
/** Render JSX into a `parent` Element.
* @param {VNode} vnode A (JSX) VNode to render
* @param {Element} parent DOM element to render into
@@ -1388,146 +1390,150 @@
* // render a "Thing" component into #foo:
* const Thing = ({ name }) => { name };
* render(, document.querySelector('#foo'));
- */
- function render(vnode, parent, merge) {
- parent = typeof parent === 'string' ? document.querySelector(parent) : parent;
- if (merge === true) {
- while (parent.firstChild) {
- parent.removeChild(parent.firstChild);
- }
- }
- var m = isElement(merge) || merge === undefined;
- if (vnode instanceof Component) {
- if (window && window.Omi) {
- window.Omi.instances.push(vnode);
- }
- if (vnode.componentWillMount) vnode.componentWillMount();
- if (vnode.install) vnode.install();
- var rendered = vnode.render();
- if (vnode.style) {
- addScopedAttr(rendered, vnode.style(), '_style_' + vnode._id, vnode);
- }
-
- //don't rerender
- if (vnode.staticStyle) {
- addScopedAttrStatic(rendered, vnode.staticStyle(), '_style_' + vnode.constructor.name, !vnode.base);
- }
-
- if (m) {
- vnode.base = diff(merge, rendered, {}, false, parent, false);
- } else {
- vnode.$store = options.$store = merge;
- vnode.base = diff(undefined, rendered, {}, false, parent, false);
- }
- if (vnode.componentDidMount) vnode.componentDidMount();
- if (vnode.installed) vnode.installed();
- return vnode.base;
- }
-
- return diff(merge, vnode, {}, false, parent, false);
- }
-
- function getGlobal() {
- if (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {
- if (typeof self !== 'undefined') {
- return self;
- } else if (typeof window !== 'undefined') {
- return window;
- } else if (typeof global !== 'undefined') {
- return global;
- }
- return function () {
- return this;
- }();
- }
- return global;
- }
-
- var instances = [];
- var root = getGlobal();
- root.Omi = {
- h: h,
- createElement: h,
- cloneElement: cloneElement,
- Component: Component,
- render: render,
- rerender: rerender,
- options: options,
- instances: instances
- };
- //# sourceMappingURL=omi.esm.js.map
-
- function _classCallCheck(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 === "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); } 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 Hello = function (_Component) {
- _inherits(Hello, _Component);
-
- function Hello() {
- _classCallCheck(this, Hello);
-
- return _possibleConstructorReturn(this, _Component.apply(this, arguments));
- }
-
- Hello.prototype.render = function render$$1() {
- return Omi.h(
- 'div',
- null,
- ' ',
- this.props.name
- );
- };
-
- return Hello;
- }(Component);
-
- var App = function (_Component2) {
- _inherits(App, _Component2);
-
- function App() {
- _classCallCheck(this, App);
-
- return _possibleConstructorReturn(this, _Component2.apply(this, arguments));
- }
-
- App.prototype.install = function install() {
- this.name = 'Omi';
- this.handleClick = this.handleClick.bind(this);
- };
-
- App.prototype.handleClick = function handleClick(e) {
- this.name = 'Hello Omi !';
- this.update();
- };
-
- App.prototype.style = function style() {
- return 'h3{\n\t\t\t\t cursor:pointer;\n\t color: ' + (Math.random() > 0.5 ? 'red' : 'green') + ';\n\t }';
- };
-
- App.prototype.staticStyle = function staticStyle() {
- return 'div{\n\t font-size:20px;\n\t }';
- };
-
- App.prototype.render = function render$$1() {
- return Omi.h(
- 'div',
- null,
- Omi.h(Hello, { name: this.name }),
- Omi.h(
- 'h3',
- { onclick: this.handleClick },
- 'Scoped css and event test! click me!'
- )
- );
- };
-
- return App;
- }(Component);
-
- render(Omi.h(App, null), 'body');
-
-}());
-//# sourceMappingURL=b.js.map
+ */
+ function render(vnode, parent, merge) {
+ options.staticStyleRendered = false;
+ parent = typeof parent === 'string' ? document.querySelector(parent) : parent;
+ if (merge === true) {
+ while (parent.firstChild) {
+ parent.removeChild(parent.firstChild);
+ }
+ }
+ var m = isElement(merge) || merge === undefined;
+ if (vnode instanceof Component) {
+ if (window && window.Omi) {
+ window.Omi.instances.push(vnode);
+ }
+ if (!m) {
+ vnode.$store = options.$store = merge;
+ }
+ if (vnode.componentWillMount) vnode.componentWillMount();
+ if (vnode.install) vnode.install();
+ var rendered = vnode.render();
+ if (vnode.style) {
+ addScopedAttr(rendered, vnode.style(), '_style_' + vnode._id, vnode);
+ }
+
+ //don't rerender
+ if (vnode.staticStyle) {
+ addScopedAttrStatic(rendered, vnode.staticStyle(), '_style_' + vnode.constructor.name, !vnode.base);
+ }
+
+ vnode.base = diff(m ? merge : undefined, rendered, {}, false, parent, false);
+
+ if (vnode.componentDidMount) vnode.componentDidMount();
+ if (vnode.installed) vnode.installed();
+ options.staticStyleRendered = true;
+ return vnode.base;
+ }
+
+ var result = diff(merge, vnode, {}, false, parent, false);
+ options.staticStyleRendered = true;
+ return result;
+ }
+
+ function getGlobal() {
+ if (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {
+ if (typeof self !== 'undefined') {
+ return self;
+ } else if (typeof window !== 'undefined') {
+ return window;
+ } else if (typeof global !== 'undefined') {
+ return global;
+ }
+ return function () {
+ return this;
+ }();
+ }
+ return global;
+ }
+
+ var instances = [];
+ var root = getGlobal();
+ root.Omi = {
+ h: h,
+ createElement: h,
+ cloneElement: cloneElement,
+ Component: Component,
+ render: render,
+ rerender: rerender,
+ options: options,
+ instances: instances
+ };
+
+ root.Omi.version = '3.0.0';
+
+ function _classCallCheck(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 === "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); } 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 Hello = function (_Component) {
+ _inherits(Hello, _Component);
+
+ function Hello() {
+ _classCallCheck(this, Hello);
+
+ return _possibleConstructorReturn(this, _Component.apply(this, arguments));
+ }
+
+ Hello.prototype.render = function render$$1() {
+ return Omi.h(
+ 'h3',
+ null,
+ ' ',
+ this.props.name
+ );
+ };
+
+ return Hello;
+ }(Component);
+
+ var App = function (_Component2) {
+ _inherits(App, _Component2);
+
+ function App() {
+ _classCallCheck(this, App);
+
+ return _possibleConstructorReturn(this, _Component2.apply(this, arguments));
+ }
+
+ App.prototype.install = function install() {
+ this.name = 'Omi';
+ this.handleClick = this.handleClick.bind(this);
+ };
+
+ App.prototype.handleClick = function handleClick(e) {
+ this.name = 'Hello Omi !';
+ this.update();
+ };
+
+ App.prototype.style = function style() {
+ return 'h3{\n cursor:pointer;\n color: ' + (Math.random() > 0.5 ? 'red' : 'green') + ';\n }';
+ };
+
+ App.prototype.staticStyle = function staticStyle() {
+ return 'div{\n font-size:20px;\n }';
+ };
+
+ App.prototype.render = function render$$1() {
+ return Omi.h(
+ 'div',
+ null,
+ Omi.h(Hello, { name: this.name }),
+ Omi.h(
+ 'h3',
+ { onclick: this.handleClick },
+ 'Scoped css and event test! click me!'
+ )
+ );
+ };
+
+ return App;
+ }(Component);
+
+ render(Omi.h(App, null), 'body');
+
+}());
+//# sourceMappingURL=b.js.map
diff --git a/examples/simple/b.js.map b/examples/simple/b.js.map
index 95722304c..f73da2b99 100644
--- a/examples/simple/b.js.map
+++ b/examples/simple/b.js.map
@@ -1 +1 @@
-{"version":3,"file":"b.js","sources":["../../dist/omi.esm.js","main.js"],"sourcesContent":["/**\r\n * omi v3.0.0\r\n * Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.\r\n * By dntzhang https://github.com/dntzhang\r\n * Github: https://github.com/AlloyTeam/omi\r\n * MIT Licensed.\r\n */\r\n\r\n/** Virtual DOM Node */\r\nfunction VNode() {}\r\n\r\n/** Global options\r\n *\t@public\r\n *\t@namespace options {Object}\r\n */\r\nvar options = {\r\n\r\n\tscopedStyle: true,\r\n\t$store: null,\r\n\tisWeb: true,\r\n\tdoc: typeof document === 'object' ? document : null\r\n\t//componentChange(component, element) { },\r\n\t/** If `true`, `prop` changes trigger synchronous component updates.\r\n *\t@name syncComponentUpdates\r\n *\t@type Boolean\r\n *\t@default true\r\n */\r\n\t//syncComponentUpdates: true,\r\n\r\n\t/** Processes all created VNodes.\r\n *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\r\n */\r\n\t//vnode(vnode) { }\r\n\r\n\t/** Hook invoked after a component is mounted. */\r\n\t//afterMount(component) { },\r\n\r\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\r\n\t//afterUpdate(component) { }\r\n\r\n\t/** Hook invoked immediately before a component is unmounted. */\r\n\t// beforeUnmount(component) { }\r\n};\r\n\r\nvar stack = [];\r\n\r\nvar EMPTY_CHILDREN = [];\r\n\r\nvar isH5 = options.isWeb;\r\n\r\nvar map = {\r\n\t'br': 'view',\r\n\t'hr': 'view',\r\n\r\n\t'p': 'view',\r\n\t'h1': 'view',\r\n\t'h2': 'view',\r\n\t'h3': 'view',\r\n\t'h4': 'view',\r\n\t'h5': 'view',\r\n\t'h6': 'view',\r\n\t'abbr': 'view',\r\n\t'address': 'view',\r\n\t'b': 'view',\r\n\t'bdi': 'view',\r\n\t'bdo': 'view',\r\n\t'blockquote': 'view',\r\n\t'cite': 'view',\r\n\t'code': 'view',\r\n\t'del': 'view',\r\n\t'ins': 'view',\r\n\t'dfn': 'view',\r\n\t'em': 'view',\r\n\t'strong': 'view',\r\n\t'samp': 'view',\r\n\t'kbd': 'view',\r\n\t'var': 'view',\r\n\t'i': 'view',\r\n\t'mark': 'view',\r\n\t'pre': 'view',\r\n\t'q': 'view',\r\n\t'ruby': 'view',\r\n\t'rp': 'view',\r\n\t'rt': 'view',\r\n\t's': 'view',\r\n\t'small': 'view',\r\n\t'sub': 'view',\r\n\t'sup': 'view',\r\n\t'time': 'view',\r\n\t'u': 'view',\r\n\t'wbr': 'view',\r\n\r\n\t'form': 'form',\r\n\t'input': 'input',\r\n\t'textarea': 'textarea',\r\n\t'button': 'button',\r\n\t'select': 'picker',\r\n\t'option': 'view',\r\n\t'optgroup': 'view',\r\n\t'label': 'label',\r\n\t'fieldset': 'view',\r\n\t'datalist': 'picker',\r\n\t'legend': 'view',\r\n\t'output': 'view',\r\n\r\n\t'iframe': 'view',\r\n\r\n\t'img': 'image',\r\n\t'canvas': 'canvas',\r\n\t'figure': 'view',\r\n\t'figcaption': 'view',\r\n\r\n\t'audio': 'audio',\r\n\t'source': 'audio',\r\n\t'video': 'video',\r\n\t'track': 'video',\r\n\r\n\t'a': 'navigator',\r\n\t'nav': 'view',\r\n\t'link': 'navigator',\r\n\r\n\t'ul': 'view',\r\n\t'ol': 'view',\r\n\t'li': 'view',\r\n\t'dl': 'view',\r\n\t'dt': 'view',\r\n\t'dd': 'view',\r\n\t'menu': 'view',\r\n\t'command': 'view',\r\n\r\n\t'table': 'view',\r\n\t'caption': 'view',\r\n\t'th': 'view',\r\n\t'td': 'view',\r\n\t'tr': 'view',\r\n\t'thead': 'view',\r\n\t'tbody': 'view',\r\n\t'tfoot': 'view',\r\n\t'col': 'view',\r\n\t'colgroup': 'view',\r\n\r\n\t'div': 'view',\r\n\t'main': 'view',\r\n\t//'span': 'label',\r\n\t'span': 'text',\r\n\t'header': 'view',\r\n\t'footer': 'view',\r\n\t'section': 'view',\r\n\t'article': 'view',\r\n\t'aside': 'view',\r\n\t'details': 'view',\r\n\t'dialog': 'view',\r\n\t'summary': 'view',\r\n\r\n\t'progress': 'progress',\r\n\t'meter': 'progress',\r\n\t'head': 'view',\r\n\t'meta': 'view',\r\n\t'base': 'text',\r\n\t'map': 'map',\r\n\t'area': 'navigator',\r\n\r\n\t'script': 'view',\r\n\t'noscript': 'view',\r\n\t'embed': 'view',\r\n\t'object': 'view',\r\n\t'param': 'view',\r\n\r\n\t'view': 'view',\r\n\t'scroll-view': 'scroll-view',\r\n\t'swiper': 'swiper',\r\n\t'icon': 'icon',\r\n\t'text': 'text',\r\n\r\n\t'checkbox': 'checkbox',\r\n\t'radio': 'radio',\r\n\t'picker': 'picker',\r\n\t'picker-view': 'picker-view',\r\n\t'slider': 'slider',\r\n\t'switch': 'switch',\r\n\t'navigator': 'navigator',\r\n\r\n\t'image': 'image',\r\n\t'contact-button': 'contact-button',\r\n\t'block': 'block'\r\n};\r\n\r\n/**\r\n * JSX/hyperscript reviver.\r\n * @see http://jasonformat.com/wtf-is-jsx\r\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\r\n *\r\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\r\n *\r\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\r\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\r\n * the current _actual_ DOM structure, and applying only the differences.\r\n *\r\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\r\n * and optionally children to append to the element.\r\n *\r\n * @example The following DOM tree\r\n *\r\n * `Hello!
`\r\n *\r\n * can be constructed using this function as:\r\n *\r\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\r\n *\r\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\r\n * @param {Object} attributes\tAny attributes/props to set on the created element.\r\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\r\n *\r\n * @public\r\n */\r\nfunction h(nodeName, attributes) {\r\n\tvar children = EMPTY_CHILDREN,\r\n\t lastSimple,\r\n\t child,\r\n\t simple,\r\n\t i;\r\n\tfor (i = arguments.length; i-- > 2;) {\r\n\t\tstack.push(arguments[i]);\r\n\t}\r\n\tif (attributes && attributes.children != null) {\r\n\t\tif (!stack.length) stack.push(attributes.children);\r\n\t\tdelete attributes.children;\r\n\t}\r\n\twhile (stack.length) {\r\n\t\tif ((child = stack.pop()) && child.pop !== undefined) {\r\n\t\t\tfor (i = child.length; i--;) {\r\n\t\t\t\tstack.push(child[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (typeof child === 'boolean') child = null;\r\n\r\n\t\t\tif (simple = typeof nodeName !== 'function') {\r\n\t\t\t\tif (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (simple && lastSimple) {\r\n\t\t\t\tchildren[children.length - 1] += child;\r\n\t\t\t} else if (children === EMPTY_CHILDREN) {\r\n\t\t\t\tchildren = [child];\r\n\t\t\t} else {\r\n\t\t\t\tchildren.push(child);\r\n\t\t\t}\r\n\r\n\t\t\tlastSimple = simple;\r\n\t\t}\r\n\t}\r\n\r\n\tvar p = new VNode();\r\n\tp.nodeName = isH5 ? nodeName : map[nodeName];\r\n\tp.attributes = attributes == null ? undefined : attributes;\r\n\tif (children && typeof children[0] === 'string' && !isH5) {\r\n\t\tif (p.attributes) {\r\n\t\t\tp.attributes.value = children[0];\r\n\t\t} else {\r\n\t\t\tp.attributes = { value: children[0] };\r\n\t\t}\r\n\t} else {\r\n\t\tp.children = children;\r\n\t}\r\n\tp.key = attributes == null ? undefined : attributes.key;\r\n\r\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\r\n\tif (options.vnode !== undefined) options.vnode(p);\r\n\r\n\treturn p;\r\n}\r\n\r\n/**\r\n * Copy all properties from `props` onto `obj`.\r\n * @param {Object} obj\t\tObject onto which properties should be copied.\r\n * @param {Object} props\tObject from which to copy properties.\r\n * @returns obj\r\n * @private\r\n */\r\nfunction extend(obj, props) {\r\n for (var i in props) {\r\n obj[i] = props[i];\r\n }return obj;\r\n}\r\n\r\n/**\r\n * Call a function asynchronously, as soon as possible. Makes\r\n * use of HTML Promise to schedule the callback if available,\r\n * otherwise falling back to `setTimeout` (mainly for IE<11).\r\n *\r\n * @param {Function} callback\r\n */\r\n\r\nvar usePromise = typeof Promise == 'function';\r\n\r\n// for native\r\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\r\n if (global.__config__.platform === 'android') {\r\n usePromise = true;\r\n } else {\r\n var systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\r\n if (systemVersion > 8) {\r\n usePromise = true;\r\n }\r\n }\r\n}\r\n\r\nvar defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\r\n * @param {Object} props\tAttributes/props to add when cloning\r\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\r\n */\r\nfunction cloneElement(vnode, props) {\r\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\r\n}\r\n\r\n// DOM properties that should NOT have \"px\" added when numeric\r\nvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\r\n\r\n/** Managed queue of dirty components to be re-rendered */\r\n\r\nvar items = [];\r\n\r\nfunction enqueueRender(component) {\r\n\tif (!component._dirty && (component._dirty = true) && items.push(component) == 1) {\r\n\t\t(options.debounceRendering || defer)(rerender);\r\n\t}\r\n}\r\n\r\nfunction rerender() {\r\n\tvar p,\r\n\t list = items;\r\n\titems = [];\r\n\tvar element;\r\n\twhile (p = list.pop()) {\r\n\t\telement = p.base;\r\n\t\tif (p._dirty) renderComponent(p);\r\n\t}\r\n\tif (!list.length) {\r\n\t\tif (options.componentChange) options.componentChange(p, element);\r\n\t}\r\n}\r\n\r\n/**\r\n * Check if two nodes are equivalent.\r\n *\r\n * @param {Node} node\t\t\tDOM Node to compare\r\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\r\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\r\n * @private\r\n */\r\nfunction isSameNodeType(node, vnode, hydrating) {\r\n if (typeof vnode === 'string' || typeof vnode === 'number') {\r\n return node.splitText !== undefined;\r\n }\r\n if (typeof vnode.nodeName === 'string') {\r\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName);\r\n }\r\n return hydrating || node._componentConstructor === vnode.nodeName;\r\n}\r\n\r\n/**\r\n * Check if an Element has a given nodeName, case-insensitively.\r\n *\r\n * @param {Element} node\tA DOM Element to inspect the name of.\r\n * @param {String} nodeName\tUnnormalized name to compare against.\r\n */\r\nfunction isNamedNode(node, nodeName) {\r\n return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\r\n}\r\n\r\n/**\r\n * Reconstruct Component-style `props` from a VNode.\r\n * Ensures default/fallback values from `defaultProps`:\r\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\r\n *\r\n * @param {VNode} vnode\r\n * @returns {Object} props\r\n */\r\nfunction getNodeProps(vnode) {\r\n var props = extend({}, vnode.attributes);\r\n props.children = vnode.children;\r\n\r\n var defaultProps = vnode.nodeName.defaultProps;\r\n if (defaultProps !== undefined) {\r\n for (var i in defaultProps) {\r\n if (props[i] === undefined) {\r\n props[i] = defaultProps[i];\r\n }\r\n }\r\n }\r\n\r\n return props;\r\n}\r\n\r\n/** Create an element with the given nodeName.\r\n *\t@param {String} nodeName\r\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\r\n *\t@returns {Element} node\r\n */\r\nfunction createNode(nodeName, isSvg) {\r\n\tvar node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\r\n\tnode.normalizedNodeName = nodeName;\r\n\treturn node;\r\n}\r\n\r\nfunction parseCSSText(cssText) {\r\n\tvar cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\r\n\tvar style = {},\r\n\t _ref = cssTxt.match(/ ?(.*?) ?{([^}]*)}/) || [a, b, cssTxt],\r\n\t a = _ref[0],\r\n\t b = _ref[1],\r\n\t rule = _ref[2];\r\n\tvar cssToJs = function cssToJs(s) {\r\n\t\treturn s.replace(/\\W+\\w/g, function (match) {\r\n\t\t\treturn match.slice(-1).toUpperCase();\r\n\t\t});\r\n\t};\r\n\tvar properties = rule.split(\";\").map(function (o) {\r\n\t\treturn o.split(\":\").map(function (x) {\r\n\t\t\treturn x && x.trim();\r\n\t\t});\r\n\t});\r\n\tfor (var i = properties, i = Array.isArray(i), i = 0, i = i ? i : i[Symbol.iterator]();;) {\r\n\t\tvar _ref3;\r\n\r\n\t\tif (i) {\r\n\t\t\tif (i >= i.length) break;\r\n\t\t\t_ref3 = i[i++];\r\n\t\t} else {\r\n\t\t\ti = i.next();\r\n\t\t\tif (i.done) break;\r\n\t\t\t_ref3 = i.value;\r\n\t\t}\r\n\r\n\t\tvar _ref2 = _ref3;\r\n\t\tvar property = _ref2[0];\r\n\t\tvar value = _ref2[1];\r\n\t\tstyle[cssToJs(property)] = value;\r\n\t}return style;\r\n}\r\n\r\nvar isH5$1 = options.isWeb;\r\n\r\n/** Remove a child node from its parent if attached.\r\n *\t@param {Element} node\t\tThe node to remove\r\n */\r\nfunction removeNode(node) {\r\n\tvar parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\r\n *\tIf `value` is `null`, the attribute/handler will be removed.\r\n *\t@param {Element} node\tAn element to mutate\r\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\r\n *\t@param {any} old\tThe last value that was set for this name/node pair\r\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\r\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\r\n *\t@private\r\n */\r\nfunction setAccessor(node, name, old, value, isSvg) {\r\n\tif (name === 'className') name = 'class';\r\n\r\n\tif (name === 'key') {\r\n\t\t// ignore\r\n\t} else if (name === 'ref') {\r\n\t\tif (old) old(null);\r\n\t\tif (value) value(node);\r\n\t} else if (name === 'class' && !isSvg) {\r\n\t\tnode.className = value || '';\r\n\t} else if (name === 'style') {\r\n\t\tif (isH5$1) {\r\n\t\t\tif (!value || typeof value === 'string' || typeof old === 'string') {\r\n\t\t\t\tnode.style.cssText = value || '';\r\n\t\t\t}\r\n\t\t\tif (value && typeof value === 'object') {\r\n\t\t\t\tif (typeof old !== 'string') {\r\n\t\t\t\t\tfor (var i in old) {\r\n\t\t\t\t\t\tif (!(i in value)) node.style[i] = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor (var i in value) {\r\n\t\t\t\t\tnode.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar oldJson = old,\r\n\t\t\t currentJson = value;\r\n\t\t\tif (typeof old === 'string') {\r\n\t\t\t\toldJson = parseCSSText(old);\r\n\t\t\t}\r\n\t\t\tif (typeof value == 'string') {\r\n\t\t\t\tcurrentJson = parseCSSText(value);\r\n\t\t\t}\r\n\r\n\t\t\tvar result = {},\r\n\t\t\t changed = false;\r\n\r\n\t\t\tif (oldJson) {\r\n\t\t\t\tfor (var key in oldJson) {\r\n\t\t\t\t\tif (typeof currentJson == 'object' && !(key in currentJson)) {\r\n\t\t\t\t\t\tresult[key] = '';\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (var ckey in currentJson) {\r\n\t\t\t\t\tif (currentJson[ckey] !== oldJson[ckey]) {\r\n\t\t\t\t\t\tresult[ckey] = currentJson[ckey];\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (changed) {\r\n\t\t\t\t\tnode.setStyles(result);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnode.setStyles(currentJson);\r\n\t\t\t}\r\n\t\t}\r\n\t} else if (name === 'dangerouslySetInnerHTML') {\r\n\t\tif (value) node.innerHTML = value.__html || '';\r\n\t} else if (name[0] == 'o' && name[1] == 'n') {\r\n\t\tvar useCapture = name !== (name = name.replace(/Capture$/, ''));\r\n\t\tname = name.toLowerCase().substring(2);\r\n\t\tif (value) {\r\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\r\n\t\t} else {\r\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\r\n\t} else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\r\n\t\tsetProperty(node, name, value == null ? '' : value);\r\n\t\tif (value == null || value === false) node.removeAttribute(name);\r\n\t} else {\r\n\t\tvar ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\r\n\t\tif (value == null || value === false) {\r\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\r\n\t\t} else if (typeof value !== 'function') {\r\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/** Attempt to set a DOM property to the given value.\r\n *\tIE & FF throw for certain property-value combinations.\r\n */\r\nfunction setProperty(node, name, value) {\r\n\ttry {\r\n\t\tnode[name] = value;\r\n\t} catch (e) {}\r\n}\r\n\r\n/** Proxy an event to hooked event handlers\r\n *\t@private\r\n */\r\nfunction eventProxy(e) {\r\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\r\n}\r\n\r\n/** Queue of components that have been mounted and are awaiting componentDidMount */\r\nvar mounts = [];\r\n\r\n/** Diff recursion count, used to track the end of the diff cycle. */\r\nvar diffLevel = 0;\r\n\r\n/** Global flag indicating if the diff is currently within an SVG */\r\nvar isSvgMode = false;\r\n\r\n/** Global flag indicating if the diff is performing hydration */\r\nvar hydrating = false;\r\n\r\n/** Invoke queued componentDidMount lifecycle methods */\r\nfunction flushMounts() {\r\n\tvar c;\r\n\twhile (c = mounts.pop()) {\r\n\t\tif (options.afterMount) options.afterMount(c);\r\n\t\tif (c.componentDidMount) c.componentDidMount();\r\n\t\tif (c.installed) c.installed();\r\n\t}\r\n}\r\n\r\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\r\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\r\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\r\n *\t@returns {Element} dom\t\t\tThe created/mutated element\r\n *\t@private\r\n */\r\nfunction diff(dom, vnode, context, mountAll, parent, componentRoot) {\r\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\r\n\tif (!diffLevel++) {\r\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\r\n\t\tisSvgMode = parent != null && parent.ownerSVGElement !== undefined;\r\n\r\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\r\n\t\thydrating = dom != null && !('__preactattr_' in dom);\r\n\t}\r\n\r\n\tvar ret = idiff(dom, vnode, context, mountAll, componentRoot);\r\n\r\n\t// append the element if its a new parent\r\n\tif (parent && ret.parentNode !== parent) parent.appendChild(ret);\r\n\r\n\t// diffLevel being reduced to 0 means we're exiting the diff\r\n\tif (! --diffLevel) {\r\n\t\thydrating = false;\r\n\t\t// invoke queued componentDidMount lifecycle methods\r\n\t\tif (!componentRoot) flushMounts();\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\r\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\r\n\tvar out = dom,\r\n\t prevSvgMode = isSvgMode;\r\n\r\n\t// empty values (null, undefined, booleans) render as empty Text nodes\r\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\r\n\r\n\t// Fast case: Strings & Numbers create/update Text nodes.\r\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\r\n\r\n\t\t// update if it's already a Text node:\r\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\r\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\r\n\t\t\tif (dom.nodeValue != vnode) {\r\n\t\t\t\tdom.nodeValue = vnode;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\r\n\t\t\tout = document.createTextNode(vnode);\r\n\t\t\tif (dom) {\r\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\t\t\t\trecollectNodeTree(dom, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout['__preactattr_'] = true;\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\t// If the VNode represents a Component, perform a component diff:\r\n\tvar vnodeName = vnode.nodeName;\r\n\tif (typeof vnodeName === 'function') {\r\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\r\n\t}\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\r\n\r\n\t// If there's no existing element or it's the wrong type, create a new one:\r\n\tvnodeName = String(vnodeName);\r\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\r\n\t\tout = createNode(vnodeName, isSvgMode);\r\n\r\n\t\tif (dom) {\r\n\t\t\t// move children into the replacement node\r\n\t\t\twhile (dom.firstChild) {\r\n\t\t\t\tout.appendChild(dom.firstChild);\r\n\t\t\t} // if the previous Element was mounted into the DOM, replace it inline\r\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\r\n\t\t\t// recycle the old element (skips non-Element node types)\r\n\t\t\trecollectNodeTree(dom, true);\r\n\t\t}\r\n\t}\r\n\r\n\tvar fc = out.firstChild,\r\n\t props = out['__preactattr_'],\r\n\t vchildren = vnode.children;\r\n\r\n\tif (props == null) {\r\n\t\tprops = out['__preactattr_'] = {};\r\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\r\n\t\t\tprops[a[i].name] = a[i].value;\r\n\t\t}\r\n\t}\r\n\r\n\t// Optimization: fast-path for elements containing a single TextNode:\r\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\r\n\t\tif (fc.nodeValue != vchildren[0]) {\r\n\t\t\tfc.nodeValue = vchildren[0];\r\n\t\t}\r\n\t}\r\n\t// otherwise, if there are existing or new children, diff them:\r\n\telse if (vchildren && vchildren.length || fc != null) {\r\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\r\n\t\t}\r\n\r\n\t// Apply attributes/props from VNode to the DOM Element:\r\n\tdiffAttributes(out, vnode.attributes, props);\r\n\r\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\r\n\tisSvgMode = prevSvgMode;\r\n\r\n\treturn out;\r\n}\r\n\r\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\r\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\r\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\r\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\r\n *\t@param {Boolean} mountAll\r\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\r\n */\r\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\r\n\tvar originalChildren = dom.childNodes,\r\n\t children = [],\r\n\t keyed = {},\r\n\t keyedLen = 0,\r\n\t min = 0,\r\n\t len = originalChildren.length,\r\n\t childrenLen = 0,\r\n\t vlen = vchildren ? vchildren.length : 0,\r\n\t j,\r\n\t c,\r\n\t f,\r\n\t vchild,\r\n\t child;\r\n\r\n\t// Build up a map of keyed children and an Array of unkeyed children:\r\n\tif (len !== 0) {\r\n\t\tfor (var i = 0; i < len; i++) {\r\n\t\t\tvar _child = originalChildren[i],\r\n\t\t\t props = _child['__preactattr_'],\r\n\t\t\t key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\r\n\t\t\tif (key != null) {\r\n\t\t\t\tkeyedLen++;\r\n\t\t\t\tkeyed[key] = _child;\r\n\t\t\t} else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\r\n\t\t\t\tchildren[childrenLen++] = _child;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (vlen !== 0) {\r\n\t\tfor (var i = 0; i < vlen; i++) {\r\n\t\t\tvchild = vchildren[i];\r\n\t\t\tchild = null;\r\n\r\n\t\t\t// attempt to find a node based on key matching\r\n\t\t\tvar key = vchild.key;\r\n\t\t\tif (key != null) {\r\n\t\t\t\tif (keyedLen && keyed[key] !== undefined) {\r\n\t\t\t\t\tchild = keyed[key];\r\n\t\t\t\t\tkeyed[key] = undefined;\r\n\t\t\t\t\tkeyedLen--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// attempt to pluck a node of the same type from the existing children\r\n\t\t\telse if (!child && min < childrenLen) {\r\n\t\t\t\t\tfor (j = min; j < childrenLen; j++) {\r\n\t\t\t\t\t\tif (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\r\n\t\t\t\t\t\t\tchild = c;\r\n\t\t\t\t\t\t\tchildren[j] = undefined;\r\n\t\t\t\t\t\t\tif (j === childrenLen - 1) childrenLen--;\r\n\t\t\t\t\t\t\tif (j === min) min++;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// morph the matched/found/created DOM child to match vchild (deep)\r\n\t\t\tchild = idiff(child, vchild, context, mountAll);\r\n\r\n\t\t\tf = originalChildren[i];\r\n\t\t\tif (child && child !== dom && child !== f) {\r\n\t\t\t\tif (f == null) {\r\n\t\t\t\t\tdom.appendChild(child);\r\n\t\t\t\t} else if (child === f.nextSibling) {\r\n\t\t\t\t\tremoveNode(f);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdom.insertBefore(child, f);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// remove unused keyed children:\r\n\tif (keyedLen) {\r\n\t\tfor (var i in keyed) {\r\n\t\t\tif (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\r\n\t\t}\r\n\t}\r\n\r\n\t// remove orphaned unkeyed children:\r\n\twhile (min <= childrenLen) {\r\n\t\tif ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\r\n\t}\r\n}\r\n\r\n/** Recursively recycle (or just unmount) a node and its descendants.\r\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\r\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\r\n */\r\nfunction recollectNodeTree(node, unmountOnly) {\r\n\tvar component = node._component;\r\n\tif (component) {\r\n\t\t// if node is owned by a Component, unmount that component (ends up recursing back here)\r\n\t\tunmountComponent(component);\r\n\t} else {\r\n\t\t// If the node's VNode had a ref function, invoke it with null here.\r\n\t\t// (this is part of the React spec, and smart for unsetting references)\r\n\t\tif (node['__preactattr_'] != null && node['__preactattr_'].ref) node['__preactattr_'].ref(null);\r\n\r\n\t\tif (unmountOnly === false || node['__preactattr_'] == null) {\r\n\t\t\tremoveNode(node);\r\n\t\t}\r\n\r\n\t\tremoveChildren(node);\r\n\t}\r\n}\r\n\r\n/** Recollect/unmount all children.\r\n *\t- we use .lastChild here because it causes less reflow than .firstChild\r\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\r\n */\r\nfunction removeChildren(node) {\r\n\tnode = node.lastChild;\r\n\twhile (node) {\r\n\t\tvar next = node.previousSibling;\r\n\t\trecollectNodeTree(node, true);\r\n\t\tnode = next;\r\n\t}\r\n}\r\n\r\n/** Apply differences in attributes from a VNode to the given DOM Element.\r\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\r\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\r\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\r\n */\r\nfunction diffAttributes(dom, attrs, old) {\r\n\tvar name;\r\n\r\n\t// remove attributes no longer present on the vnode by setting them to undefined\r\n\tfor (name in old) {\r\n\t\tif (!(attrs && attrs[name] != null) && old[name] != null) {\r\n\t\t\tsetAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\r\n\t\t}\r\n\t}\r\n\r\n\t// add new & update changed attributes\r\n\tfor (name in attrs) {\r\n\t\tif (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\r\n\t\t\tsetAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/** Retains a pool of Components for re-use, keyed on component name.\r\n *\tNote: since component names are not unique or even necessarily available, these are primarily a form of sharding.\r\n *\t@private\r\n */\r\nvar components = {};\r\n\r\n/** Reclaim a component for later re-use by the recycler. */\r\nfunction collectComponent(component) {\r\n\tvar name = component.constructor.name;\r\n\t(components[name] || (components[name] = [])).push(component);\r\n}\r\n\r\n/** Create a component. Normalizes differences between PFC's and classful Components. */\r\nfunction createComponent(Ctor, props, context) {\r\n\tvar list = components[Ctor.name],\r\n\t inst;\r\n\r\n\tif (Ctor.prototype && Ctor.prototype.render) {\r\n\t\tinst = new Ctor(props, context);\r\n\t\tComponent.call(inst, props, context);\r\n\t} else {\r\n\t\tinst = new Component(props, context);\r\n\t\tinst.constructor = Ctor;\r\n\t\tinst.render = doRender;\r\n\t}\r\n\tinst.$store = options.$store;\r\n\tif (window && window.Omi) {\r\n\t\twindow.Omi.instances.push(inst);\r\n\t}\r\n\r\n\tif (list) {\r\n\t\tfor (var i = list.length; i--;) {\r\n\t\t\tif (list[i].constructor === Ctor) {\r\n\t\t\t\tinst.nextBase = list[i].nextBase;\r\n\t\t\t\tlist.splice(i, 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn inst;\r\n}\r\n\r\n/** The `.render()` method for a PFC backing instance. */\r\nfunction doRender(props, state, context) {\r\n\treturn this.constructor(props, context);\r\n}\r\n\r\n// many thanks to https://github.com/thomaspark/scoper/\r\nfunction scoper(css, prefix) {\r\n\tprefix = '[' + prefix.toLowerCase() + ']';\r\n\t// https://www.w3.org/TR/css-syntax-3/#lexical\r\n\tcss = css.replace(/\\/\\*[^*]*\\*+([^/][^*]*\\*+)*\\//g, '');\r\n\t// eslint-disable-next-line\r\n\tvar re = new RegExp('([^\\r\\n,{}:]+)(:[^\\r\\n,{}]+)?(,(?=[^{}]*{)|\\s*{)', 'g');\r\n\t/**\r\n * Example:\r\n *\r\n * .classname::pesudo { color:red }\r\n *\r\n * g1 is normal selector `.classname`\r\n * g2 is pesudo class or pesudo element\r\n * g3 is the suffix\r\n */\r\n\tcss = css.replace(re, function (g0, g1, g2, g3) {\r\n\t\tif (typeof g2 === 'undefined') {\r\n\t\t\tg2 = '';\r\n\t\t}\r\n\r\n\t\t/* eslint-ignore-next-line */\r\n\t\tif (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\r\n\t\t\treturn g1 + g2 + g3;\r\n\t\t}\r\n\r\n\t\tvar appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\r\n\t\tvar prependClass = prefix + ' ' + g1.trim() + g2;\r\n\t\treturn appendClass + ',' + prependClass + g3;\r\n\t});\r\n\r\n\treturn css;\r\n}\r\n\r\nfunction addStyle(cssText, id) {\r\n\tid = id.toLowerCase();\r\n\tvar ele = document.getElementById(id);\r\n\tvar head = document.getElementsByTagName('head')[0];\r\n\tif (ele && ele.parentNode === head) {\r\n\t\thead.removeChild(ele);\r\n\t}\r\n\r\n\tvar someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\tsomeThingStyles.setAttribute('id', id);\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nfunction addStyleWithoutId(cssText) {\r\n\tvar head = document.getElementsByTagName('head')[0];\r\n\tvar someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nfunction addScopedAttr(vdom, style, attr, component) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tstyle = scoper(style, attr);\r\n\t\tif (style !== component._preStyle) {\r\n\t\t\taddStyle(style, attr);\r\n\t\t}\r\n\t} else if (style !== component._preStyle) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n\tcomponent._preStyle = style;\r\n}\r\n\r\nfunction addScopedAttrStatic(vdom, style, attr, firstTime) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tif (firstTime) {\r\n\t\t\taddStyle(scoper(style, attr), attr);\r\n\t\t}\r\n\t} else if (firstTime) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n}\r\n\r\nfunction scopeVdom(attr, vdom) {\r\n\tif (typeof vdom !== 'string') {\r\n\t\tvdom.attributes = vdom.attributes || {};\r\n\t\tvdom.attributes[attr] = '';\r\n\t\tvdom.children.forEach(function (child) {\r\n\t\t\treturn scopeVdom(attr, child);\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/** Set a component's `props` (generally derived from JSX attributes).\r\n *\t@param {Object} props\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\r\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\r\n */\r\nfunction setComponentProps(component, props, opts, context, mountAll) {\r\n\tif (component._disable) return;\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.__ref = props.ref) delete props.ref;\r\n\tif (component.__key = props.key) delete props.key;\r\n\r\n\tif (!component.base || mountAll) {\r\n\t\tif (component.componentWillMount) component.componentWillMount();\r\n\t\tif (component.install) component.install();\r\n\t} else if (component.componentWillReceiveProps) {\r\n\t\tcomponent.componentWillReceiveProps(props, context);\r\n\t}\r\n\r\n\tif (context && context !== component.context) {\r\n\t\tif (!component.prevContext) component.prevContext = component.context;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tif (!component.prevProps) component.prevProps = component.props;\r\n\tcomponent.props = props;\r\n\r\n\tcomponent._disable = false;\r\n\r\n\tif (opts !== 0) {\r\n\t\tif (opts === 1 || options.syncComponentUpdates !== false || !component.base) {\r\n\t\t\trenderComponent(component, 1, mountAll);\r\n\t\t} else {\r\n\t\t\tenqueueRender(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(component);\r\n}\r\n\r\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\r\n *\t@param {Component} component\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\r\n *\t@private\r\n */\r\nfunction renderComponent(component, opts, mountAll, isChild) {\r\n\tif (component._disable) return;\r\n\r\n\tvar props = component.props,\r\n\t state = component.state,\r\n\t context = component.context,\r\n\t previousProps = component.prevProps || props,\r\n\t previousState = component.prevState || state,\r\n\t previousContext = component.prevContext || context,\r\n\t isUpdate = component.base,\r\n\t nextBase = component.nextBase,\r\n\t initialBase = isUpdate || nextBase,\r\n\t initialChildComponent = component._component,\r\n\t skip = false,\r\n\t rendered,\r\n\t inst,\r\n\t cbase;\r\n\r\n\t// if updating\r\n\tif (isUpdate) {\r\n\t\tcomponent.props = previousProps;\r\n\t\tcomponent.state = previousState;\r\n\t\tcomponent.context = previousContext;\r\n\t\tif (opts !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {\r\n\t\t\tskip = true;\r\n\t\t} else if (component.componentWillUpdate) {\r\n\t\t\tcomponent.componentWillUpdate(props, state, context);\r\n\t\t} else if (component.beforeUpdate) {\r\n\t\t\tcomponent.beforeUpdate(props, state, context);\r\n\t\t}\r\n\t\tcomponent.props = props;\r\n\t\tcomponent.state = state;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\r\n\tcomponent._dirty = false;\r\n\r\n\tif (!skip) {\r\n\t\trendered = component.render(props, state, context);\r\n\r\n\t\tif (component.style) {\r\n\t\t\taddScopedAttr(rendered, component.style(), '_style_' + component._id, component);\r\n\t\t}\r\n\r\n\t\t//don't rerender\r\n\t\tif (component.staticStyle) {\r\n\t\t\taddScopedAttrStatic(rendered, component.staticStyle(), '_style_' + component.constructor.name, !component.base);\r\n\t\t}\r\n\r\n\t\t// context to pass to the child, can be updated via (grand-)parent component\r\n\t\tif (component.getChildContext) {\r\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\r\n\t\t}\r\n\r\n\t\tvar childComponent = rendered && rendered.nodeName,\r\n\t\t toUnmount,\r\n\t\t base;\r\n\r\n\t\tif (typeof childComponent === 'function') {\r\n\t\t\t// set up high order component link\r\n\r\n\t\t\tvar childProps = getNodeProps(rendered);\r\n\t\t\tinst = initialChildComponent;\r\n\r\n\t\t\tif (inst && inst.constructor === childComponent && childProps.key == inst.__key) {\r\n\t\t\t\tsetComponentProps(inst, childProps, 1, context, false);\r\n\t\t\t} else {\r\n\t\t\t\ttoUnmount = inst;\r\n\r\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\r\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\r\n\t\t\t\tinst._parentComponent = component;\r\n\t\t\t\tsetComponentProps(inst, childProps, 0, context, false);\r\n\t\t\t\trenderComponent(inst, 1, mountAll, true);\r\n\t\t\t}\r\n\r\n\t\t\tbase = inst.base;\r\n\t\t} else {\r\n\t\t\tcbase = initialBase;\r\n\r\n\t\t\t// destroy high order component link\r\n\t\t\ttoUnmount = initialChildComponent;\r\n\t\t\tif (toUnmount) {\r\n\t\t\t\tcbase = component._component = null;\r\n\t\t\t}\r\n\r\n\t\t\tif (initialBase || opts === 1) {\r\n\t\t\t\tif (cbase) cbase._component = null;\r\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (initialBase && base !== initialBase && inst !== initialChildComponent) {\r\n\t\t\tvar baseParent = initialBase.parentNode;\r\n\t\t\tif (baseParent && base !== baseParent) {\r\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\r\n\r\n\t\t\t\tif (!toUnmount) {\r\n\t\t\t\t\tinitialBase._component = null;\r\n\t\t\t\t\trecollectNodeTree(initialBase, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (toUnmount) {\r\n\t\t\tunmountComponent(toUnmount);\r\n\t\t}\r\n\r\n\t\tcomponent.base = base;\r\n\t\tif (base && !isChild) {\r\n\t\t\tvar componentRef = component,\r\n\t\t\t t = component;\r\n\t\t\twhile (t = t._parentComponent) {\r\n\t\t\t\t(componentRef = t).base = base;\r\n\t\t\t}\r\n\t\t\tbase._component = componentRef;\r\n\t\t\tbase._componentConstructor = componentRef.constructor;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!isUpdate || mountAll) {\r\n\t\tmounts.unshift(component);\r\n\t} else if (!skip) {\r\n\t\t// Ensure that pending componentDidMount() hooks of child components\r\n\t\t// are called before the componentDidUpdate() hook in the parent.\r\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\r\n\t\t// flushMounts();\r\n\r\n\t\tif (component.componentDidUpdate) {\r\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (component.afterUpdate) {\r\n\t\t\tcomponent.afterUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (options.afterUpdate) options.afterUpdate(component);\r\n\t}\r\n\r\n\tif (component._renderCallbacks != null) {\r\n\t\twhile (component._renderCallbacks.length) {\r\n\t\t\tcomponent._renderCallbacks.pop().call(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (!diffLevel && !isChild) flushMounts();\r\n}\r\n\r\n/** Apply the Component referenced by a VNode to the DOM.\r\n *\t@param {Element} dom\tThe DOM node to mutate\r\n *\t@param {VNode} vnode\tA Component-referencing VNode\r\n *\t@returns {Element} dom\tThe created/mutated element\r\n *\t@private\r\n */\r\nfunction buildComponentFromVNode(dom, vnode, context, mountAll) {\r\n\tvar c = dom && dom._component,\r\n\t originalComponent = c,\r\n\t oldDom = dom,\r\n\t isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\r\n\t isOwner = isDirectOwner,\r\n\t props = getNodeProps(vnode);\r\n\twhile (c && !isOwner && (c = c._parentComponent)) {\r\n\t\tisOwner = c.constructor === vnode.nodeName;\r\n\t}\r\n\r\n\tif (c && isOwner && (!mountAll || c._component)) {\r\n\t\tsetComponentProps(c, props, 3, context, mountAll);\r\n\t\tdom = c.base;\r\n\t} else {\r\n\t\tif (originalComponent && !isDirectOwner) {\r\n\t\t\tunmountComponent(originalComponent);\r\n\t\t\tdom = oldDom = null;\r\n\t\t}\r\n\r\n\t\tc = createComponent(vnode.nodeName, props, context);\r\n\t\tif (dom && !c.nextBase) {\r\n\t\t\tc.nextBase = dom;\r\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\r\n\t\t\toldDom = null;\r\n\t\t}\r\n\t\tsetComponentProps(c, props, 1, context, mountAll);\r\n\t\tdom = c.base;\r\n\r\n\t\tif (oldDom && dom !== oldDom) {\r\n\t\t\toldDom._component = null;\r\n\t\t\trecollectNodeTree(oldDom, false);\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n/** Remove a component from the DOM and recycle it.\r\n *\t@param {Component} component\tThe Component instance to unmount\r\n *\t@private\r\n */\r\nfunction unmountComponent(component) {\r\n\tif (options.beforeUnmount) options.beforeUnmount(component);\r\n\r\n\tvar base = component.base;\r\n\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.componentWillUnmount) component.componentWillUnmount();\r\n\tif (component.uninstall) component.uninstall();\r\n\r\n\tcomponent.base = null;\r\n\r\n\t// recursively tear down & recollect high-order component children:\r\n\tvar inner = component._component;\r\n\tif (inner) {\r\n\t\tunmountComponent(inner);\r\n\t} else if (base) {\r\n\t\tif (base['__preactattr_'] && base['__preactattr_'].ref) base['__preactattr_'].ref(null);\r\n\r\n\t\tcomponent.nextBase = base;\r\n\r\n\t\tremoveNode(base);\r\n\t\tcollectComponent(component);\r\n\r\n\t\tremoveChildren(base);\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(null);\r\n}\r\n\r\nvar id = 0;\r\nfunction getId() {\r\n\treturn id++;\r\n}\r\n/** Base Component class.\r\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\r\n *\t@public\r\n *\r\n *\t@example\r\n *\tclass MyFoo extends Component {\r\n *\t\trender(props, state) {\r\n *\t\t\treturn ;\r\n *\t\t}\r\n *\t}\r\n */\r\nfunction Component(props, context) {\r\n\tthis._dirty = true;\r\n\r\n\t/** @public\r\n *\t@type {object}\r\n */\r\n\tthis.context = context;\r\n\r\n\t/** @public\r\n *\t@type {object}\r\n */\r\n\tthis.props = props;\r\n\r\n\t/** @public\r\n *\t@type {object}\r\n */\r\n\tthis.state = this.state || {};\r\n\r\n\tthis._id = getId();\r\n\r\n\tthis._preStyle = null;\r\n\r\n\tthis.$store = null;\r\n}\r\n\r\nextend(Component.prototype, {\r\n\r\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\r\n *\t@param {object} nextProps\r\n *\t@param {object} nextState\r\n *\t@param {object} nextContext\r\n *\t@returns {Boolean} should the component re-render\r\n *\t@name shouldComponentUpdate\r\n *\t@function\r\n */\r\n\r\n\t/** Update component state by copying properties from `state` to `this.state`.\r\n *\t@param {object} state\t\tA hash of state properties to update with new values\r\n *\t@param {function} callback\tA function to be called once component state is updated\r\n */\r\n\tsetState: function setState(state, callback) {\r\n\t\tvar s = this.state;\r\n\t\tif (!this.prevState) this.prevState = extend({}, s);\r\n\t\textend(s, typeof state === 'function' ? state(s, this.props) : state);\r\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\r\n\t\tenqueueRender(this);\r\n\t},\r\n\r\n\r\n\t/** Immediately perform a synchronous re-render of the component.\r\n *\t@param {function} callback\t\tA function to be called after component is re-rendered.\r\n *\t@private\r\n */\r\n\tforceUpdate: function forceUpdate(callback) {\r\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\r\n\t\trenderComponent(this, 2);\r\n\t\tif (options.componentChange) options.componentChange(this, this.base);\r\n\t},\r\n\tupdate: function update(callback) {\r\n\t\tthis.forceUpdate(callback);\r\n\t},\r\n\r\n\r\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\r\n *\t@param {object} state\t\tThe component's current state\r\n *\t@param {object} context\t\tContext object (if a parent component has provided context)\r\n *\t@returns VNode\r\n */\r\n\trender: function render() {}\r\n});\r\n\r\nfunction isElement(obj) {\r\n\ttry {\r\n\t\t//Using W3 DOM2 (works for FF, Opera and Chrome)\r\n\t\treturn obj instanceof HTMLElement;\r\n\t} catch (e) {\r\n\t\t//Browsers not supporting W3 DOM2 don't have HTMLElement and\r\n\t\t//an exception is thrown and we end up here. Testing some\r\n\t\t//properties that all elements have (works on IE7)\r\n\t\treturn typeof obj === \"object\" && obj.nodeType === 1 && typeof obj.style === \"object\" && typeof obj.ownerDocument === \"object\";\r\n\t}\r\n}\r\n\r\n/** Render JSX into a `parent` Element.\r\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\r\n *\t@param {Element} parent\t\tDOM element to render into\r\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\r\n *\t@public\r\n *\r\n *\t@example\r\n *\t// render a div into :\r\n *\trender(hello!
, document.body);\r\n *\r\n *\t@example\r\n *\t// render a \"Thing\" component into #foo:\r\n *\tconst Thing = ({ name }) => { name };\r\n *\trender(, document.querySelector('#foo'));\r\n */\r\nfunction render(vnode, parent, merge) {\r\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent;\r\n\tif (merge === true) {\r\n\t\twhile (parent.firstChild) {\r\n\t\t\tparent.removeChild(parent.firstChild);\r\n\t\t}\r\n\t}\r\n\tvar m = isElement(merge) || merge === undefined;\r\n\tif (vnode instanceof Component) {\r\n\t\tif (window && window.Omi) {\r\n\t\t\twindow.Omi.instances.push(vnode);\r\n\t\t}\r\n\t\tif (vnode.componentWillMount) vnode.componentWillMount();\r\n\t\tif (vnode.install) vnode.install();\r\n\t\tvar rendered = vnode.render();\r\n\t\tif (vnode.style) {\r\n\t\t\taddScopedAttr(rendered, vnode.style(), '_style_' + vnode._id, vnode);\r\n\t\t}\r\n\r\n\t\t//don't rerender\r\n\t\tif (vnode.staticStyle) {\r\n\t\t\taddScopedAttrStatic(rendered, vnode.staticStyle(), '_style_' + vnode.constructor.name, !vnode.base);\r\n\t\t}\r\n\r\n\t\tif (m) {\r\n\t\t\tvnode.base = diff(merge, rendered, {}, false, parent, false);\r\n\t\t} else {\r\n\t\t\tvnode.$store = options.$store = merge;\r\n\t\t\tvnode.base = diff(undefined, rendered, {}, false, parent, false);\r\n\t\t}\r\n\t\tif (vnode.componentDidMount) vnode.componentDidMount();\r\n\t\tif (vnode.installed) vnode.installed();\r\n\t\treturn vnode.base;\r\n\t}\r\n\r\n\treturn diff(merge, vnode, {}, false, parent, false);\r\n}\r\n\r\nfunction getGlobal() {\r\n\tif (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\r\n\t\tif (typeof self !== 'undefined') {\r\n\t\t\treturn self;\r\n\t\t} else if (typeof window !== 'undefined') {\r\n\t\t\treturn window;\r\n\t\t} else if (typeof global !== 'undefined') {\r\n\t\t\treturn global;\r\n\t\t}\r\n\t\treturn function () {\r\n\t\t\treturn this;\r\n\t\t}();\r\n\t}\r\n\treturn global;\r\n}\r\n\r\nvar instances = [];\r\nvar root = getGlobal();\r\nroot.Omi = {\r\n\th: h,\r\n\tcreateElement: h,\r\n\tcloneElement: cloneElement,\r\n\tComponent: Component,\r\n\trender: render,\r\n\trerender: rerender,\r\n\toptions: options,\r\n\tinstances: instances\r\n};\r\n\r\nvar omi = {\r\n\th: h,\r\n\tcreateElement: h,\r\n\tcloneElement: cloneElement,\r\n\tComponent: Component,\r\n\trender: render,\r\n\trerender: rerender,\r\n\toptions: options,\r\n\tinstances: instances\r\n};\r\n\r\nexport default omi;\r\nexport { h, h as createElement, cloneElement, Component, render, rerender, options, instances };\r\n//# sourceMappingURL=omi.esm.js.map\r\n","import { render, Component } from '../../dist/omi.esm';\r\n\r\nclass Hello extends Component {\r\n render() {\r\n return {this.props.name}
\r\n }\r\n}\r\n\r\nclass App extends Component {\r\n install() {\r\n this.name = 'Omi'\r\n this.handleClick = this.handleClick.bind(this)\r\n }\r\n\r\n handleClick(e) {\r\n this.name = 'Hello Omi !' \r\n this.update()\r\n }\r\n\r\n style() {\r\n return `h3{\r\n\t\t\t\t cursor:pointer;\r\n\t color: ${Math.random() > 0.5 ? 'red' :'green'};\r\n\t }`\r\n }\r\n\r\n\tstaticStyle() {\r\n return `div{\r\n\t font-size:20px;\r\n\t }`\r\n\t}\r\n\t\r\n render() {\r\n return (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t
Scoped css and event test! click me!
\r\n\t\t\t\r\n\t\t)\r\n }\r\n}\r\n\r\nrender(, 'body')"],"names":["VNode","options","scopedStyle","$store","isWeb","doc","document","stack","EMPTY_CHILDREN","isH5","map","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","value","key","vnode","extend","obj","props","usePromise","Promise","global","__config__","platform","systemVersion","split","defer","resolve","then","bind","setTimeout","cloneElement","slice","call","IS_NON_DIMENSIONAL","items","enqueueRender","component","_dirty","debounceRendering","rerender","list","element","base","renderComponent","componentChange","isSameNodeType","node","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","toLowerCase","getNodeProps","defaultProps","createNode","isSvg","createElementNS","createElement","parseCSSText","cssText","cssTxt","replace","style","_ref","match","a","b","rule","cssToJs","s","toUpperCase","properties","o","x","trim","Array","isArray","Symbol","iterator","_ref3","next","done","_ref2","property","isH5$1","removeNode","parentNode","removeChild","setAccessor","name","old","className","test","oldJson","currentJson","result","changed","ckey","setStyles","innerHTML","__html","useCapture","substring","addEventListener","eventProxy","removeEventListener","_listeners","setProperty","removeAttribute","ns","removeAttributeNS","setAttributeNS","setAttribute","e","type","event","mounts","diffLevel","isSvgMode","flushMounts","c","afterMount","componentDidMount","installed","diff","dom","context","mountAll","parent","componentRoot","ownerSVGElement","ret","idiff","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","recollectNodeTree","vnodeName","buildComponentFromVNode","firstChild","fc","vchildren","nextSibling","innerDiffNode","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","len","childrenLen","vlen","j","f","vchild","_child","__key","insertBefore","unmountOnly","unmountComponent","ref","removeChildren","lastChild","previousSibling","attrs","components","collectComponent","constructor","createComponent","Ctor","inst","prototype","render","Component","doRender","window","Omi","instances","nextBase","splice","state","scoper","css","prefix","re","RegExp","g0","g1","g2","g3","appendClass","prependClass","addStyle","id","ele","getElementById","head","getElementsByTagName","someThingStyles","ActiveXObject","styleSheet","textContent","addStyleWithoutId","addScopedAttr","vdom","attr","scopeVdom","_preStyle","addScopedAttrStatic","firstTime","forEach","setComponentProps","opts","_disable","__ref","componentWillMount","install","componentWillReceiveProps","prevContext","prevProps","syncComponentUpdates","isChild","previousProps","previousState","prevState","previousContext","isUpdate","initialBase","initialChildComponent","skip","rendered","cbase","shouldComponentUpdate","componentWillUpdate","beforeUpdate","_id","staticStyle","getChildContext","childComponent","toUnmount","childProps","_parentComponent","baseParent","componentRef","t","unshift","componentDidUpdate","afterUpdate","_renderCallbacks","originalComponent","oldDom","isDirectOwner","isOwner","beforeUnmount","componentWillUnmount","uninstall","inner","getId","setState","callback","forceUpdate","update","isElement","HTMLElement","nodeType","ownerDocument","merge","querySelector","m","getGlobal","Math","self","root","Hello","App","handleClick","random"],"mappings":";;;CAAA;;;;;;;;CAQA;CACA,SAASA,KAAT,GAAiB;;CAEjB;;;;CAIA,IAAIC,UAAU;;CAEbC,cAAa,IAFA;CAGbC,SAAQ,IAHK;CAIbC,QAAO,IAJM;CAKbC,MAAK,OAAOC,QAAP,KAAoB,QAApB,GAA+BA,QAA/B,GAA0C;CAC/C;CACA;;;;;CAKA;;CAEA;;;CAGA;;CAEA;CACA;;CAEA;CACA;;CAEA;CACA;CA1Ba,CAAd;;CA6BA,IAAIC,QAAQ,EAAZ;;CAEA,IAAIC,iBAAiB,EAArB;;CAEA,IAAIC,OAAOR,QAAQG,KAAnB;;CAEA,IAAIM,MAAM;CACT,OAAM,MADG;CAET,OAAM,MAFG;;CAIT,MAAK,MAJI;CAKT,OAAM,MALG;CAMT,OAAM,MANG;CAOT,OAAM,MAPG;CAQT,OAAM,MARG;CAST,OAAM,MATG;CAUT,OAAM,MAVG;CAWT,SAAQ,MAXC;CAYT,YAAW,MAZ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sB,KAAtB,GAA6B,OAF3C;CAIH;;mBAEJxC,qCAAc;CACP;CAGN;;mBAEEhE,8BAAS;CACL,eACL;CAAA;CAAA;CACC,kBAAC,KAAD,IAAO,MAAM,KAAK1F,IAAlB,GADD;CAEC;CAAA;CAAA,kBAAI,SAAS,KAAKiM,WAAlB;CAAA;CAAA;CAFD,SADK;CAMH;;;GA/BatG;;CAkClBD,OAAO,MAAC,GAAD,OAAP,EAAgB,MAAhB;;;;"}
\ No newline at end of file
+{"version":3,"file":"b.js","sources":["../../src/vnode.js","../../src/options.js","../../src/h.js","../../src/util.js","../../src/clone-element.js","../../src/constants.js","../../src/render-queue.js","../../src/vdom/index.js","../../src/dom/index.js","../../src/vdom/diff.js","../../src/vdom/component-recycler.js","../../src/style.js","../../src/vdom/component.js","../../src/component.js","../../src/render.js","../../src/omi.js","main.js"],"sourcesContent":["/** Virtual DOM Node */\r\nexport function VNode() {}\r\n","/** Global options\r\n *\t@public\r\n *\t@namespace options {Object}\r\n */\r\nexport default {\r\n\r\n\tscopedStyle: true,\r\n\t$store: null,\r\n\tisWeb: true,\r\n\tstaticStyleRendered: false,\r\n\tdoc: typeof document === 'object' ? document : null\r\n\t//componentChange(component, element) { },\r\n\t/** If `true`, `prop` changes trigger synchronous component updates.\r\n\t *\t@name syncComponentUpdates\r\n\t *\t@type Boolean\r\n\t *\t@default true\r\n\t */\r\n\t//syncComponentUpdates: true,\r\n\r\n\t/** Processes all created VNodes.\r\n\t *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\r\n\t */\r\n\t//vnode(vnode) { }\r\n\r\n\t/** Hook invoked after a component is mounted. */\r\n\t//afterMount(component) { },\r\n\r\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\r\n\t//afterUpdate(component) { }\r\n\r\n\t/** Hook invoked immediately before a component is unmounted. */\r\n\t// beforeUnmount(component) { }\r\n};\r\n","import { VNode } from './vnode';\r\nimport options from './options';\r\n\r\n\r\nconst stack = [];\r\n\r\nconst EMPTY_CHILDREN = [];\r\n\r\nconst map = {\r\n\t'br': 'view',\r\n\t'hr': 'view',\r\n\r\n\t'p': 'view',\r\n\t'h1': 'view',\r\n\t'h2': 'view',\r\n\t'h3': 'view',\r\n\t'h4': 'view',\r\n\t'h5': 'view',\r\n\t'h6': 'view',\r\n\t'abbr': 'view',\r\n\t'address': 'view',\r\n\t'b': 'view',\r\n\t'bdi': 'view',\r\n\t'bdo': 'view',\r\n\t'blockquote': 'view',\r\n\t'cite': 'view',\r\n\t'code': 'view',\r\n\t'del': 'view',\r\n\t'ins': 'view',\r\n\t'dfn': 'view',\r\n\t'em': 'view',\r\n\t'strong': 'view',\r\n\t'samp': 'view',\r\n\t'kbd': 'view',\r\n\t'var': 'view',\r\n\t'i': 'view',\r\n\t'mark': 'view',\r\n\t'pre': 'view',\r\n\t'q': 'view',\r\n\t'ruby': 'view',\r\n\t'rp': 'view',\r\n\t'rt': 'view',\r\n\t's': 'view',\r\n\t'small': 'view',\r\n\t'sub': 'view',\r\n\t'sup': 'view',\r\n\t'time': 'view',\r\n\t'u': 'view',\r\n\t'wbr': 'view',\r\n\r\n\t'form': 'form',\r\n\t'input': 'input',\r\n\t'textarea': 'textarea',\r\n\t'button': 'button',\r\n\t'select': 'picker',\r\n\t'option': 'view',\r\n\t'optgroup': 'view',\r\n\t'label': 'label',\r\n\t'fieldset': 'view',\r\n\t'datalist': 'picker',\r\n\t'legend': 'view',\r\n\t'output': 'view',\r\n\r\n\t'iframe': 'view',\r\n \r\n\t'img': 'image',\r\n\t'canvas': 'canvas',\r\n\t'figure': 'view',\r\n\t'figcaption': 'view',\r\n\r\n \r\n\t'audio': 'audio',\r\n\t'source': 'audio',\r\n\t'video': 'video',\r\n\t'track': 'video',\r\n \r\n\t'a': 'navigator',\r\n\t'nav': 'view',\r\n\t'link': 'navigator',\r\n\r\n\t'ul': 'view',\r\n\t'ol': 'view',\r\n\t'li': 'view',\r\n\t'dl': 'view',\r\n\t'dt': 'view',\r\n\t'dd': 'view',\r\n\t'menu': 'view',\r\n\t'command': 'view',\r\n\r\n\r\n\t'table': 'view',\r\n\t'caption': 'view',\r\n\t'th': 'view',\r\n\t'td': 'view',\r\n\t'tr': 'view',\r\n\t'thead': 'view',\r\n\t'tbody': 'view',\r\n\t'tfoot': 'view',\r\n\t'col': 'view',\r\n\t'colgroup': 'view',\r\n\r\n\r\n\t'div': 'view',\r\n\t'main': 'view',\r\n\t//'span': 'label',\r\n\t'span': 'text',\r\n\t'header': 'view',\r\n\t'footer': 'view',\r\n\t'section': 'view',\r\n\t'article': 'view',\r\n\t'aside': 'view',\r\n\t'details': 'view',\r\n\t'dialog': 'view',\r\n\t'summary': 'view',\r\n\r\n\t'progress': 'progress',\r\n\t'meter': 'progress',\r\n\t'head': 'view',\r\n\t'meta': 'view',\r\n\t'base': 'text',\r\n\t'map': 'map',\r\n\t'area': 'navigator',\r\n\r\n\t'script': 'view',\r\n\t'noscript': 'view',\r\n\t'embed': 'view',\r\n\t'object': 'view',\r\n\t'param': 'view',\r\n\r\n\t'view': 'view',\r\n\t'scroll-view': 'scroll-view',\r\n\t'swiper': 'swiper',\r\n\t'icon': 'icon',\r\n\t'text': 'text',\r\n\r\n\t\r\n\r\n\r\n\t'checkbox': 'checkbox',\r\n\t'radio': 'radio',\r\n\t'picker': 'picker',\r\n\t'picker-view': 'picker-view',\r\n\t'slider': 'slider',\r\n\t'switch': 'switch',\r\n\t'navigator': 'navigator',\r\n\t\r\n\t'image': 'image',\r\n\t'contact-button': 'contact-button',\r\n\t'block': 'block'\r\n};\r\n\r\n\r\n/**\r\n * JSX/hyperscript reviver.\r\n * @see http://jasonformat.com/wtf-is-jsx\r\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\r\n *\r\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\r\n *\r\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\r\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\r\n * the current _actual_ DOM structure, and applying only the differences.\r\n *\r\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\r\n * and optionally children to append to the element.\r\n *\r\n * @example The following DOM tree\r\n *\r\n * `Hello!
`\r\n *\r\n * can be constructed using this function as:\r\n *\r\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\r\n *\r\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\r\n * @param {Object} attributes\tAny attributes/props to set on the created element.\r\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\r\n *\r\n * @public\r\n */\r\nexport function h(nodeName, attributes) {\r\n\tlet children=EMPTY_CHILDREN, lastSimple, child, simple, i;\r\n\tfor (i=arguments.length; i-- > 2; ) {\r\n\t\tstack.push(arguments[i]);\r\n\t}\r\n\tif (attributes && attributes.children!=null) {\r\n\t\tif (!stack.length) stack.push(attributes.children);\r\n\t\tdelete attributes.children;\r\n\t}\r\n\twhile (stack.length) {\r\n\t\tif ((child = stack.pop()) && child.pop!==undefined) {\r\n\t\t\tfor (i=child.length; i--; ) stack.push(child[i]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (typeof child==='boolean') child = null;\r\n\r\n\t\t\tif ((simple = typeof nodeName!=='function')) {\r\n\t\t\t\tif (child==null) child = '';\r\n\t\t\t\telse if (typeof child==='number') child = String(child);\r\n\t\t\t\telse if (typeof child!=='string') simple = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (simple && lastSimple) {\r\n\t\t\t\tchildren[children.length-1] += child;\r\n\t\t\t}\r\n\t\t\telse if (children===EMPTY_CHILDREN) {\r\n\t\t\t\tchildren = [child];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tchildren.push(child);\r\n\t\t\t}\r\n\r\n\t\t\tlastSimple = simple;\r\n\t\t}\r\n\t}\r\n\r\n\tlet p = new VNode();\r\n\tp.nodeName = options.isWeb?nodeName:map[nodeName];\r\n\tp.attributes = attributes == null ? undefined : attributes;\r\n\tif (children && typeof children[0] === 'string'&& !options.isWeb) {\r\n\t\tif (p.attributes) {\r\n\t\t\tp.attributes.value = children[0];\r\n\t\t} else {\r\n\t\t\tp.attributes = { value: children[0] };\r\n\t\t}\r\n\t} else {\r\n\t\tp.children = children;\r\n\t}\r\n\tp.key = attributes==null ? undefined : attributes.key;\r\n\r\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\r\n\tif (options.vnode!==undefined) options.vnode(p);\r\n\r\n\treturn p;\r\n}\r\n","/**\r\n * Copy all properties from `props` onto `obj`.\r\n * @param {Object} obj\t\tObject onto which properties should be copied.\r\n * @param {Object} props\tObject from which to copy properties.\r\n * @returns obj\r\n * @private\r\n */\r\nexport function extend(obj, props) {\r\n\tfor (let i in props) obj[i] = props[i];\r\n\treturn obj;\r\n}\r\n\r\n/**\r\n * Call a function asynchronously, as soon as possible. Makes\r\n * use of HTML Promise to schedule the callback if available,\r\n * otherwise falling back to `setTimeout` (mainly for IE<11).\r\n *\r\n * @param {Function} callback\r\n */\r\n\r\nlet usePromise = typeof Promise == 'function';\r\n\r\n// for native\r\nif (typeof document !== 'object' && typeof global !== 'undefined' && global.__config__) {\r\n\tif (global.__config__.platform === 'android') {\r\n\t\tusePromise = true;\r\n\t} else {\r\n\t\tlet systemVersion = global.__config__.systemVersion && global.__config__.systemVersion.split('.')[0] || 0;\r\n\t\tif (systemVersion > 8) {\r\n\t\t\tusePromise = true;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const defer = usePromise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\r\n","import { extend } from './util';\r\nimport { h } from './h';\r\n\r\n/**\r\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\r\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\r\n * @param {Object} props\tAttributes/props to add when cloning\r\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\r\n */\r\nexport function cloneElement(vnode, props) {\r\n\treturn h(\r\n\t\tvnode.nodeName,\r\n\t\textend(extend({}, vnode.attributes), props),\r\n\t\targuments.length>2 ? [].slice.call(arguments, 2) : vnode.children\r\n\t);\r\n}\r\n","// render modes\r\n\r\nexport const NO_RENDER = 0;\r\nexport const SYNC_RENDER = 1;\r\nexport const FORCE_RENDER = 2;\r\nexport const ASYNC_RENDER = 3;\r\n\r\n\r\nexport const ATTR_KEY = '__preactattr_';\r\n\r\n// DOM properties that should NOT have \"px\" added when numeric\r\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\r\n\r\n","import options from './options';\r\nimport { defer } from './util';\r\nimport { renderComponent } from './vdom/component';\r\n\r\n/** Managed queue of dirty components to be re-rendered */\r\n\r\nlet items = [];\r\n\r\nexport function enqueueRender(component) {\r\n\tif (!component._dirty && (component._dirty = true) && items.push(component)==1) {\r\n\t\t(options.debounceRendering || defer)(rerender);\r\n\t}\r\n}\r\n\r\nexport function rerender() {\r\n\tlet p, list = items;\r\n\titems = [];\r\n\tlet element;\r\n\twhile ( (p = list.pop()) ) {\r\n\t\telement = p.base;\r\n\t\tif (p._dirty) renderComponent(p);\r\n\t}\r\n\tif (!list.length) {\r\n\t\tif (options.componentChange) options.componentChange(p, element);\r\n\t}\r\n}\r\n","import { extend } from '../util';\r\n\r\n\r\n/**\r\n * Check if two nodes are equivalent.\r\n *\r\n * @param {Node} node\t\t\tDOM Node to compare\r\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\r\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\r\n * @private\r\n */\r\nexport function isSameNodeType(node, vnode, hydrating) {\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\t\treturn node.splitText!==undefined;\r\n\t}\r\n\tif (typeof vnode.nodeName==='string') {\r\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\r\n\t}\r\n\treturn hydrating || node._componentConstructor===vnode.nodeName;\r\n}\r\n\r\n\r\n/**\r\n * Check if an Element has a given nodeName, case-insensitively.\r\n *\r\n * @param {Element} node\tA DOM Element to inspect the name of.\r\n * @param {String} nodeName\tUnnormalized name to compare against.\r\n */\r\nexport function isNamedNode(node, nodeName) {\r\n\treturn node.normalizedNodeName===nodeName || node.nodeName.toLowerCase()===nodeName.toLowerCase();\r\n}\r\n\r\n\r\n/**\r\n * Reconstruct Component-style `props` from a VNode.\r\n * Ensures default/fallback values from `defaultProps`:\r\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\r\n *\r\n * @param {VNode} vnode\r\n * @returns {Object} props\r\n */\r\nexport function getNodeProps(vnode) {\r\n\tlet props = extend({}, vnode.attributes);\r\n\tprops.children = vnode.children;\r\n\r\n\tlet defaultProps = vnode.nodeName.defaultProps;\r\n\tif (defaultProps!==undefined) {\r\n\t\tfor (let i in defaultProps) {\r\n\t\t\tif (props[i]===undefined) {\r\n\t\t\t\tprops[i] = defaultProps[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn props;\r\n}\r\n","import { IS_NON_DIMENSIONAL } from '../constants';\r\nimport options from '../options';\r\n\r\n\r\n/** Create an element with the given nodeName.\r\n *\t@param {String} nodeName\r\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\r\n *\t@returns {Element} node\r\n */\r\nexport function createNode(nodeName, isSvg) {\r\n\tlet node = isSvg ? options.doc.createElementNS('http://www.w3.org/2000/svg', nodeName) : options.doc.createElement(nodeName);\r\n\tnode.normalizedNodeName = nodeName;\r\n\treturn node;\r\n}\r\n\r\nfunction parseCSSText(cssText) {\r\n\tlet cssTxt = cssText.replace(/\\/\\*(.|\\s)*?\\*\\//g, \" \").replace(/\\s+/g, \" \");\r\n\tlet style = {}, [a,b,rule] = cssTxt.match(/ ?(.*?) ?{([^}]*)}/)||[a,b,cssTxt];\r\n\tlet cssToJs = s => s.replace(/\\W+\\w/g, match => match.slice(-1).toUpperCase());\r\n\tlet properties = rule.split(\";\").map(o => o.split(\":\").map(x => x && x.trim()));\r\n\tfor (let [property, value] of properties) style[cssToJs(property)] = value;\r\n\treturn style;\r\n}\r\n\r\n/** Remove a child node from its parent if attached.\r\n *\t@param {Element} node\t\tThe node to remove\r\n */\r\nexport function removeNode(node) {\r\n\tlet parentNode = node.parentNode;\r\n\tif (parentNode) parentNode.removeChild(node);\r\n}\r\n\r\n\r\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\r\n *\tIf `value` is `null`, the attribute/handler will be removed.\r\n *\t@param {Element} node\tAn element to mutate\r\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\r\n *\t@param {any} old\tThe last value that was set for this name/node pair\r\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\r\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\r\n *\t@private\r\n */\r\nexport function setAccessor(node, name, old, value, isSvg) {\r\n\tif (name==='className') name = 'class';\r\n\r\n\r\n\tif (name==='key') {\r\n\t\t// ignore\r\n\t}\r\n\telse if (name==='ref') {\r\n\t\tif (old) old(null);\r\n\t\tif (value) value(node);\r\n\t}\r\n\telse if (name==='class' && !isSvg) {\r\n\t\tnode.className = value || '';\r\n\t}\r\n\telse if (name==='style') {\r\n\t\tif (options.isWeb) {\r\n\t\t\tif (!value || typeof value==='string' || typeof old==='string') {\r\n\t\t\t\tnode.style.cssText = value || '';\r\n\t\t\t}\r\n\t\t\tif (value && typeof value==='object') {\r\n\t\t\t\tif (typeof old!=='string') {\r\n\t\t\t\t\tfor (let i in old) if (!(i in value)) node.style[i] = '';\r\n\t\t\t\t}\r\n\t\t\t\tfor (let i in value) {\r\n\t\t\t\t\tnode.style[i] = typeof value[i]==='number' && IS_NON_DIMENSIONAL.test(i)===false ? (value[i]+'px') : value[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet oldJson = old,\r\n\t\t\t\tcurrentJson = value;\r\n\t\t\tif (typeof old === 'string') {\r\n\t\t\t\toldJson = parseCSSText(old);\r\n\t\t\t}\r\n\t\t\tif (typeof value == 'string') {\r\n\t\t\t\tcurrentJson = parseCSSText(value);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tlet result = {},\r\n\t\t\t\tchanged = false;\r\n\t\t\r\n\t\t\tif (oldJson) {\r\n\t\t\t\tfor (let key in oldJson) {\r\n\t\t\t\t\tif (typeof currentJson == 'object' && !(key in currentJson)) {\r\n\t\t\t\t\t\tresult[key] = '';\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tfor (let ckey in currentJson) {\r\n\t\t\t\t\tif (currentJson[ckey] !== oldJson[ckey]) {\r\n\t\t\t\t\t\tresult[ckey] = currentJson[ckey];\r\n\t\t\t\t\t\tchanged = true;\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\tif (changed) {\r\n\t\t\t\t\tnode.setStyles(result);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnode.setStyles(currentJson);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse if (name==='dangerouslySetInnerHTML') {\r\n\t\tif (value) node.innerHTML = value.__html || '';\r\n\t}\r\n\telse if (name[0]=='o' && name[1]=='n') {\r\n\t\tlet useCapture = name !== (name=name.replace(/Capture$/, ''));\r\n\t\tname = name.toLowerCase().substring(2);\r\n\t\tif (value) {\r\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\r\n\t\t}\r\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\r\n\t}\r\n\telse if (name!=='list' && name!=='type' && !isSvg && name in node) {\r\n\t\tsetProperty(node, name, value==null ? '' : value);\r\n\t\tif (value==null || value===false) node.removeAttribute(name);\r\n\t}\r\n\telse {\r\n\t\tlet ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));\r\n\t\tif (value==null || value===false) {\r\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());\r\n\t\t\telse node.removeAttribute(name);\r\n\t\t}\r\n\t\telse if (typeof value!=='function') {\r\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\r\n\t\t\telse node.setAttribute(name, value);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/** Attempt to set a DOM property to the given value.\r\n *\tIE & FF throw for certain property-value combinations.\r\n */\r\nfunction setProperty(node, name, value) {\r\n\ttry {\r\n\t\tnode[name] = value;\r\n\t} catch (e) { }\r\n}\r\n\r\n\r\n/** Proxy an event to hooked event handlers\r\n *\t@private\r\n */\r\nfunction eventProxy(e) {\r\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\r\n}\r\n","import { ATTR_KEY } from '../constants';\r\nimport { isSameNodeType, isNamedNode } from './index';\r\nimport { buildComponentFromVNode } from './component';\r\nimport { createNode, setAccessor } from '../dom/index';\r\nimport { unmountComponent } from './component';\r\nimport options from '../options';\r\nimport { removeNode } from '../dom/index';\r\n\r\n/** Queue of components that have been mounted and are awaiting componentDidMount */\r\nexport const mounts = [];\r\n\r\n/** Diff recursion count, used to track the end of the diff cycle. */\r\nexport let diffLevel = 0;\r\n\r\n/** Global flag indicating if the diff is currently within an SVG */\r\nlet isSvgMode = false;\r\n\r\n/** Global flag indicating if the diff is performing hydration */\r\nlet hydrating = false;\r\n\r\n/** Invoke queued componentDidMount lifecycle methods */\r\nexport function flushMounts() {\r\n\tlet c;\r\n\twhile ((c=mounts.pop())) {\r\n\t\tif (options.afterMount) options.afterMount(c);\r\n\t\tif (c.componentDidMount) c.componentDidMount();\r\n\t\tif (c.installed) c.installed();\r\n\t}\r\n}\r\n\r\n\r\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\r\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\r\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\r\n *\t@returns {Element} dom\t\t\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function diff(dom, vnode, context, mountAll, parent, componentRoot) {\r\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\r\n\tif (!diffLevel++) {\r\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\r\n\t\tisSvgMode = parent!=null && parent.ownerSVGElement!==undefined;\r\n\r\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\r\n\t\thydrating = dom!=null && !(ATTR_KEY in dom);\r\n\t}\r\n\r\n\tlet ret = idiff(dom, vnode, context, mountAll, componentRoot);\r\n\r\n\t// append the element if its a new parent\r\n\tif (parent && ret.parentNode!==parent) parent.appendChild(ret);\r\n\r\n\t// diffLevel being reduced to 0 means we're exiting the diff\r\n\tif (!--diffLevel) {\r\n\t\thydrating = false;\r\n\t\t// invoke queued componentDidMount lifecycle methods\r\n\t\tif (!componentRoot) flushMounts();\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\r\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\r\n\tlet out = dom,\r\n\t\tprevSvgMode = isSvgMode;\r\n\r\n\t// empty values (null, undefined, booleans) render as empty Text nodes\r\n\tif (vnode==null || typeof vnode==='boolean') vnode = '';\r\n\r\n\r\n\t// Fast case: Strings & Numbers create/update Text nodes.\r\n\tif (typeof vnode==='string' || typeof vnode==='number') {\r\n\r\n\t\t// update if it's already a Text node:\r\n\t\tif (dom && dom.splitText!==undefined && dom.parentNode && (!dom._component || componentRoot)) {\r\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\r\n\t\t\tif (dom.nodeValue!=vnode) {\r\n\t\t\t\tdom.nodeValue = vnode;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\r\n\t\t\tout = document.createTextNode(vnode);\r\n\t\t\tif (dom) {\r\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\t\t\t\trecollectNodeTree(dom, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout[ATTR_KEY] = true;\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\r\n\t// If the VNode represents a Component, perform a component diff:\r\n\tlet vnodeName = vnode.nodeName;\r\n\tif (typeof vnodeName==='function') {\r\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\r\n\t}\r\n\r\n\r\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\r\n\tisSvgMode = vnodeName==='svg' ? true : vnodeName==='foreignObject' ? false : isSvgMode;\r\n\r\n\r\n\t// If there's no existing element or it's the wrong type, create a new one:\r\n\tvnodeName = String(vnodeName);\r\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\r\n\t\tout = createNode(vnodeName, isSvgMode);\r\n\r\n\t\tif (dom) {\r\n\t\t\t// move children into the replacement node\r\n\t\t\twhile (dom.firstChild) out.appendChild(dom.firstChild);\r\n\r\n\t\t\t// if the previous Element was mounted into the DOM, replace it inline\r\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\r\n\r\n\t\t\t// recycle the old element (skips non-Element node types)\r\n\t\t\trecollectNodeTree(dom, true);\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tlet fc = out.firstChild,\r\n\t\tprops = out[ATTR_KEY],\r\n\t\tvchildren = vnode.children;\r\n\r\n\tif (props==null) {\r\n\t\tprops = out[ATTR_KEY] = {};\r\n\t\tfor (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;\r\n\t}\r\n\r\n\t// Optimization: fast-path for elements containing a single TextNode:\r\n\tif (!hydrating && vchildren && vchildren.length===1 && typeof vchildren[0]==='string' && fc!=null && fc.splitText!==undefined && fc.nextSibling==null) {\r\n\t\tif (fc.nodeValue!=vchildren[0]) {\r\n\t\t\tfc.nodeValue = vchildren[0];\r\n\t\t}\r\n\t}\r\n\t// otherwise, if there are existing or new children, diff them:\r\n\telse if (vchildren && vchildren.length || fc!=null) {\r\n\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML!=null);\r\n\t}\r\n\r\n\r\n\t// Apply attributes/props from VNode to the DOM Element:\r\n\tdiffAttributes(out, vnode.attributes, props);\r\n\r\n\r\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\r\n\tisSvgMode = prevSvgMode;\r\n\r\n\treturn out;\r\n}\r\n\r\n\r\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\r\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\r\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\r\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\r\n *\t@param {Boolean} mountAll\r\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\r\n */\r\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\r\n\tlet originalChildren = dom.childNodes,\r\n\t\tchildren = [],\r\n\t\tkeyed = {},\r\n\t\tkeyedLen = 0,\r\n\t\tmin = 0,\r\n\t\tlen = originalChildren.length,\r\n\t\tchildrenLen = 0,\r\n\t\tvlen = vchildren ? vchildren.length : 0,\r\n\t\tj, c, f, vchild, child;\r\n\r\n\t// Build up a map of keyed children and an Array of unkeyed children:\r\n\tif (len!==0) {\r\n\t\tfor (let i=0; i {\r\n\t\tif (typeof g2 === 'undefined') {\r\n\t\t\tg2 = '';\r\n\t\t}\r\n\r\n\t\t/* eslint-ignore-next-line */\r\n\t\tif (g1.match(/^\\s*(@media|\\d+%?|@-webkit-keyframes|@keyframes|to|from|@font-face)/)) {\r\n\t\t\treturn g1 + g2 + g3;\r\n\t\t}\r\n\r\n\t\tlet appendClass = g1.replace(/(\\s*)$/, '') + prefix + g2;\r\n\t\tlet prependClass = prefix + ' ' + g1.trim() + g2;\r\n\r\n\t\treturn appendClass + g3;\r\n\t\t//return appendClass + ',' + prependClass + g3;\r\n\t});\r\n\r\n\treturn css;\r\n}\r\n\r\nexport function addStyle(cssText, id) {\r\n\tid = id.toLowerCase();\r\n\tlet ele = document.getElementById(id);\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tif (ele && ele.parentNode === head) {\r\n\t\thead.removeChild(ele);\r\n\t}\r\n\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\tsomeThingStyles.setAttribute('id', id);\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\nexport function addStyleWithoutId(cssText) {\r\n\tlet head = document.getElementsByTagName('head')[0];\r\n\tlet someThingStyles = document.createElement('style');\r\n\thead.appendChild(someThingStyles);\r\n\tsomeThingStyles.setAttribute('type', 'text/css');\r\n\r\n\tif (window.ActiveXObject) {\r\n\t\tsomeThingStyles.styleSheet.cssText = cssText;\r\n\t} else {\r\n\t\tsomeThingStyles.textContent = cssText;\r\n\t}\r\n}\r\n\r\n\r\nexport function addScopedAttr(vdom, style, attr, component) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tstyle = scoper(style, attr);\r\n\t\tif (style !== component._preStyle) {\r\n\t\t\taddStyle(style, attr);\r\n\t\t}\r\n\t} else if (style !== component._preStyle) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n\tcomponent._preStyle = style;\r\n}\r\n\r\nexport function addScopedAttrStatic(vdom, style, attr) {\r\n\tif (options.scopedStyle) {\r\n\t\tscopeVdom(attr, vdom);\r\n\t\tif (!options.staticStyleRendered) {\r\n\t\t\taddStyle(scoper(style, attr), attr);\r\n\t\t}\r\n\t} else if (!options.staticStyleRendered) {\r\n\t\taddStyleWithoutId(style);\r\n\t}\r\n}\r\n\r\nexport function scopeVdom(attr,vdom){\r\n\tif (typeof vdom!== 'string'){\r\n\t\tvdom.attributes = vdom.attributes||{};\r\n\t\tvdom.attributes[attr] = '';\r\n\t\tvdom.children.forEach(child=>scopeVdom(attr,child));\r\n\t}\r\n}","import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';\r\nimport options from '../options';\r\nimport { extend } from '../util';\r\nimport { enqueueRender } from '../render-queue';\r\nimport { getNodeProps } from './index';\r\nimport { diff, mounts, diffLevel, flushMounts, recollectNodeTree, removeChildren } from './diff';\r\nimport { createComponent, collectComponent } from './component-recycler';\r\nimport { removeNode } from '../dom/index';\r\nimport {addScopedAttr, addScopedAttrStatic} from '../style';\r\n\r\n/** Set a component's `props` (generally derived from JSX attributes).\r\n *\t@param {Object} props\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\r\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\r\n */\r\nexport function setComponentProps(component, props, opts, context, mountAll) {\r\n\tif (component._disable) return;\r\n\tcomponent._disable = true;\r\n\r\n\tif ((component.__ref = props.ref)) delete props.ref;\r\n\tif ((component.__key = props.key)) delete props.key;\r\n\r\n\tif (!component.base || mountAll) {\r\n\t\tif (component.componentWillMount) component.componentWillMount();\r\n\t\tif (component.install) component.install();\r\n\t}\r\n\telse if (component.componentWillReceiveProps) {\r\n\t\tcomponent.componentWillReceiveProps(props, context);\r\n\t}\r\n\r\n\tif (context && context!==component.context) {\r\n\t\tif (!component.prevContext) component.prevContext = component.context;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tif (!component.prevProps) component.prevProps = component.props;\r\n\tcomponent.props = props;\r\n\r\n\tcomponent._disable = false;\r\n\r\n\tif (opts!==NO_RENDER) {\r\n\t\tif (opts===SYNC_RENDER || options.syncComponentUpdates!==false || !component.base) {\r\n\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tenqueueRender(component);\r\n\t\t}\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(component);\r\n}\r\n\r\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\r\n *\t@param {Component} component\r\n *\t@param {Object} [opts]\r\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\r\n *\t@private\r\n */\r\nexport function renderComponent(component, opts, mountAll, isChild) {\r\n\tif (component._disable) return;\r\n\r\n\tlet props = component.props,\r\n\t\tstate = component.state,\r\n\t\tcontext = component.context,\r\n\t\tpreviousProps = component.prevProps || props,\r\n\t\tpreviousState = component.prevState || state,\r\n\t\tpreviousContext = component.prevContext || context,\r\n\t\tisUpdate = component.base,\r\n\t\tnextBase = component.nextBase,\r\n\t\tinitialBase = isUpdate || nextBase,\r\n\t\tinitialChildComponent = component._component,\r\n\t\tskip = false,\r\n\t\trendered, inst, cbase;\r\n\r\n\t// if updating\r\n\tif (isUpdate) {\r\n\t\tcomponent.props = previousProps;\r\n\t\tcomponent.state = previousState;\r\n\t\tcomponent.context = previousContext;\r\n\t\tif (opts!==FORCE_RENDER\r\n\t\t\t&& component.shouldComponentUpdate\r\n\t\t\t&& component.shouldComponentUpdate(props, state, context) === false) {\r\n\t\t\tskip = true;\r\n\t\t}\r\n\t\telse if (component.componentWillUpdate) {\r\n\t\t\tcomponent.componentWillUpdate(props, state, context);\r\n\t\t}\r\n\t\telse if (component.beforeUpdate) {\r\n\t\t\tcomponent.beforeUpdate(props, state, context);\r\n\t\t}\r\n\t\tcomponent.props = props;\r\n\t\tcomponent.state = state;\r\n\t\tcomponent.context = context;\r\n\t}\r\n\r\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\r\n\tcomponent._dirty = false;\r\n\r\n\tif (!skip) {\r\n\t\trendered = component.render(props, state, context);\r\n\t\r\n\t\tif (component.style){\r\n\t\t\taddScopedAttr(rendered,component.style(),'_style_'+component._id,component);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (component.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,component.staticStyle(),'_style_'+component.constructor.name);\r\n\t\t}\r\n\r\n\t\t// context to pass to the child, can be updated via (grand-)parent component\r\n\t\tif (component.getChildContext) {\r\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\r\n\t\t}\r\n\r\n\t\tlet childComponent = rendered && rendered.nodeName,\r\n\t\t\ttoUnmount, base;\r\n\r\n\t\tif (typeof childComponent==='function') {\r\n\t\t\t// set up high order component link\r\n\r\n\t\t\tlet childProps = getNodeProps(rendered);\r\n\t\t\tinst = initialChildComponent;\r\n\r\n\t\t\tif (inst && inst.constructor===childComponent && childProps.key==inst.__key) {\r\n\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttoUnmount = inst;\r\n\r\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\r\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\r\n\t\t\t\tinst._parentComponent = component;\r\n\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\r\n\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\r\n\t\t\t}\r\n\r\n\t\t\tbase = inst.base;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcbase = initialBase;\r\n\r\n\t\t\t// destroy high order component link\r\n\t\t\ttoUnmount = initialChildComponent;\r\n\t\t\tif (toUnmount) {\r\n\t\t\t\tcbase = component._component = null;\r\n\t\t\t}\r\n\r\n\t\t\tif (initialBase || opts===SYNC_RENDER) {\r\n\t\t\t\tif (cbase) cbase._component = null;\r\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (initialBase && base!==initialBase && inst!==initialChildComponent) {\r\n\t\t\tlet baseParent = initialBase.parentNode;\r\n\t\t\tif (baseParent && base!==baseParent) {\r\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\r\n\r\n\t\t\t\tif (!toUnmount) {\r\n\t\t\t\t\tinitialBase._component = null;\r\n\t\t\t\t\trecollectNodeTree(initialBase, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (toUnmount) {\r\n\t\t\tunmountComponent(toUnmount);\r\n\t\t}\r\n\r\n\t\tcomponent.base = base;\r\n\t\tif (base && !isChild) {\r\n\t\t\tlet componentRef = component,\r\n\t\t\t\tt = component;\r\n\t\t\twhile ((t=t._parentComponent)) {\r\n\t\t\t\t(componentRef = t).base = base;\r\n\t\t\t}\r\n\t\t\tbase._component = componentRef;\r\n\t\t\tbase._componentConstructor = componentRef.constructor;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!isUpdate || mountAll) {\r\n\t\tmounts.unshift(component);\r\n\t}\r\n\telse if (!skip) {\r\n\t\t// Ensure that pending componentDidMount() hooks of child components\r\n\t\t// are called before the componentDidUpdate() hook in the parent.\r\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\r\n\t\t// flushMounts();\r\n\r\n\t\tif (component.componentDidUpdate) {\r\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (component.afterUpdate) {\r\n\t\t\tcomponent.afterUpdate(previousProps, previousState, previousContext);\r\n\t\t}\r\n\t\tif (options.afterUpdate) options.afterUpdate(component);\r\n\t}\r\n\r\n\tif (component._renderCallbacks!=null) {\r\n\t\twhile (component._renderCallbacks.length) component._renderCallbacks.pop().call(component);\r\n\t}\r\n\r\n\tif (!diffLevel && !isChild) flushMounts();\r\n}\r\n\r\n\r\n\r\n/** Apply the Component referenced by a VNode to the DOM.\r\n *\t@param {Element} dom\tThe DOM node to mutate\r\n *\t@param {VNode} vnode\tA Component-referencing VNode\r\n *\t@returns {Element} dom\tThe created/mutated element\r\n *\t@private\r\n */\r\nexport function buildComponentFromVNode(dom, vnode, context, mountAll) {\r\n\tlet c = dom && dom._component,\r\n\t\toriginalComponent = c,\r\n\t\toldDom = dom,\r\n\t\tisDirectOwner = c && dom._componentConstructor===vnode.nodeName,\r\n\t\tisOwner = isDirectOwner,\r\n\t\tprops = getNodeProps(vnode);\r\n\twhile (c && !isOwner && (c=c._parentComponent)) {\r\n\t\tisOwner = c.constructor===vnode.nodeName;\r\n\t}\r\n\r\n\tif (c && isOwner && (!mountAll || c._component)) {\r\n\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\t}\r\n\telse {\r\n\t\tif (originalComponent && !isDirectOwner) {\r\n\t\t\tunmountComponent(originalComponent);\r\n\t\t\tdom = oldDom = null;\r\n\t\t}\r\n\r\n\t\tc = createComponent(vnode.nodeName, props, context);\r\n\t\tif (dom && !c.nextBase) {\r\n\t\t\tc.nextBase = dom;\r\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\r\n\t\t\toldDom = null;\r\n\t\t}\r\n\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\r\n\t\tdom = c.base;\r\n\r\n\t\tif (oldDom && dom!==oldDom) {\r\n\t\t\toldDom._component = null;\r\n\t\t\trecollectNodeTree(oldDom, false);\r\n\t\t}\r\n\t}\r\n\r\n\treturn dom;\r\n}\r\n\r\n\r\n\r\n/** Remove a component from the DOM and recycle it.\r\n *\t@param {Component} component\tThe Component instance to unmount\r\n *\t@private\r\n */\r\nexport function unmountComponent(component) {\r\n\tif (options.beforeUnmount) options.beforeUnmount(component);\r\n\r\n\tlet base = component.base;\r\n\r\n\tcomponent._disable = true;\r\n\r\n\tif (component.componentWillUnmount) component.componentWillUnmount();\r\n\tif (component.uninstall) component.uninstall();\r\n\t\r\n\tcomponent.base = null;\r\n\r\n\t// recursively tear down & recollect high-order component children:\r\n\tlet inner = component._component;\r\n\tif (inner) {\r\n\t\tunmountComponent(inner);\r\n\t}\r\n\telse if (base) {\r\n\t\tif (base[ATTR_KEY] && base[ATTR_KEY].ref) base[ATTR_KEY].ref(null);\r\n\r\n\t\tcomponent.nextBase = base;\r\n\r\n\t\tremoveNode(base);\r\n\t\tcollectComponent(component);\r\n\r\n\t\tremoveChildren(base);\r\n\t}\r\n\r\n\tif (component.__ref) component.__ref(null);\r\n}\r\n","import { FORCE_RENDER } from './constants';\r\nimport { extend } from './util';\r\nimport { renderComponent } from './vdom/component';\r\nimport { enqueueRender } from './render-queue';\r\nimport options from './options';\r\n\r\nlet id = 0;\r\nfunction getId(){\r\n\treturn id++;\r\n}\r\n/** Base Component class.\r\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\r\n *\t@public\r\n *\r\n *\t@example\r\n *\tclass MyFoo extends Component {\r\n *\t\trender(props, state) {\r\n *\t\t\treturn ;\r\n *\t\t}\r\n *\t}\r\n */\r\nexport function Component(props, context) {\r\n\tthis._dirty = true;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.context = context;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.props = props;\r\n\r\n\t/** @public\r\n\t *\t@type {object}\r\n\t */\r\n\tthis.state = this.state || {};\r\n\r\n\tthis._id = getId();\r\n\r\n\tthis._preStyle = null;\r\n\r\n\tthis.$store = null;\r\n\r\n}\r\n\r\n\r\nextend(Component.prototype, {\r\n\r\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\r\n\t *\t@param {object} nextProps\r\n\t *\t@param {object} nextState\r\n\t *\t@param {object} nextContext\r\n\t *\t@returns {Boolean} should the component re-render\r\n\t *\t@name shouldComponentUpdate\r\n\t *\t@function\r\n\t */\r\n\r\n\r\n\t/** Update component state by copying properties from `state` to `this.state`.\r\n\t *\t@param {object} state\t\tA hash of state properties to update with new values\r\n\t *\t@param {function} callback\tA function to be called once component state is updated\r\n\t */\r\n\tsetState(state, callback) {\r\n\t\tlet s = this.state;\r\n\t\tif (!this.prevState) this.prevState = extend({}, s);\r\n\t\textend(s, typeof state==='function' ? state(s, this.props) : state);\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\tenqueueRender(this);\r\n\t},\r\n\r\n\r\n\t/** Immediately perform a synchronous re-render of the component.\r\n\t *\t@param {function} callback\t\tA function to be called after component is re-rendered.\r\n\t *\t@private\r\n\t */\r\n\tforceUpdate(callback) {\r\n\t\tif (callback) (this._renderCallbacks = (this._renderCallbacks || [])).push(callback);\r\n\t\trenderComponent(this, FORCE_RENDER);\r\n\t\tif (options.componentChange) options.componentChange(this, this.base);\r\n\t},\r\n\r\n\tupdate(callback){\r\n\t\tthis.forceUpdate(callback);\r\n\t},\r\n\r\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\r\n\t *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\r\n\t *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\r\n\t *\t@param {object} state\t\tThe component's current state\r\n\t *\t@param {object} context\t\tContext object (if a parent component has provided context)\r\n\t *\t@returns VNode\r\n\t */\r\n\trender() {}\r\n\r\n});\r\n","import { diff } from './vdom/diff';\r\nimport { Component } from './component';\r\nimport options from './options';\r\nimport {addScopedAttr, addScopedAttrStatic} from './style';\r\n\r\nfunction isElement(obj) {\r\n\ttry {\r\n\t //Using W3 DOM2 (works for FF, Opera and Chrome)\r\n\t return obj instanceof HTMLElement;\r\n\t}\r\n\tcatch (e){\r\n\t //Browsers not supporting W3 DOM2 don't have HTMLElement and\r\n\t //an exception is thrown and we end up here. Testing some\r\n\t //properties that all elements have (works on IE7)\r\n\t return (typeof obj===\"object\") &&\r\n\t\t(obj.nodeType===1) && (typeof obj.style === \"object\") &&\r\n\t\t(typeof obj.ownerDocument ===\"object\");\r\n\t}\r\n}\r\n\r\n/** Render JSX into a `parent` Element.\r\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\r\n *\t@param {Element} parent\t\tDOM element to render into\r\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\r\n *\t@public\r\n *\r\n *\t@example\r\n *\t// render a div into :\r\n *\trender(hello!
, document.body);\r\n *\r\n *\t@example\r\n *\t// render a \"Thing\" component into #foo:\r\n *\tconst Thing = ({ name }) => { name };\r\n *\trender(, document.querySelector('#foo'));\r\n */\r\nexport function render(vnode, parent, merge) {\r\n\toptions.staticStyleRendered = false;\r\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent;\r\n\tif (merge === true){\r\n\t\twhile (parent.firstChild){\r\n\t\t\tparent.removeChild(parent.firstChild);\r\n\t\t}\r\n\t}\r\n\tconst m = isElement(merge) || merge === undefined;\r\n\tif (vnode instanceof Component) {\r\n\t\tif (window && window.Omi){\r\n\t\t\twindow.Omi.instances.push(vnode);\r\n\t\t}\r\n\t\tif (!m){\r\n\t\t\tvnode.$store = options.$store = merge;\r\n\t\t}\r\n\t\tif (vnode.componentWillMount) vnode.componentWillMount();\r\n\t\tif (vnode.install) vnode.install();\r\n\t\tconst rendered = vnode.render();\r\n\t\tif (vnode.style){\r\n\t\t\taddScopedAttr(rendered,vnode.style(),'_style_'+vnode._id,vnode);\r\n\t\t}\r\n\t\r\n\t\t//don't rerender\r\n\t\tif (vnode.staticStyle){\r\n\t\t\taddScopedAttrStatic(rendered,vnode.staticStyle(),'_style_'+vnode.constructor.name, !vnode.base);\r\n\t\t}\r\n\r\n\t\tvnode.base = diff(m ? merge : undefined, rendered, {}, false, parent, false);\r\n\t\t\r\n\t\tif (vnode.componentDidMount) vnode.componentDidMount();\r\n\t\tif (vnode.installed) vnode.installed();\r\n\t\toptions.staticStyleRendered = true;\r\n\t\treturn vnode.base;\r\n\t}\r\n\t\r\n\tlet result = diff(merge, vnode, {}, false, parent, false);\r\n\toptions.staticStyleRendered = true;\r\n\treturn result;\r\n}\r\n","import { h, h as createElement } from './h';\r\nimport { cloneElement } from './clone-element';\r\nimport { Component } from './component';\r\nimport { render } from './render';\r\nimport { rerender } from './render-queue';\r\nimport options from './options';\r\n\r\nfunction getGlobal() {\r\n\tif (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\r\n\t\tif (typeof self !== 'undefined') {\r\n\t\t\treturn self;\r\n\t\t} else if (typeof window !== 'undefined') {\r\n\t\t\treturn window;\r\n\t\t} else if (typeof global !== 'undefined') {\r\n\t\t\treturn global;\r\n\t\t}\r\n\t\treturn (function(){\r\n\t\t\treturn this;\r\n\t\t})();\r\n\t\t\r\n\t}\r\n\treturn global;\r\n}\r\n\r\nconst instances = [];\r\nconst root = getGlobal();\r\nroot.Omi = {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nroot.Omi.version = '3.0.0';\r\n\r\nexport default {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n\r\nexport {\r\n\th,\r\n\tcreateElement,\r\n\tcloneElement,\r\n\tComponent,\r\n\trender,\r\n\trerender,\r\n\toptions,\r\n\tinstances\r\n};\r\n","import { render, Component } from '../../src/omi';\r\n\r\nclass Hello extends Component {\r\n render() {\r\n return {this.props.name}
\r\n }\r\n}\r\n\r\nclass App extends Component {\r\n install() {\r\n this.name = 'Omi'\r\n this.handleClick = this.handleClick.bind(this)\r\n }\r\n\r\n handleClick(e) {\r\n this.name = 'Hello Omi !' \r\n this.update()\r\n }\r\n\r\n style() {\r\n return `h3{\r\n cursor:pointer;\r\n color: ${Math.random() > 0.5 ? 'red' :'green'};\r\n }`\r\n }\r\n\r\n\tstaticStyle() {\r\n return `div{\r\n font-size:20px;\r\n }`\r\n\t}\r\n\t\r\n render() {\r\n return (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t
Scoped css and event test! click me!
\r\n\t\t\t\r\n\t\t)\r\n }\r\n}\r\n\r\nrender(, 'body')"],"names":["VNode","scopedStyle","$store","isWeb","staticStyleRendered","doc","document","stack","EMPTY_CHILDREN","map","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","options","value","key","vnode","extend","obj","props","usePromise","Promise","global","__config__","platform","systemVersion","split","defer","resolve","then","bind","setTimeout","cloneElement","slice","call","NO_RENDER","SYNC_RENDER","FORCE_RENDER","ASYNC_RENDER","ATTR_KEY","IS_NON_DIMENSIONAL","items","enqueueRender","component","_dirty","debounceRendering","rerender","list","element","base","renderComponent","componentChange","isSameNodeType","node","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","toLowerCase","getNodeProps","defaultProps","createNode","isSvg","createElementNS","createElement","parseCSSText","cssText","cssTxt","replace","match","a","b","rule","cssToJs","s","toUpperCase","properties","o","x","trim","property","style","removeNode","parentNode","removeChild","setAccessor","name","old","className","test","oldJson","currentJson","result","changed","ckey","setStyles","innerHTML","__html","useCapture","substring","addEventListener","eventProxy","removeEventListener","_listeners","setProperty","removeAttribute","ns","removeAttributeNS","setAttributeNS","setAttribute","e","type","event","mounts","diffLevel","isSvgMode","flushMounts","c","afterMount","componentDidMount","installed","diff","dom","context","mountAll","parent","componentRoot","ownerSVGElement","ret","idiff","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","recollectNodeTree","vnodeName","buildComponentFromVNode","firstChild","fc","vchildren","nextSibling","innerDiffNode","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","len","childrenLen","vlen","j","f","vchild","__key","insertBefore","unmountOnly","unmountComponent","ref","removeChildren","lastChild","next","previousSibling","attrs","components","collectComponent","constructor","createComponent","Ctor","inst","prototype","render","Component","doRender","window","Omi","instances","nextBase","splice","state","scoper","css","prefix","re","RegExp","g0","g1","g2","g3","appendClass","prependClass","addStyle","id","ele","getElementById","head","getElementsByTagName","someThingStyles","ActiveXObject","styleSheet","textContent","addStyleWithoutId","addScopedAttr","vdom","attr","scopeVdom","_preStyle","addScopedAttrStatic","forEach","setComponentProps","opts","_disable","__ref","componentWillMount","install","componentWillReceiveProps","prevContext","prevProps","syncComponentUpdates","isChild","previousProps","previousState","prevState","previousContext","isUpdate","initialBase","initialChildComponent","skip","rendered","cbase","shouldComponentUpdate","componentWillUpdate","beforeUpdate","_id","staticStyle","getChildContext","childComponent","toUnmount","childProps","_parentComponent","baseParent","componentRef","t","unshift","componentDidUpdate","afterUpdate","_renderCallbacks","originalComponent","oldDom","isDirectOwner","isOwner","beforeUnmount","componentWillUnmount","uninstall","inner","getId","setState","callback","forceUpdate","update","isElement","HTMLElement","nodeType","ownerDocument","merge","querySelector","m","getGlobal","Math","Array","self","root","version","Hello","App","handleClick","random"],"mappings":";;;CAAA;AACA,CAAO,SAASA,KAAT,GAAiB;;CCDxB;;;;AAIA,eAAe;;CAEdC,cAAa,IAFC;CAGdC,SAAQ,IAHM;CAIdC,QAAO,IAJO;CAKdC,sBAAqB,KALP;CAMdC,MAAK,OAAOC,QAAP,KAAoB,QAApB,GAA+BA,QAA/B,GAA0C;CAC/C;CACA;;;;;CAKA;;CAEA;;;CAGA;;CAEA;CACA;;CAEA;CACA;;CAEA;CACA;CA3Bc,CAAf;;CCAA,IAAMC,QAAQ,EAAd;;CAEA,IAAMC,iBAAiB,EAAvB;;CAEA,IAAMC,MAAM;CACX,OAAM,MADK;CAEX,OAAM,MAFK;;CAIX,MAAK,MAJM;CAKX,OAAM,MALK;CAMX,OAAM,MANK;CAOX,OAAM,MAPK;CAQX,OAAM,MARK;CASX,OAAM,MATK;CAUX,OAAM,MAVK;CAWX,SAAQ,MAXG;CAYX,YAAW,MAZA;CAaX,MAAK,MAbM;CAcX,QAAO,MAdI;CAeX,QAAO,MAfI;CAgBX,eAAc,MAhBH;CAiBX,SAAQ,MAjBG;CAkBX,SAAQ,MAlBG;CAmBX,QAAO,MAnBI;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A;CACD,SAAQ,YAAU;CACjB,UAAO,IAAP;CACA,GAFM,EAAP;CAIA;CACD,QAAOA,MAAP;CACA;;CAED,IAAMgK,YAAY,EAAlB;CACA,IAAM+F,OAAOJ,WAAb;CACAI,KAAKhG,GAAL,GAAW;CACVvL,KADU;CAEVmE,iBAFU;CAGVjC,2BAHU;CAIVkJ,qBAJU;CAKVD,eALU;CAMVnI,mBANU;CAOVjC,iBAPU;CAQVyK;CARU,CAAX;;CAWA+F,KAAKhG,GAAL,CAASiG,OAAT,GAAmB,OAAnB;;;;;;;;KCnCMC;;;;;;;;;qBACFtG,8BAAS;CACL,eAAO;CAAA;CAAA;CAAA;CAAM,iBAAK9J,KAAL,CAAWoE;CAAjB,SAAP;CACH;;;GAHe2F;;KAMdsG;;;;;;;;;mBACF5D,6BAAU;CACN,aAAKrI,IAAL,GAAY,KAAZ;CACA,aAAKkM,WAAL,GAAmB,KAAKA,WAAL,CAAiB3P,IAAjB,CAAsB,IAAtB,CAAnB;CACH;;mBAED2P,mCAAY1K,GAAG;CACX,aAAKxB,IAAL,GAAY,aAAZ;CACA,aAAKkL,MAAL;CACH;;mBAEDvL,yBAAQ;CACJ,0FAEqBgM,KAAKQ,MAAL,KAAgB,GAAhB,GAAsB,KAAtB,GAA6B,OAFlD;CAIH;;mBAEJ1C,qCAAc;CACP;CAGN;;mBAEE/D,8BAAS;CACL,eACL;CAAA;CAAA;CACC,kBAAC,KAAD,IAAO,MAAM,KAAK1F,IAAlB,GADD;CAEC;CAAA;CAAA,kBAAI,SAAS,KAAKkM,WAAlB;CAAA;CAAA;CAFD,SADK;CAMH;;;GA/BavG;;CAkClBD,OAAO,MAAC,GAAD,OAAP,EAAgB,MAAhB;;;;"}
\ No newline at end of file
diff --git a/examples/simple/main.js b/examples/simple/main.js
index dd2cef5f2..0fc4eb8c6 100644
--- a/examples/simple/main.js
+++ b/examples/simple/main.js
@@ -1,8 +1,8 @@
-import { render, Component } from '../../dist/omi.esm';
+import { render, Component } from '../../src/omi';
class Hello extends Component {
render() {
- return {this.props.name}
+ return {this.props.name}
}
}
@@ -19,15 +19,15 @@ class App extends Component {
style() {
return `h3{
- cursor:pointer;
- color: ${Math.random() > 0.5 ? 'red' :'green'};
- }`
+ cursor:pointer;
+ color: ${Math.random() > 0.5 ? 'red' :'green'};
+ }`
}
staticStyle() {
return `div{
- font-size:20px;
- }`
+ font-size:20px;
+ }`
}
render() {
diff --git a/package.json b/package.json
index ba8dff54c..55221b9a4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "omi",
- "version": "3.0.0",
+ "version": "3.0.1",
"description": "Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.",
"main": "dist/omi.js",
"jsnext:main": "dist/omi.esm.js",
diff --git a/src/style.js b/src/style.js
index ce57283e0..d12f74adf 100644
--- a/src/style.js
+++ b/src/style.js
@@ -27,8 +27,10 @@ export function scoper(css, prefix) {
}
let appendClass = g1.replace(/(\s*)$/, '') + prefix + g2;
- let prependClass = prefix + ' ' + g1.trim() + g2;
- return appendClass + ',' + prependClass + g3;
+ //let prependClass = prefix + ' ' + g1.trim() + g2;
+
+ return appendClass + g3;
+ //return appendClass + ',' + prependClass + g3;
});
return css;