{"version":3,"file":"omi.dev.js","sources":["../src/options.js","../src/util.js","../src/h.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../node_modules/weakmap-polyfill/weakmap-polyfill.js","../src/we-element.js","../src/render.js","../src/define.js","../src/tag.js","../src/clone-element.js","../src/get-host.js","../src/rpx.js","../src/class.js","../src/o.js","../node_modules/construct-style-sheets-polyfill/dist/adoptedStyleSheets.js","../src/omi.js","../src/omi.js"],"sourcesContent":["function getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function() {\n return this\n })()\n )\n }\n return global\n}\n\n/** Global options\n * @public\n * @namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n mapping: {}\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This shim allows elements written in, or compiled to, ES5 to work on native\n * implementations of Custom Elements v1. It sets new.target to the value of\n * this.constructor so that the native HTMLElement constructor can access the\n * current under-construction element's definition.\n */\n;(function() {\n if (\n // No Reflect, no classes, no need for shim because native custom elements\n // require ES2015 classes or Reflect.\n window.Reflect === undefined ||\n window.customElements === undefined ||\n // The webcomponentsjs custom elements polyfill doesn't require\n // ES2015-compatible construction (`super()` or `Reflect.construct`).\n window.customElements.hasOwnProperty('polyfillWrapFlushCallback')\n ) {\n return\n }\n const BuiltInHTMLElement = HTMLElement\n window.HTMLElement = function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor)\n }\n HTMLElement.prototype = BuiltInHTMLElement.prototype\n HTMLElement.prototype.constructor = HTMLElement\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement)\n})()\n\nexport function cssToDom(css) {\n const node = document.createElement('style')\n node.textContent = css\n return node\n}\n\nexport function camelCase(str) {\n return str.replace(/-(\\w)/g, ($, $1) => {\n return $1.toUpperCase()\n })\n}\n\nexport function Fragment(props) {\n return props.children\n}\n\nexport function extend(obj, props) {\n for (let i in props) obj[i] = props[i]\n return obj\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nexport function applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value)\n else ref.current = value\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n * @type {(callback: function) => void}\n */\nexport const defer =\n typeof Promise == 'function'\n ? Promise.resolve().then.bind(Promise.resolve())\n : setTimeout\n\nexport function isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\nexport function pathToArr(path) {\n if (typeof path !== 'string' || !path) return []\n // return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n return path\n .replace(/]/g, '')\n .replace(/\\[/g, '.')\n .split('.')\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function capitalize(name) {\n return name\n .replace(/\\-(\\w)/g, function(all, letter) {\n return letter.toUpperCase()\n })\n .replace(/^\\S/, s => s.toUpperCase())\n}\n\nexport function getValByPath(path, current) {\n const arr = pathToArr(path)\n arr.forEach(prop => {\n current = current[prop]\n })\n return current\n}\n\nexport function removeItem(item, arr) {\n if (!arr) return\n for (let i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1)\n break\n }\n }\n}\n\nexport function createStyleSheet(style) {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(style)\n return styleSheet\n}\n","import options from './options'\nimport { Fragment } from './util'\n\nconst stack = []\n\nexport function h(nodeName, attributes) {\n let children = [],\n lastSimple,\n child,\n simple,\n i\n for (i = arguments.length; i-- > 2; ) {\n stack.push(arguments[i])\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children)\n delete attributes.children\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--; ) stack.push(child[i])\n } else {\n if (typeof child === 'boolean') child = null\n\n if ((simple = typeof nodeName !== 'function')) {\n if (child == null) child = ''\n else if (typeof child === 'number') child = String(child)\n else if (typeof child !== 'string') simple = false\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child\n } else if (children.length === 0) {\n children = [child]\n } else {\n children.push(child)\n }\n\n lastSimple = simple\n }\n }\n\n if (nodeName === Fragment) {\n return children\n }\n\n const p = {\n nodeName,\n children,\n attributes: attributes == null ? undefined : attributes,\n key: attributes == null ? undefined : attributes.key\n }\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p)\n\n return p\n}\n","// render modes\n\nexport const NO_RENDER = 0\nexport const SYNC_RENDER = 1\nexport const FORCE_RENDER = 2\nexport const ASYNC_RENDER = 3\n\nexport const ATTR_KEY = 'prevProps'\n\n// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i\n","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node DOM Node to compare\n * @param {VNode} vnode Virtual DOM node to compare\n * @param {boolean} [hydrating=false] If true, ignores component constructors when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName)\n } else if (typeof vnode.nodeName === 'function') {\n return options.mapping[node.nodeName.toLowerCase()] === vnode.nodeName\n }\n return hydrating || node._componentConstructor === vnode.nodeName\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node A DOM Element to inspect the name of.\n * @param {String} nodeName Unnormalized name to compare against.\n */\nexport function isNamedNode(node, nodeName) {\n return (\n node.normalizedNodeName === nodeName ||\n node.nodeName.toLowerCase() === nodeName.toLowerCase()\n )\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nexport function getNodeProps(vnode) {\n let props = extend({}, vnode.attributes)\n props.children = vnode.children\n\n let defaultProps = vnode.nodeName.defaultProps\n if (defaultProps !== undefined) {\n for (let i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i]\n }\n }\n }\n\n return props\n}\n","import { pathToArr } from './util'\n\nexport const extension = {}\n\nexport function extend(name, handler) {\n extension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n if (i === len - 1) {\n current[arr[i]] = value\n } else {\n current = current[arr[i]]\n }\n }\n}\n\nexport function get(origin, path) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]]\n }\n\n return current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler) {\n el._listeners = el._listeners || {}\n el._listeners[type] = handler\n el.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type) {\n el.removeEventListener(type, eventProxy)\n}\n","import { IS_NON_DIMENSIONAL } from '../constants'\nimport { applyRef } from '../util'\nimport options from '../options'\nimport { extension } from '../extend'\n\n/**\n * Create an element with the given nodeName.\n * @param {string} nodeName The DOM node to create\n * @param {boolean} [isSvg=false] If `true`, creates an element within the SVG\n * namespace.\n * @returns {Element} The created DOM node\n */\nexport function createNode(nodeName, isSvg, options) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName, options)\n node.normalizedNodeName = nodeName\n return node\n}\n\n/**\n * Remove a child node from its parent if attached.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n let parentNode = node.parentNode\n if (parentNode) parentNode.removeChild(node)\n}\n\n/**\n * Set a named attribute on the given Node, with special behavior for some names\n * and event handlers. If `value` is `null`, the attribute/handler will be\n * removed.\n * @param {Element} node An element to mutate\n * @param {string} name The name/key to set, such as an event or attribute name\n * @param {*} old The last value that was set for this name/node pair\n * @param {*} value An attribute value, such as a function to be used as an\n * event handler\n * @param {boolean} isSvg Are we currently diffing inside an svg?\n * @private\n */\nexport function setAccessor(node, name, old, value, isSvg, component) {\n if (name === 'className') name = 'class'\n\n if (name[0] == 'o' && name[1] == '-') {\n if (extension[name]) {\n extension[name](node, value, component)\n }\n } else if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null)\n applyRef(value, node)\n } else if (name === 'class' && !isSvg) {\n node.className = value || ''\n } else if (name === 'style') {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || ''\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (let i in old) if (!(i in value)) node.style[i] = ''\n }\n for (let i in value) {\n node.style[i] =\n typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false\n ? value[i] + 'px'\n : value[i]\n }\n }\n } else if (name === 'unsafeHTML') {\n if (value) node.innerHTML = value || ''\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\n } else if (name[0] == 'o' && name[1] == 'n') {\n bindEvent(node, name, value, old)\n } else if (node.nodeName === 'INPUT' && name === 'value') {\n node[name] = value == null ? '' : value\n } else if (\n name !== 'list' &&\n name !== 'type' &&\n name !== 'css' &&\n !isSvg &&\n name in node &&\n value !== ''\n ) {\n //value !== '' fix for selected, disabled, checked with pure element\n // Attempt to set a DOM property to the given value.\n // IE & FF throw for certain property-value combinations.\n try {\n node[name] = value == null ? '' : value\n } catch (e) {}\n if ((value == null || value === false) && name != 'spellcheck')\n node.pureRemoveAttribute\n ? node.pureRemoveAttribute(name)\n : node.removeAttribute(name)\n } else {\n let ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''))\n // spellcheck is treated differently than all other boolean values and\n // should not be removed when the value is `false`. See:\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n if (value == null || value === false) {\n if (ns)\n node.removeAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase()\n )\n else\n node.pureRemoveAttribute\n ? node.pureRemoveAttribute(name)\n : node.removeAttribute(name)\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase(),\n value\n )\n } else {\n node.pureSetAttribute\n ? node.pureSetAttribute(name, value)\n : node.setAttribute(name, value)\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type]((options.event && options.event(e)) || e)\n}\n\nfunction bindEvent(node, name, value, old) {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n let nameLower = name.toLowerCase()\n name = (nameLower in node ? nameLower : name).slice(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor, removeNode } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport options from '../options'\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nexport const mounts = []\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nexport let diffLevel = 0\n\n/** Global flag indicating if the diff is currently within an SVG */\nlet isSvgMode = false\n\n/** Global flag indicating if the diff is performing hydration */\nlet hydrating = false\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n * @param {Element} [dom=null] A DOM node to mutate into the shape of the `vnode`\n * @param {VNode} vnode A VNode (with descendants forming a tree) representing the desired DOM structure\n * @returns {Element} dom The created/mutated element\n * @private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n // first render return undefined\n if (!dom && !vnode) return\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n let ret\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !(ATTR_KEY in dom)\n }\n if (vnode && vnode.nodeName === Fragment) {\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n // don't use css and props.css when using h.f\n // diff node list and vnode list\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n // connectedCallback 的时候 parent 为 null\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n // 返回数组的情况下,在 WeElement 中进行了 shadowRoot.appendChild\n // 所有不会出现 vnode index 大于 0 丢失的情况\n ret.push(ele)\n })\n }\n } else {\n if (isArray(dom)) {\n dom.forEach((one, index) => {\n if (index === 0) {\n ret = idiff(one, vnode, component, updateSelf)\n } else {\n recollectNodeTree(one, false)\n }\n })\n } else {\n ret = idiff(dom, vnode, component, updateSelf)\n }\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret)\n }\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (!--diffLevel) {\n hydrating = false\n // invoke queued componentDidMount lifecycle methods\n }\n\n return ret\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : vnodeName === 'foreignObject'\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--; )\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n\n return out\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n * @param {Element} dom Element whose children should be compared & mutated\n * @param {Array} vchildren Array of VNodes to compare to `dom.childNodes`\n * @param {Boolean} isHydrating If `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, isHydrating, component, updateSelf) {\n let originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (let i = 0; i < len; i++) {\n let child = originalChildren[i],\n props = child[ATTR_KEY],\n key =\n vlen && props\n ? child._component\n ? child._component.__key\n : props.key\n : null\n if (key != null) {\n keyedLen++\n keyed[key] = child\n } else if (\n props ||\n (child.splitText !== undefined\n ? isHydrating\n ? child.nodeValue.trim()\n : true\n : isHydrating)\n ) {\n children[childrenLen++] = child\n }\n }\n }\n\n if (vlen !== 0) {\n for (let i = 0; i < vlen; i++) {\n vchild = vchildren[i]\n child = null\n\n if (vchild) {\n // attempt to find a node based on key matching\n let key = vchild.key\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key]\n keyed[key] = undefined\n keyedLen--\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (\n children[j] !== undefined &&\n isSameNodeType((c = children[j]), vchild, isHydrating)\n ) {\n child = c\n children[j] = undefined\n if (j === childrenLen - 1) childrenLen--\n if (j === min) min++\n break\n }\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf)\n\n f = originalChildren[i]\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child)\n } else if (child === f.nextSibling) {\n removeNode(f)\n } else {\n dom.insertBefore(child, f)\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (let i in keyed)\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false)\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined)\n recollectNodeTree(child, false)\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n * @param {Node} node DOM node to start unmount/removal from\n * @param {Boolean} [unmountOnly=false] If `true`, only triggers unmount lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) {\n if (typeof node[ATTR_KEY].ref === 'function') {\n node[ATTR_KEY].ref(null)\n } else if (node[ATTR_KEY].ref.current) {\n node[ATTR_KEY].ref.current = null\n }\n }\n\n if (unmountOnly === false || node[ATTR_KEY] == null) {\n removeNode(node)\n }\n\n removeChildren(node)\n}\n\n/** Recollect/unmount all children.\n * - we use .lastChild here because it causes less reflow than .firstChild\n * - it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n node = node.lastChild\n while (node) {\n let next = node.previousSibling\n recollectNodeTree(node, true)\n node = next\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n * @param {Element} dom Element with attributes to diff `attrs` against\n * @param {Object} attrs The desired end-state key-value attribute pairs\n * @param {Object} old Current/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old, component, updateSelf) {\n let name\n //let update = false\n let isWeElement = dom.update\n let oldClone\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old)\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(\n dom,\n name,\n old[name],\n (old[name] = undefined),\n isSvgMode,\n component\n )\n if (isWeElement) {\n delete dom.props[name]\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(\n dom,\n name,\n old[name],\n (old[name] = attrs[name]),\n isSvgMode,\n component\n )\n }\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else if (\n name !== 'children' &&\n (!(name in old) ||\n attrs[name] !==\n (name === 'value' || name === 'checked' ? dom[name] : old[name]))\n ) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component)\n //fix lazy load props missing\n if (dom.nodeName.indexOf('-') !== -1) {\n dom.props = dom.props || {}\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","/*!\n * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill\n * https://github.com/polygonplanet/weakmap-polyfill\n * Copyright (c) 2015-2021 polygonplanet \n * @license MIT\n */\n\n(function(self) {\n 'use strict';\n\n if (self.WeakMap) {\n return;\n }\n\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var hasDefine = Object.defineProperty && (function() {\n try {\n // Avoid IE8's broken Object.defineProperty\n return Object.defineProperty({}, 'x', { value: 1 }).x === 1;\n } catch (e) {}\n })();\n\n var defineProperty = function(object, name, value) {\n if (hasDefine) {\n Object.defineProperty(object, name, {\n configurable: true,\n writable: true,\n value: value\n });\n } else {\n object[name] = value;\n }\n };\n\n self.WeakMap = (function() {\n\n // ECMA-262 23.3 WeakMap Objects\n function WeakMap() {\n if (this === void 0) {\n throw new TypeError(\"Constructor WeakMap requires 'new'\");\n }\n\n defineProperty(this, '_id', genId('_WeakMap'));\n\n // ECMA-262 23.3.1.1 WeakMap([iterable])\n if (arguments.length > 0) {\n // Currently, WeakMap `iterable` argument is not supported\n throw new TypeError('WeakMap iterable is not supported');\n }\n }\n\n // ECMA-262 23.3.3.2 WeakMap.prototype.delete(key)\n defineProperty(WeakMap.prototype, 'delete', function(key) {\n checkInstance(this, 'delete');\n\n if (!isObject(key)) {\n return false;\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n delete key[this._id];\n return true;\n }\n\n return false;\n });\n\n // ECMA-262 23.3.3.3 WeakMap.prototype.get(key)\n defineProperty(WeakMap.prototype, 'get', function(key) {\n checkInstance(this, 'get');\n\n if (!isObject(key)) {\n return void 0;\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n return entry[1];\n }\n\n return void 0;\n });\n\n // ECMA-262 23.3.3.4 WeakMap.prototype.has(key)\n defineProperty(WeakMap.prototype, 'has', function(key) {\n checkInstance(this, 'has');\n\n if (!isObject(key)) {\n return false;\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n return true;\n }\n\n return false;\n });\n\n // ECMA-262 23.3.3.5 WeakMap.prototype.set(key, value)\n defineProperty(WeakMap.prototype, 'set', function(key, value) {\n checkInstance(this, 'set');\n\n if (!isObject(key)) {\n throw new TypeError('Invalid value used as weak map key');\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n entry[1] = value;\n return this;\n }\n\n defineProperty(key, this._id, [key, value]);\n return this;\n });\n\n function checkInstance(x, methodName) {\n if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {\n throw new TypeError(\n methodName + ' method called on incompatible receiver ' +\n typeof x\n );\n }\n }\n\n function genId(prefix) {\n return prefix + '_' + rand() + '.' + rand();\n }\n\n function rand() {\n return Math.random().toString().substring(2);\n }\n\n defineProperty(WeakMap, '_polyfill', true);\n return WeakMap;\n })();\n\n function isObject(x) {\n return Object(x) === x;\n }\n\n})(\n typeof globalThis !== 'undefined' ? globalThis :\n typeof self !== 'undefined' ? self :\n typeof window !== 'undefined' ? window :\n typeof global !== 'undefined' ? global : this\n);\n","import {\n cssToDom,\n isArray,\n hyphenate,\n getValByPath,\n capitalize,\n createStyleSheet\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport 'weakmap-polyfill'\n\nlet id = 0\n\nconst adoptedStyleSheetsMap = new WeakMap()\nexport default class WeElement extends HTMLElement {\n static is = 'WeElement'\n\n constructor() {\n super()\n // fix lazy load props missing\n this.props = Object.assign({}, this.constructor.defaultProps, this.props)\n this.elementId = id++\n this.computed = {}\n this.isInstalled = false\n }\n\n connectedCallback() {\n let p = this.parentNode\n while (p && !this.store) {\n this.store = p.store\n p = p.parentNode || p.host\n }\n\n if (this.inject) {\n this.injection = {}\n p = this.parentNode\n let provide\n while (p && !provide) {\n provide = p.provide\n p = p.parentNode || p.host\n }\n if (provide) {\n this.inject.forEach(injectKey => {\n this.injection[injectKey] = provide[injectKey]\n })\n } else {\n throw 'The provide prop was not found on the parent node or the provide type is incorrect.'\n }\n }\n\n this.attrsToProps()\n\n this.beforeInstall()\n this.install()\n this.afterInstall()\n\n let shadowRoot\n if (this.constructor.isLightDom) {\n shadowRoot = this\n } else {\n if (!this.shadowRoot) {\n shadowRoot = this.attachShadow({\n mode: 'open'\n })\n } else {\n shadowRoot = this.shadowRoot\n let fc\n while ((fc = shadowRoot.firstChild)) {\n shadowRoot.removeChild(fc)\n }\n }\n }\n\n if (!adoptedStyleSheetsMap.has(this.constructor)) {\n const css = this.constructor.css\n if (css) {\n let styleSheets = []\n if (typeof css === 'string') {\n styleSheets = [createStyleSheet(css)]\n } else if (isArray(css)) {\n styleSheets = css.map(styleSheet => {\n if (typeof styleSheet === 'string') {\n return createStyleSheet(styleSheet)\n } else if (\n styleSheet.default &&\n typeof styleSheet.default === 'string'\n ) {\n return createStyleSheet(styleSheet.default)\n } else {\n return styleSheet\n }\n })\n } else if (css.default && typeof css.default === 'string') {\n styleSheets = [createStyleSheet(css.default)]\n } else {\n styleSheets = [css]\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n adoptedStyleSheetsMap.set(this.constructor, styleSheets)\n }\n } else {\n shadowRoot.adoptedStyleSheets = adoptedStyleSheetsMap.get(\n this.constructor\n )\n }\n\n this.beforeRender()\n options.afterInstall && options.afterInstall(this)\n\n const rendered = this.render(this.props, this.store)\n\n this.rootNode = diff(null, rendered, null, this)\n this.rendered()\n\n if (this.css) {\n shadowRoot.appendChild(\n cssToDom(typeof this.css === 'function' ? this.css() : this.css)\n )\n }\n\n if (this.props.css) {\n this._customStyleElement = cssToDom(this.props.css)\n this._customStyleContent = this.props.css\n shadowRoot.appendChild(this._customStyleElement)\n }\n\n if (isArray(this.rootNode)) {\n this.rootNode.forEach(function(item) {\n shadowRoot.appendChild(item)\n })\n } else {\n this.rootNode && shadowRoot.appendChild(this.rootNode)\n }\n this.installed()\n this.isInstalled = true\n }\n\n disconnectedCallback() {\n this.uninstall()\n this.isInstalled = false\n }\n\n update(ignoreAttrs, updateSelf) {\n this._willUpdate = true\n this.beforeUpdate()\n this.beforeRender()\n //fix null !== undefined\n if (this._customStyleContent != this.props.css) {\n this._customStyleContent = this.props.css\n if (this._customStyleElement) {\n this._customStyleElement.textContent = this._customStyleContent\n } else {\n // 当 prop css 开始没有值,后来有值\n this._customStyleElement = cssToDom(this.props.css)\n this.shadowRoot.appendChild(this._customStyleElement)\n }\n }\n this.attrsToProps(ignoreAttrs)\n\n const rendered = this.render(this.props, this.store)\n this.rendered()\n\n this.rootNode = diff(\n this.rootNode,\n rendered,\n this.constructor.isLightDom ? this : this.shadowRoot,\n this,\n updateSelf\n )\n this._willUpdate = false\n this.updated()\n }\n\n forceUpdate() {\n this.update(true)\n }\n\n updateProps(obj) {\n Object.keys(obj).forEach(key => {\n this.props[key] = obj[key]\n if (this.prevProps) {\n this.prevProps[key] = obj[key]\n }\n })\n this.forceUpdate()\n }\n\n updateSelf(ignoreAttrs) {\n this.update(ignoreAttrs, true)\n }\n\n removeAttribute(key) {\n super.removeAttribute(key)\n //Avoid executing removeAttribute methods before connectedCallback\n this.isInstalled && this.update()\n }\n\n setAttribute(key, val) {\n if (val && typeof val === 'object') {\n super.setAttribute(key, JSON.stringify(val))\n } else {\n super.setAttribute(key, val)\n }\n //Avoid executing setAttribute methods before connectedCallback\n this.isInstalled && this.update()\n }\n\n pureRemoveAttribute(key) {\n super.removeAttribute(key)\n }\n\n pureSetAttribute(key, val) {\n super.setAttribute(key, val)\n }\n\n attrsToProps(ignoreAttrs) {\n if (\n ignoreAttrs ||\n (this.store && this.store.ignoreAttrs) ||\n this.props.ignoreAttrs\n )\n return\n const ele = this\n ele.props['css'] = ele.getAttribute('css')\n const attrs = this.constructor.propTypes\n if (!attrs) return\n Object.keys(attrs).forEach(key => {\n const types = isArray(attrs[key]) ? attrs[key] : [attrs[key]]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n for (let i = 0; i < types.length; i++) {\n const type = types[i]\n let matched = false\n switch (type) {\n case String:\n ele.props[key] = val\n matched = true\n break\n case Number:\n ele.props[key] = Number(val)\n matched = true\n break\n case Boolean:\n if (val === 'false' || val === '0') {\n ele.props[key] = false\n } else {\n ele.props[key] = true\n }\n matched = true\n break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n try {\n ele.props[key] = JSON.parse(val)\n } catch (e) {\n console.warn(\n `The ${key} object prop does not comply with the JSON specification, the incorrect string is [${val}].`\n )\n }\n }\n matched = true\n break\n }\n if (matched) break\n }\n } else {\n if (\n ele.constructor.defaultProps &&\n ele.constructor.defaultProps.hasOwnProperty(key)\n ) {\n ele.props[key] = ele.constructor.defaultProps[key]\n } else {\n ele.props[key] = null\n }\n }\n })\n }\n\n fire(name, data) {\n const handler = this.props[`on${capitalize(name)}`]\n if (handler) {\n handler(\n new CustomEvent(name, {\n detail: data\n })\n )\n } else {\n this.dispatchEvent(\n new CustomEvent(name, {\n detail: data\n })\n )\n }\n }\n\n beforeInstall() {}\n\n install() {}\n\n afterInstall() {}\n\n installed() {}\n\n uninstall() {}\n\n beforeUpdate() {}\n\n updated() {}\n\n beforeRender() {}\n\n rendered() {}\n\n receiveProps() {}\n}\n","import { diff } from './vdom/diff'\n\nexport function render(vnode, parent, store) {\n parent = typeof parent === 'string' ? document.querySelector(parent) : parent\n if (store) {\n parent.store = store\n }\n return diff(null, vnode, parent, false)\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nconst storeHelpers = ['use', 'useSelf']\n\nexport function define(name, ctor, config) {\n if (customElements.get(name)) {\n return\n }\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n } else {\n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || {}\n }\n\n class Ele extends WeElement {\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n static isLightDom = config.isLightDom\n\n compute = config.compute\n\n render() {\n return ctor.call(this, this)\n }\n }\n\n for (let key in config) {\n if (typeof config[key] === 'function') {\n Ele.prototype[key] = function() {\n return config[key].apply(this, arguments)\n }\n }\n }\n\n storeHelpers.forEach(func => {\n if (config[func] && config[func] !== 'function') {\n Ele.prototype[func] = function() {\n return config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n","import { define } from './define'\n\nexport function tag(name) {\n return function(target) {\n define(name, target)\n }\n}\n","import { extend } from './util'\nimport { h } from './h'\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode The virtual DOM element to clone\n * @param {Object} props Attributes/props to add when cloning\n * @param {VNode} rest Any additional arguments will be used as replacement children.\n */\nexport function cloneElement(vnode, props) {\n return h(\n vnode.nodeName,\n extend(extend({}, vnode.attributes), props),\n arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children\n )\n}\n","export function getHost(ele) {\n let root = ele.getRootNode()\n return root && root.host\n}\n","export function rpx(css) {\n return css.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, (a, b) => {\n return (window.innerWidth * Number(b)) / 750 + 'px'\n })\n}\n","/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty\n\nexport function classNames() {\n var classes = []\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i]\n if (!arg) continue\n\n var argType = typeof arg\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg)\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg)\n if (inner) {\n classes.push(inner)\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key)\n }\n }\n }\n }\n\n return classes.join(' ')\n}\n\nexport function extractClass() {\n const [props, ...args] = Array.prototype.slice.call(arguments, 0)\n if (props.class) {\n args.unshift(props.class)\n delete props.class\n } else if (props.className) {\n args.unshift(props.className)\n delete props.className\n }\n if (args.length > 0) {\n return { class: classNames.apply(null, args) }\n }\n}\n","export function o(obj) {\n return JSON.stringify(obj)\n}\n","(function () {\n 'use strict';\n\n if (typeof document === 'undefined' || 'adoptedStyleSheets' in document) { return; }\n\n var hasShadyCss = 'ShadyCSS' in window && !ShadyCSS.nativeShadow;\n var bootstrapper = document.implementation.createHTMLDocument('boot');\n var closedShadowRootRegistry = new WeakMap();\n var _DOMException = typeof DOMException === 'object' ? Error : DOMException;\n\n var defineProperty = Object.defineProperty;\n var forEach = Array.prototype.forEach;\n var importPattern = /@import.+?;?$/gm;\n function rejectImports(contents) {\n var _contents = contents.replace(importPattern, '');\n if (_contents !== contents) {\n console.warn('@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418');\n }\n return _contents.trim();\n }\n function clearRules(sheet) {\n for (var i = 0; i < sheet.cssRules.length; i++) {\n sheet.deleteRule(0);\n }\n }\n function insertAllRules(from, to) {\n forEach.call(from.cssRules, function (rule, i) {\n to.insertRule(rule.cssText, i);\n });\n }\n function isElementConnected(element) {\n return 'isConnected' in element\n ? element.isConnected\n : document.contains(element);\n }\n function unique(arr) {\n return arr.filter(function (value, index) { return arr.indexOf(value) === index; });\n }\n function diff(arr1, arr2) {\n return arr1.filter(function (value) { return arr2.indexOf(value) === -1; });\n }\n function removeNode(node) {\n node.parentNode.removeChild(node);\n }\n function getShadowRoot(element) {\n return element.shadowRoot || closedShadowRootRegistry.get(element);\n }\n\n var cssStyleSheetMethods = [\n 'addImport',\n 'addPageRule',\n 'addRule',\n 'deleteRule',\n 'insertRule',\n 'removeImport',\n 'removeRule',\n ];\n var NonConstructedStyleSheet = CSSStyleSheet;\n var nonConstructedProto = NonConstructedStyleSheet.prototype;\n nonConstructedProto.replace = function () {\n return Promise.reject(new _DOMException(\"Can't call replace on non-constructed CSSStyleSheets.\"));\n };\n nonConstructedProto.replaceSync = function () {\n throw new _DOMException(\"Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.\");\n };\n function isCSSStyleSheetInstance(instance) {\n return typeof instance === 'object'\n ? proto$2.isPrototypeOf(instance) ||\n nonConstructedProto.isPrototypeOf(instance)\n : false;\n }\n function isNonConstructedStyleSheetInstance(instance) {\n return typeof instance === 'object'\n ? nonConstructedProto.isPrototypeOf(instance)\n : false;\n }\n var $basicStyleSheet = new WeakMap();\n var $locations = new WeakMap();\n var $adoptersByLocation = new WeakMap();\n function addAdopterLocation(sheet, location) {\n var adopter = document.createElement('style');\n $adoptersByLocation.get(sheet).set(location, adopter);\n $locations.get(sheet).push(location);\n return adopter;\n }\n function getAdopterByLocation(sheet, location) {\n return $adoptersByLocation.get(sheet).get(location);\n }\n function removeAdopterLocation(sheet, location) {\n $adoptersByLocation.get(sheet).delete(location);\n $locations.set(sheet, $locations.get(sheet).filter(function (_location) { return _location !== location; }));\n }\n function restyleAdopter(sheet, adopter) {\n requestAnimationFrame(function () {\n clearRules(adopter.sheet);\n insertAllRules($basicStyleSheet.get(sheet), adopter.sheet);\n });\n }\n function checkInvocationCorrectness(self) {\n if (!$basicStyleSheet.has(self)) {\n throw new TypeError('Illegal invocation');\n }\n }\n function ConstructedStyleSheet() {\n var self = this;\n var style = document.createElement('style');\n bootstrapper.body.appendChild(style);\n $basicStyleSheet.set(self, style.sheet);\n $locations.set(self, []);\n $adoptersByLocation.set(self, new WeakMap());\n }\n var proto$2 = ConstructedStyleSheet.prototype;\n proto$2.replace = function replace(contents) {\n try {\n this.replaceSync(contents);\n return Promise.resolve(this);\n }\n catch (e) {\n return Promise.reject(e);\n }\n };\n proto$2.replaceSync = function replaceSync(contents) {\n checkInvocationCorrectness(this);\n if (typeof contents === 'string') {\n var self_1 = this;\n var style = $basicStyleSheet.get(self_1).ownerNode;\n style.textContent = rejectImports(contents);\n $basicStyleSheet.set(self_1, style.sheet);\n $locations.get(self_1).forEach(function (location) {\n if (location.isConnected()) {\n restyleAdopter(self_1, getAdopterByLocation(self_1, location));\n }\n });\n }\n };\n defineProperty(proto$2, 'cssRules', {\n configurable: true,\n enumerable: true,\n get: function cssRules() {\n checkInvocationCorrectness(this);\n return $basicStyleSheet.get(this).cssRules;\n },\n });\n cssStyleSheetMethods.forEach(function (method) {\n proto$2[method] = function () {\n var self = this;\n checkInvocationCorrectness(self);\n var args = arguments;\n var basic = $basicStyleSheet.get(self);\n var locations = $locations.get(self);\n var result = basic[method].apply(basic, args);\n locations.forEach(function (location) {\n if (location.isConnected()) {\n var sheet = getAdopterByLocation(self, location).sheet;\n sheet[method].apply(sheet, args);\n }\n });\n return result;\n };\n });\n defineProperty(ConstructedStyleSheet, Symbol.hasInstance, {\n configurable: true,\n value: isCSSStyleSheetInstance,\n });\n\n var defaultObserverOptions = {\n childList: true,\n subtree: true,\n };\n var locations = new WeakMap();\n function getAssociatedLocation(element) {\n var location = locations.get(element);\n if (!location) {\n location = new Location(element);\n locations.set(element, location);\n }\n return location;\n }\n function attachAdoptedStyleSheetProperty(constructor) {\n defineProperty(constructor.prototype, 'adoptedStyleSheets', {\n configurable: true,\n enumerable: true,\n get: function () {\n return getAssociatedLocation(this).sheets;\n },\n set: function (sheets) {\n getAssociatedLocation(this).update(sheets);\n },\n });\n }\n function traverseWebComponents(node, callback) {\n var iter = document.createNodeIterator(node, NodeFilter.SHOW_ELEMENT, function (foundNode) {\n return getShadowRoot(foundNode)\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT;\n },\n null, false);\n for (var next = void 0; (next = iter.nextNode());) {\n callback(getShadowRoot(next));\n }\n }\n var $element = new WeakMap();\n var $uniqueSheets = new WeakMap();\n var $observer = new WeakMap();\n function isExistingAdopter(self, element) {\n return (element instanceof HTMLStyleElement &&\n $uniqueSheets.get(self).some(function (sheet) { return getAdopterByLocation(sheet, self); }));\n }\n function getAdopterContainer(self) {\n var element = $element.get(self);\n return element instanceof Document ? element.body : element;\n }\n function adopt(self) {\n var styleList = document.createDocumentFragment();\n var sheets = $uniqueSheets.get(self);\n var observer = $observer.get(self);\n var container = getAdopterContainer(self);\n observer.disconnect();\n sheets.forEach(function (sheet) {\n styleList.appendChild(getAdopterByLocation(sheet, self) || addAdopterLocation(sheet, self));\n });\n container.insertBefore(styleList, null);\n observer.observe(container, defaultObserverOptions);\n sheets.forEach(function (sheet) {\n restyleAdopter(sheet, getAdopterByLocation(sheet, self));\n });\n }\n function Location(element) {\n var self = this;\n self.sheets = [];\n $element.set(self, element);\n $uniqueSheets.set(self, []);\n $observer.set(self, new MutationObserver(function (mutations, observer) {\n if (!document) {\n observer.disconnect();\n return;\n }\n mutations.forEach(function (mutation) {\n if (!hasShadyCss) {\n forEach.call(mutation.addedNodes, function (node) {\n if (!(node instanceof Element)) {\n return;\n }\n traverseWebComponents(node, function (root) {\n getAssociatedLocation(root).connect();\n });\n });\n }\n forEach.call(mutation.removedNodes, function (node) {\n if (!(node instanceof Element)) {\n return;\n }\n if (isExistingAdopter(self, node)) {\n adopt(self);\n }\n if (!hasShadyCss) {\n traverseWebComponents(node, function (root) {\n getAssociatedLocation(root).disconnect();\n });\n }\n });\n });\n }));\n }\n var proto$1 = Location.prototype;\n proto$1.isConnected = function isConnected() {\n var element = $element.get(this);\n return element instanceof Document\n ? element.readyState !== 'loading'\n : isElementConnected(element.host);\n };\n proto$1.connect = function connect() {\n var container = getAdopterContainer(this);\n $observer.get(this).observe(container, defaultObserverOptions);\n if ($uniqueSheets.get(this).length > 0) {\n adopt(this);\n }\n traverseWebComponents(container, function (root) {\n getAssociatedLocation(root).connect();\n });\n };\n proto$1.disconnect = function disconnect() {\n $observer.get(this).disconnect();\n };\n proto$1.update = function update(sheets) {\n var self = this;\n var locationType = $element.get(self) === document ? 'Document' : 'ShadowRoot';\n if (!Array.isArray(sheets)) {\n throw new TypeError(\"Failed to set the 'adoptedStyleSheets' property on \" + locationType + \": Iterator getter is not callable.\");\n }\n if (!sheets.every(isCSSStyleSheetInstance)) {\n throw new TypeError(\"Failed to set the 'adoptedStyleSheets' property on \" + locationType + \": Failed to convert value to 'CSSStyleSheet'\");\n }\n if (sheets.some(isNonConstructedStyleSheetInstance)) {\n throw new TypeError(\"Failed to set the 'adoptedStyleSheets' property on \" + locationType + \": Can't adopt non-constructed stylesheets\");\n }\n self.sheets = sheets;\n var oldUniqueSheets = $uniqueSheets.get(self);\n var uniqueSheets = unique(sheets);\n var removedSheets = diff(oldUniqueSheets, uniqueSheets);\n removedSheets.forEach(function (sheet) {\n removeNode(getAdopterByLocation(sheet, self));\n removeAdopterLocation(sheet, self);\n });\n $uniqueSheets.set(self, uniqueSheets);\n if (self.isConnected() && uniqueSheets.length > 0) {\n adopt(self);\n }\n };\n\n window.CSSStyleSheet = ConstructedStyleSheet;\n attachAdoptedStyleSheetProperty(Document);\n if ('ShadowRoot' in window) {\n attachAdoptedStyleSheetProperty(ShadowRoot);\n var proto = Element.prototype;\n var attach_1 = proto.attachShadow;\n proto.attachShadow = function attachShadow(init) {\n var root = attach_1.call(this, init);\n if (init.mode === 'closed') {\n closedShadowRootRegistry.set(this, root);\n }\n return root;\n };\n }\n var documentLocation = getAssociatedLocation(document);\n if (documentLocation.isConnected()) {\n documentLocation.connect();\n }\n else {\n document.addEventListener('DOMContentLoaded', documentLocation.connect.bind(documentLocation));\n }\n\n}());\n","import { h, h as createElement } from './h'\nimport options from './options'\nimport WeElement from './we-element'\nimport { render } from './render'\nimport { define } from './define'\nimport { tag } from './tag'\nimport { cloneElement } from './clone-element'\nimport { getHost } from './get-host'\nimport { rpx } from './rpx'\nimport { classNames, extractClass } from './class'\nimport { o } from './o'\nimport { extend, get, set, bind, unbind } from './extend'\nimport { Fragment } from './util'\nimport 'construct-style-sheets-polyfill'\n\nh.f = Fragment\n\nfunction createRef() {\n return {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n o,\n elements,\n $,\n extend,\n get,\n set,\n bind,\n unbind\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.25.14'\n\nexport default omi\n\nexport {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n o,\n elements,\n $,\n extend,\n get,\n set,\n bind,\n unbind\n}\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":["getGlobal","global","Math","Array","self","window","store","root","mapping","Reflect","undefined","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","Object","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","children","extend","obj","i","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","toString","call","pathToArr","path","split","hyphenateRE","hyphenate","toLowerCase","capitalize","name","all","letter","s","getValByPath","arr","forEach","prop","createStyleSheet","style","styleSheet","CSSStyleSheet","replaceSync","stack","h","nodeName","attributes","lastSimple","child","simple","arguments","length","push","pop","String","p","key","options","vnode","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","extension","handler","set","origin","len","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","cssText","test","innerHTML","__html","bindEvent","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","useCapture","nameLower","slice","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","innerDiffNode","item","index","ele","idiff","one","recollectNodeTree","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","firstChild","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","insertBefore","unmountOnly","removeChildren","lastChild","next","previousSibling","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","indexOf","this","id","adoptedStyleSheetsMap","WeakMap","WeElement","defaultProps","elementId","computed","isInstalled","connectedCallback","host","inject","injection","provide","injectKey","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","isLightDom","attachShadow","mode","has","styleSheets","map","default","adoptedStyleSheets","beforeRender","rendered","render","rootNode","_customStyleElement","_customStyleContent","installed","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","forceUpdate","updateProps","keys","prevProps","val","JSON","stringify","getAttribute","propTypes","types","matched","Number","Boolean","substr","Omi","parse","console","warn","fire","data","CustomEvent","detail","dispatchEvent","querySelector","storeHelpers","define","ctor","config","Ele","compute","apply","func","tag","target","cloneElement","getHost","getRootNode","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","join","extractClass","args","class","unshift","o","createRef","Component","defineElement","elements","omi","version","module","exports"],"mappings":";;;;;;;;;;;EAAA,SAASA,SAAT,GAAqB;EACnB,MACE,OAAOC,MAAP,KAAkB,QAAlB,IACA,CAACA,MADD,IAEAA,OAAOC,IAAP,KAAgBA,IAFhB,IAGAD,OAAOE,KAAP,KAAiBA,KAJnB,EAKE;EACA,WACEC,QACAC,MADA,IAEAJ,MAFA,IAGC,YAAW;EACV,aAAO,IAAP;EACD,KAFD,EAJF;EAQD;EACD,SAAOA,MAAP;EACD;;EAED;;;;AAIA,gBAAe;EACbK,SAAO,IADM;EAEbC,QAAMP,WAFO;EAGbQ,WAAS;EAHI,CAAf;;ECvBA;;;;;;;;;EAgBC,CAAC,YAAW;EACX;EACE;EACA;EACAH,SAAOI,OAAP,KAAmBC,SAAnB,IACAL,OAAOM,cAAP,KAA0BD,SAD1B;EAEA;EACA;EACAL,SAAOM,cAAP,CAAsBC,cAAtB,CAAqC,2BAArC,CAPF,EAQE;EACA;EACD;EACD,MAAMC,qBAAqBC,WA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