{"version":3,"sources":["webpack:///./node_modules/preact-html-converter/dist/preact-html-converter.browser.js","webpack:///../src/apmonth.js","webpack:///../src/apdate.js","webpack:///../src/apmonthtab.js","webpack:///../src/apdatetab.js","webpack:///../src/utils.js","webpack:///../src/apnumber.js","webpack:///../src/aptime.js","webpack:///../src/capfirst.js","webpack:///../src/intcomma.js","webpack:///../src/intword.js","webpack:///../src/ordinalsuffix.js","webpack:///../src/ordinal.js","webpack:///../src/pluralize.js","webpack:///../src/widont.js","webpack:///../src/yesno.js","webpack:///../../src/util.js","webpack:///../../src/index.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack:///./node_modules/classnames/index.js","webpack:///./node_modules/intersection-observer/intersection-observer.js","webpack:///./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack:///./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack:///./node_modules/lodash.memoize/index.js","webpack:///./node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///../src/vnode.js","webpack:///../src/options.js","webpack:///../src/h.js","webpack:///../src/util.js","webpack:///../src/clone-element.js","webpack:///../src/constants.js","webpack:///../src/render-queue.js","webpack:///../src/vdom/index.js","webpack:///../src/dom/index.js","webpack:///../src/vdom/diff.js","webpack:///../src/vdom/component.js","webpack:///../src/vdom/component-recycler.js","webpack:///../src/component.js","webpack:///../src/render.js","webpack:///../src/preact.js","webpack:///(webpack)/buildin/global.js"],"names":["exports","preact","NodeType","parser","parseFragment","htmlString","DOMParser","parseFromString","body","serialize","element","innerHTML","__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","trimHTMLString","html","replace","convertAttributes","attributes","key","convAttrs","toString","name","value","split","reduce","obj","styleDeclaration","parts","keyCharacters","trim","toUpperCase","join","convertElement","registeredComponents","component","get","nodeName","toLowerCase","tagName","childNodes","h","children","Array","push","convertNode","node","Text","nodeValue","isElement","undefined","BaseConverter","Map","convert","fragment","rootNode","nodeTree","traverseNodeTree","filter","registerComponent","set","baseConvertStatic","target","source","rootElement","dangerouslySetInnerHTML","__html","PreactHTMLConverter","convertStatic","defineProperty","factory","require","0","1","2","3","4","5","6","7","8","9","10","11","Date","getMonth","r","getDate","getFullYear","e","o","u","a","isFinite","l","Math","floor","f","v","getHours","getMinutes","c","String","charAt","slice","g","d","abs","ceil","log","LN10","pow","round","M","S","indexOf","D","w","y","isArray","Number","b","RegExp","m","A","getScroll","top","ret","concat","method","document","documentElement","getScrollLeft","getScrollTop","getOffset","el","pos","elem","box","x","doc","ownerDocument","docElem","getBoundingClientRect","left","clientLeft","clientTop","getClientPosition","defaultView","parentWindow","getComputedStyleX","_RE_NUM_NO_PX","RE_POS","LEFT","each","arr","fn","isBorderBoxFn","window","getComputedStyle","computedStyle_","val","computedStyle","getPropertyValue","test","style","rsLeft","pixelLeft","BOX_MODELS","swap","options","callback","old","getPBMWidth","props","which","prop","j","cssProp","parseFloat","isWindow","domUtils","getWH","extra","viewportWidth","viewportHeight","nodeType","docWidth","docHeight","borderBoxValue","offsetWidth","offsetHeight","isBorderBox","cssBoxValue","borderBoxValueOrIsBorderBox","padding","refWin","max","win","documentElementProp","compatMode","cssShow","position","visibility","display","getWHIgnoreDisplay","args","css","_typeof","first","includeMargin","util","_objectSpread2","getWindow","offset","current","setOffset","clone","overflow","_i","scrollLeft","scrollTo","scrollTop","container","config","allowHorizontalScroll","onlyScrollIfNeeded","alignWithTop","alignWithLeft","offsetTop","offsetLeft","offsetBottom","offsetRight","containerOffset","ch","cw","containerScroll","diffTop","diffBottom","winScroll","ww","wh","isWin","elemOffset","eh","outerHeight","ew","outerWidth","height","width","clientHeight","clientWidth","_arrayLikeToArray","_slicedToArray","Symbol","iterator","next","done","constructor","from","TypeError","hasOwn","classNames","classes","arg","appendClass","parseValue","includes","newClass","module","default","IntersectionObserverEntry","intersectionRatio","registry","IntersectionObserver","THROTTLE_TIMEOUT","POLL_INTERVAL","USE_MUTATION_OBSERVER","observe","_observationTargets","some","item","Error","_registerInstance","entry","_monitorIntersections","_checkForIntersections","unobserve","_unmonitorIntersections","_unregisterInstance","disconnect","takeRecords","records","_queuedEntries","_initThresholds","opt_threshold","threshold","sort","isNaN","_parseRootMargin","opt_rootMargin","margins","map","margin","exec","unit","_monitoringIntersections","_monitoringInterval","setInterval","addEvent","_domObserver","MutationObserver","childList","characterData","subtree","clearInterval","removeEvent","rootIsInDom","_rootIsInDom","rootRect","_getRootRect","bottom","right","forEach","targetRect","rootContainsTarget","_rootContainsTarget","oldEntry","intersectionRect","_computeTargetAndRootIntersection","newEntry","time","performance","now","boundingClientRect","rootBounds","_hasCrossedThreshold","isIntersecting","_callback","rect1","rect2","parent","getParentNode","atRoot","parentRect","parentComputedStyle","root","min","_expandRectByRootMargin","rect","_rootMarginValues","newRect","oldRatio","newRatio","thresholds","containsDeep","index","splice","targetArea","intersectionArea","toFixed","opt_options","timeout","timer","bind","setTimeout","rootMargin","event","opt_useCapture","addEventListener","attachEvent","removeEventListener","detatchEvent","err","child","parentNode","host","toPropertyKey","toPrimitive","_defineProperty","enumerable","configurable","writable","reIsHostCtor","freeGlobal","global","freeSelf","self","Function","uid","arrayProto","funcProto","objectProto","coreJsData","maskSrcKey","keys","IE_PROTO","funcToString","objectToString","reIsNative","getNative","nativeCreate","Hash","entries","clear","ListCache","MapCache","assocIndexOf","array","other","baseIsNative","isObject","func","tag","isFunction","result","isHostObject","toSource","getMapData","type","data","__data__","object","getValue","memoize","resolver","memoized","cache","has","Cache","pop","_extends","VNode","stack","EMPTY_CHILDREN","lastSimple","simple","vnode","extend","applyRef","ref","defer","Promise","resolve","then","cloneElement","IS_NON_DIMENSIONAL","items","enqueueRender","debounceRendering","rerender","_componentConstructor","isNamedNode","normalizedNodeName","getNodeProps","setAccessor","isSvg","cssText","eventProxy","useCapture","_listeners","removeAttribute","ns","removeAttributeNS","setAttributeNS","setAttribute","className","mounts","hydrating","shift","componentDidMount","diff","dom","context","mountAll","componentRoot","isSvgMode","ownerSVGElement","diffLevel","flushMounts","out","splitText","_component","createTextNode","replaceChild","isDirectOwner","isOwner","_parentComponent","base","originalComponent","oldDom","nextBase","vnodeName","createElementNS","createElement","firstChild","vchildren","fc","nextSibling","isHydrating","originalChildren","vchild","len","_child","vlen","__key","childrenLen","idiff","keyed","recollectNodeTree","attrs","prevSvgMode","unmountOnly","removeChildren","previousSibling","recyclerComponents","inst","render","createComponent","Ctor","doRender","componentWillMount","componentWillReceiveProps","prevProps","renderMode","syncComponentUpdates","__ref","renderComponent","isChild","rendered","cbase","prevState","state","isUpdate","snapshot","previousContext","getDerivedStateFromProps","previousProps","previousState","componentWillUpdate","prevContext","_dirty","getChildContext","getSnapshotBeforeUpdate","childProps","childComponent","initialChildComponent","initialBase","toUnmount","componentRef","skip","componentDidUpdate","_renderCallbacks","beforeUnmount","componentWillUnmount","inner","merge","createRef"],"mappings":"kFAIS,SAAUA,EAAQC,GAAU,aAEjC,IAqCIC,EArCAC,EAAS,CACTC,cAAe,SAAUC,GAGrB,OAFa,IAAIC,WACAC,gBAAgBF,EAAY,aAClCG,MAEfC,UAAW,SAAUC,GACjB,OAAOA,EAAQC,YAmBnBC,EAAW,WAQX,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GA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tgB,G,QAETqc,K,gBAIpBkE,sBAAAvgB,EAAAugB,uB,gBAWIhY,EAAQ+X,EAAAvE,W,IAEDyE,G,IAEX,M,EAAA,eAAApH,EAAAiD,EAAA,cAAAhD,IAAA,M,EAEImD,SAAUH,E,EAEJA,G,YAICA,I,EAINrc,EAAA2e,MAAgB,M,6BAIT,E,uCAMH,KAAAM,OAAiB,G,kCE1OrBf,EAAUhF,EAAKhG,EAAAuN,G,WACnBvH,EAAA,MAAAhG,GAAA,G,SAWIwN,I,iCA9CA,SAALzB,EAAAzW,G,iDAMKyW,MAAQ9F,EAAbA,EAAA,GAAAza,KAAAugB,OAAA,mBAAAA,IAAAvgB,KAAAugB,MAAAvgB,KAAAiK,OAAAsW,G,mCAMavgB,O,YAER,SAAL8J,G,mDAI2B,e,IAA5BvL,EAAA,C,ICzBO0f,cAAgBrc,E,aACVoZ,E,wBCbbwE,OAASwC,E,SACR3G,E,WAGc9c,a,mBCXf,IAAIqH,EAGJA,EAAK,WACJ,OAAO5F,KADH,GAIL,IAEC4F,EAAIA,GAAK,IAAI2R,SAAS,cAAb,GACR,MAAO3S,GAEc,iBAAXqE,SAAqBrD,EAAIqD,QAOrC+G,EAAO1R,QAAUsH","file":"11.cd4f046809.mjs","sourcesContent":["(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('preact')) :\n    typeof define === 'function' && define.amd ? define(['exports', 'preact'], factory) :\n    (factory((global.preactHtmlConverter = {}),global.preact));\n}(this, (function (exports,preact) { 'use strict';\n\n    var parser = {\r\n        parseFragment: function (htmlString) {\r\n            var parser = new DOMParser();\r\n            var doc = parser.parseFromString(htmlString, \"text/html\");\r\n            return doc.body;\r\n        },\r\n        serialize: function (element) {\r\n            return element.innerHTML;\r\n        }\r\n    };\n\n    /*! *****************************************************************************\r\n    Copyright (c) Microsoft Corporation. All rights reserved.\r\n    Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n    this file except in compliance with the License. You may obtain a copy of the\r\n    License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n    MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n    See the Apache Version 2.0 License for specific language governing permissions\r\n    and limitations under the License.\r\n    ***************************************************************************** */\r\n\r\n    var __assign = function() {\r\n        __assign = Object.assign || function __assign(t) {\r\n            for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n                s = arguments[i];\r\n                for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n            }\r\n            return t;\r\n        };\r\n        return __assign.apply(this, arguments);\r\n    };\n\n    var NodeType;\r\n    (function (NodeType) {\r\n        NodeType[\"Text\"] = \"#text\";\r\n        NodeType[\"Comment\"] = \"#comment\";\r\n    })(NodeType || (NodeType = {}));\r\n    var convertStylesToObject = function (styles) {\r\n        return styles\r\n            .split(\";\")\r\n            .reduce(function (obj, styleDeclaration) {\r\n            if (styleDeclaration) {\r\n                var parts = styleDeclaration.split(\":\");\r\n                var key = parts[0].trim();\r\n                var keyCharacters = key.split(\"\");\r\n                for (var i = 0; i < keyCharacters.length; i++) {\r\n                    if (keyCharacters[i] === \"-\") {\r\n                        keyCharacters[i + 1] = keyCharacters[i + 1].toUpperCase();\r\n                        keyCharacters[i] = null;\r\n                    }\r\n                }\r\n                obj[keyCharacters.join(\"\")] = parts[1];\r\n            }\r\n            return obj;\r\n        }, {});\r\n    };\r\n    var trimHTMLString = function (html) {\r\n        html = html.replace(/\\n|\\t|\\r|\\0/g, \"\");\r\n        return html;\r\n    };\r\n    var assign = function (target, source) { return (__assign({}, target, source)); };\n\n    var convertAttributes = function (attributes, key) {\r\n        var convAttrs = {\r\n            key: key.toString()\r\n        };\r\n        if (!attributes)\r\n            return convAttrs;\r\n        for (var i = 0; i < attributes.length; i++) {\r\n            convAttrs[attributes[i].name] = (attributes[i].name === \"style\") ? convertStylesToObject(attributes[i].value) : attributes[i].value;\r\n        }\r\n        return convAttrs;\r\n    };\r\n    var convertElement = function (element, key, registeredComponents) {\r\n        var component = registeredComponents.get(element.nodeName.toLowerCase());\r\n        var attributes = convertAttributes(element.attributes, key);\r\n        var tagName = element.tagName.toLowerCase();\r\n        if (element.childNodes.length === 0) {\r\n            return component ? preact.h(component, attributes) : preact.h(tagName, attributes);\r\n        }\r\n        var children = new Array();\r\n        for (var i = 0; i < element.childNodes.length; i++) {\r\n            children.push(convertNode(element.childNodes[i], i, registeredComponents));\r\n        }\r\n        return component ? preact.h(component, attributes, children) : preact.h(tagName, attributes, children);\r\n    };\r\n    var convertNode = function (node, key, registeredComponents) {\r\n        if (node.nodeName === NodeType.Text && node.nodeValue.trim() !== \"\") {\r\n            return node.nodeValue;\r\n        }\r\n        if (isElement(node)) {\r\n            return convertElement(node, key, registeredComponents);\r\n        }\r\n        return null;\r\n    };\r\n    var traverseNodeTree = function (rootNode, registeredComponents) {\r\n        var nodeTree = new Array();\r\n        for (var i = 0; i < rootNode.childNodes.length; i++) {\r\n            nodeTree.push(convertNode(rootNode.childNodes[i], i, registeredComponents));\r\n        }\r\n        return nodeTree;\r\n    };\r\n    var isElement = function (node) {\r\n        return node.attributes !== undefined;\r\n    };\r\n    function BaseConverter(parser) {\r\n        var registeredComponents = new Map();\r\n        return {\r\n            convert: function (htmlString) {\r\n                if (typeof htmlString !== \"string\") {\r\n                    return null;\r\n                }\r\n                htmlString = trimHTMLString(htmlString);\r\n                var fragment = parser.parseFragment(htmlString);\r\n                if (fragment.childNodes.length > 0) {\r\n                    return traverseNodeTree(fragment, registeredComponents).filter(function (value) {\r\n                        return value ? true : false;\r\n                    });\r\n                }\r\n                return null;\r\n            },\r\n            registerComponent: function (name, component) {\r\n                registeredComponents.set(name.toLowerCase(), component);\r\n            }\r\n        };\r\n    }\r\n    function baseConvertStatic(htmlString, parser) {\r\n        if (typeof htmlString !== \"string\") {\r\n            return null;\r\n        }\r\n        htmlString = trimHTMLString(htmlString);\r\n        var fragment = parser.parseFragment(htmlString);\r\n        if (fragment.childNodes.length > 0) {\r\n            var rootElement = void 0;\r\n            if (fragment.childNodes.length === 1) {\r\n                var element = fragment.childNodes[0];\r\n                if (isElement(element)) {\r\n                    rootElement = preact.h(element.nodeName.toLowerCase(), assign({\r\n                        dangerouslySetInnerHTML: {\r\n                            __html: parser.serialize(element)\r\n                        }\r\n                    }, convertAttributes(element.attributes, 0)));\r\n                }\r\n            }\r\n            else {\r\n                rootElement = preact.h(\"div\", { dangerouslySetInnerHTML: { __html: htmlString } });\r\n            }\r\n            return rootElement;\r\n        }\r\n        return null;\r\n    }\n\n    var PreactHTMLConverter = function () { return BaseConverter(parser); };\r\n    var convertStatic = function (htmlString) { return baseConvertStatic(htmlString, parser); };\n\n    exports.PreactHTMLConverter = PreactHTMLConverter;\n    exports.convertStatic = convertStatic;\n\n    Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","/**\n * Map of AP month abbreviations. Note that they are zero-indexed due to\n * JavaScript's life choices. Exported for testing purposes.\n *\n * @private\n * @type {object}\n */\nexport const AP_MONTHS = {\n  0: 'Jan.',\n  1: 'Feb.',\n  2: 'March',\n  3: 'April',\n  4: 'May',\n  5: 'June',\n  6: 'July',\n  7: 'Aug.',\n  8: 'Sept.',\n  9: 'Oct.',\n  10: 'Nov.',\n  11: 'Dec.',\n};\n\n/**\n * Returns an AP-formatted month string that corresponds with the supplied\n * Date. If an `input` is not passed, it will use the result of `new Date();`.\n *\n * @param  {Date} [date] JavaScript Date object, defaults to current date if\n *                       not passed\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * // Remember that JavaScript zero-indexes months!\n * journalize.apmonth(new Date(2016, 10, 8));\n * // returns 'Nov.'\n *\n * // Uses the current date if no parameter is passed\n * journalize.apmonth();\n * // returns 'July' (pretend it is actually July)\n */\nexport default function apmonth(date = new Date()) {\n  return AP_MONTHS[date.getMonth()];\n}\n","import apmonth from './apmonth';\n\n/**\n * Returns an AP-formatted date string that corresponds with the supplied\n * Date. If an `input` is not passed, it will use the result of `new Date();`.\n *\n * @param  {Date} [date] JavaScript Date object, defaults to current date if\n *                       not passed\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * // Remember that JavaScript zero-indexes months!\n * journalize.apdate(new Date(2016, 10, 8));\n * // returns 'Nov. 8, 2016'\n *\n * // Uses the current date if no parameter is passed\n * journalize.apdate();\n * // returns 'July 4, 2016' (pretend it is actually July 4, 2016)\n */\nexport default function apdate(date = new Date()) {\n  const month = apmonth(date);\n  const dayOfMonth = date.getDate();\n  const year = date.getFullYear();\n\n  return `${month} ${dayOfMonth}, ${year}`;\n}\n","/**\n * Map of AP month abbreviations. Note that they are zero-indexed due to\n * JavaScript's life choices. Exported for testing purposes.\n *\n * @private\n * @type {object}\n */\nexport const AP_MONTHS_TAB = {\n  0: 'Jan',\n  1: 'Feb',\n  2: 'Mar',\n  3: 'Apr',\n  4: 'May',\n  5: 'Jun',\n  6: 'Jul',\n  7: 'Aug',\n  8: 'Sep',\n  9: 'Oct',\n  10: 'Nov',\n  11: 'Dec',\n};\n\n/**\n * Returns a tabular AP-formatted month string that corresponds with the supplied\n * Date. If an `input` is not passed, it will use the result of `new Date();`.\n *\n * @param  {Date} [date] JavaScript Date object, defaults to current date if\n *                       not passed\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * // Remember that JavaScript zero-indexes months!\n * journalize.apmonth(new Date(2016, 10, 8));\n * // returns 'Nov'\n *\n * // Uses the current date if no parameter is passed\n * journalize.apmonth();\n * // returns 'Jul' (pretend it is actually July)\n */\nexport default function apmonthtab(date = new Date()) {\n  return AP_MONTHS_TAB[date.getMonth()];\n}\n","import apmonthtab from './apmonthtab';\n\n/**\n * Returns a tabular AP-formatted date string that corresponds with the supplied\n * Date. If an `input` is not passed, it will use the result of `new Date();`.\n *\n * @param  {Date} [date] JavaScript Date object, defaults to current date if\n *                       not passed\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * // Remember that JavaScript zero-indexes months!\n * journalize.apdate(new Date(2016, 10, 8));\n * // returns 'Nov 8, 2016'\n *\n * // Uses the current date if no parameter is passed\n * journalize.apdate();\n * // returns 'Jul 4, 2016' (pretend it is actually July 4, 2016)\n */\nexport default function apdatetab(date = new Date()) {\n  const month = apmonthtab(date);\n  const dayOfMonth = date.getDate();\n  const year = date.getFullYear();\n\n  return `${month} ${dayOfMonth}, ${year}`;\n}\n","/**\n * Returns true if `value` is null or undefined;\n *\n * @private\n * @param  {*}  value\n * @return {boolean}\n */\nexport function isNil(value) {\n  return value == null;\n}\n\n/**\n * Returns true if `value` is a finite number.\n *\n * Based on: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite\n *\n * @private\n * @param  {*}  value\n * @return {boolean}\n */\nexport function _isFinite(value) {\n  return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Returns true if `value` is an integer.\n *\n * Based on: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger\n *\n * @private\n * @param  {*}  value\n * @return {boolean}\n */\nexport function isInteger(value) {\n  return _isFinite(value) && Math.floor(value) === value;\n}\n","import { isInteger, isNil } from './utils';\n\n/**\n * List of spelled out numbers per AP style.\n * @private\n * @type {string[]}\n */\nconst AP_NUMBERS = [\n  'one',\n  'two',\n  'three',\n  'four',\n  'five',\n  'six',\n  'seven',\n  'eight',\n  'nine',\n];\n\n/**\n * Converts an integer to string representation per AP style rules. If an\n * integer is not one that would be converted, it is returned in its original\n * form.\n *\n * If a non-integer is given, it will be returned in its original form as\n * well.\n *\n * @param  {number|string} val\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * journalize.apnumber(8);\n * // returns 'eight'\n *\n * journalize.apnumber(42);\n * // returns 42\n *\n */\nexport default function apnumber(val) {\n  // if `val` is undefined or null, return an empty string\n  if (isNil(val)) return '';\n\n  // convert `val` to a number\n  const convertedVal = +val;\n\n  // if `convertedVal` is not an integer, return `val` coerced to a string\n  if (!isInteger(convertedVal)) return val.toString();\n\n  // if `convertedVal` is not between 0 and 10, return `val` coerced to a string\n  if (convertedVal <= 0 || convertedVal >= 10) return val.toString();\n\n  return AP_NUMBERS[convertedVal - 1];\n}\n","/**\n * Returns an AP-formatted time string that corresponds with the supplied\n * Date. If an `input` is not passed, it will use the result of `new Date();`.\n *\n * @param  {Date} [date] JavaScript Date object, defaults to current date if\n *                       not passed\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * // Bright and early\n * journalize.aptime(new Date(2016, 10, 8, 6, 30));\n * // returns '6:30 a.m.'\n *\n * // It can handle `p.m.` too\n * journalize.aptime(new Date(2016, 10, 8, 16, 30));\n * // returns '4:30 p.m.'\n *\n * // Uses the current time if no parameter is passed\n * journalize.aptime();\n * // returns '6:45 p.m.' (pretend it is actually 6:45 p.m. right now)\n */\nexport default function aptime(date = new Date()) {\n  const hours = date.getHours();\n  const minutes = date.getMinutes();\n\n  const minutesAreZero = minutes === 0;\n\n  if (minutesAreZero) {\n    if (hours === 0) return 'midnight';\n    if (hours === 12) return 'noon';\n  }\n\n  let period, hour;\n\n  if (hours < 12) {\n    period = 'a.m.';\n    // account for how Date() returns 12 a.m. as 0\n    if (hours > 0) {\n      hour = hours;\n    } else {\n      hour = 12;\n    }\n  } else {\n    period = 'p.m.';\n\n    if (hours === 12) {\n      hour = hours;\n    } else {\n      hour = hours - 12;\n    }\n  }\n\n  if (minutesAreZero) {\n    return hour + ' ' + period;\n  }\n\n  const minute = minutes < 10 ? '0' + minutes : minutes;\n  return hour + ':' + minute + ' ' + period;\n}\n","import { isNil } from './utils';\n\n/**\n * Capitalizes the first character of a value and returns it.\n *\n * @param {any} val\n * @returns {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * journalize.capfirst('hello world');\n * // returns 'Hello world'\n */\nexport default function capfirst(val) {\n  // if `val` is undefined or null, return an empty string\n  if (isNil(val)) return '';\n\n  // coerce value to a String\n  const str = String(val);\n\n  return `${str.charAt(0).toUpperCase()}${str.slice(1)}`;\n}\n","import { _isFinite, isNil } from './utils';\n\n/**\n * Converts a number to include commas, if necessary.\n *\n * Source: http://stackoverflow.com/a/2901298\n *\n * @private\n * @param  {number|string} n\n * @return {string}\n */\nfunction numberWithCommas(n) {\n  const parts = n.toString().split('.');\n  parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n  return parts.join('.');\n}\n\n/**\n * Alters a string or number to include commas. If `val` is undefined or null,\n * an empty string is returned.\n *\n * @param  {number|string} val\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * journalize.intcomma(10311);\n * // returns '10,311'\n *\n * journalize.intcomma('1234567.1234567');\n * // returns '1,234,567.1234567'\n */\nexport default function intcomma(val) {\n  // if `val` is undefined or null, return an empty string\n  if (isNil(val)) return '';\n\n  const convertedVal = +val;\n\n  // if `convertedVal` is not a number, don't waste time converting it\n  if (!_isFinite(convertedVal)) return val.toString();\n\n  return numberWithCommas(convertedVal);\n}\n","import { isInteger, isNil } from './utils';\n\n/**\n * Array of suffixes to be used by intword.\n * @private\n * @type {string[]}\n */\nconst SUFFIXES = [\n  'million',\n  'billion',\n  'trillion',\n  'quadrillion',\n  'quintillion',\n  'sextillion',\n  'septillion',\n  'octillion',\n  'nonillion',\n  'decillion',\n];\n\n/**\n * Returns the number of digits found in a number. Accounts for exponents, too.\n *\n * @private\n * @param  {number} n\n * @return {number}\n */\nfunction getLengthOfNumber(n) {\n  return Math.ceil(Math.log(n + 1) / Math.LN10);\n}\n\n/**\n * Converts a large integer into a string representation. Only makes sense for\n * numbers at least 1 million or more.\n *\n * @param  {number|string} val\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * journalize.intword(1000000);\n * // returns '1 million'\n *\n * journalize.intword(6500000000000);\n * // returns '6.5 trillion'\n */\nexport default function intword(val) {\n  // if `val` is undefined or null, return an empty string\n  if (isNil(val)) return '';\n\n  const convertedVal = +val;\n\n  // if `convertedVal` is not an integer, return `val`\n  if (!isInteger(convertedVal)) return val.toString();\n\n  // get the absolute value to de-sign it\n  const absConvertedVal = Math.abs(convertedVal);\n\n  // if `convertedVal` is less than 1 million, no conversion is needed\n  if (absConvertedVal < 1000000) return val.toString();\n\n  // get the number of digits in the number, and substract remainder to get\n  // exponent value\n  const numDigits = getLengthOfNumber(absConvertedVal) - 1;\n  const exponent = numDigits - (numDigits % 3);\n\n  // calculate the rounded version of `convertedVal`\n  let newVal = convertedVal / Math.pow(10, exponent);\n  newVal = Math.round(newVal * 10) / 10;\n\n  return newVal + ' ' + SUFFIXES[Math.floor(exponent / 3) - 2];\n}\n","import { isInteger, isNil } from './utils.js';\n\n/**\n * A list of suffixes for conversions.\n * @private\n * @type {string[]}\n */\nconst SUFFIXES = ['th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th'];\n\n/**\n * A list of funky English ordinals.\n * @private\n * @type {number[]}\n */\nconst ENGLISH_ORDINAL_EXCEPTIONS = [11, 12, 13];\n\n/**\n * Determines the ordinal suffix for a given integer. Handles the special\n * cases of 11, 12 and 13. If a non-integer is submitted an empty string will\n * be returned.\n *\n * @param  {number|string} val\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * journalize.ordinalsuffix(5);\n * // returns 'th'\n *\n * journalize.ordinalsuffix(13);\n * // returns 'th'\n *\n * journalize.ordinalsuffix(103);\n * // returns 'rd'\n *\n * journalize.ordinalsuffix(7);\n * // returns 'th'\n *\n * journalize.ordinalsuffix('foo');\n * // returns ''\n */\nexport default function ordinalsuffix(val) {\n  // if `val` is undefined or null, return an empty string\n  if (isNil(val)) return '';\n\n  // ensure `val` is a number\n  const convertedVal = +val;\n\n  // if `convertedVal` is not an integer, return an empty string\n  if (!isInteger(convertedVal)) return '';\n\n  // if `convertedVal` is 11, 12 or 13, English gets weird\n  if (ENGLISH_ORDINAL_EXCEPTIONS.indexOf(convertedVal % 100) > -1) {\n    return SUFFIXES[0];\n  }\n\n  // return the appropriate suffix\n  return SUFFIXES[convertedVal % 10];\n}\n","import { isInteger, isNil } from './utils';\nimport ordinalsuffix from './ordinalsuffix';\n\n/**\n * List of spelled out ordinals per AP style.\n * @private\n * @type {string[]}\n */\nconst AP_ORDINALS = [\n  'first',\n  'second',\n  'third',\n  'fourth',\n  'fifth',\n  'sixth',\n  'seventh',\n  'eighth',\n  'ninth',\n];\n\n/**\n * Converts an integer into its ordinal form. If `spellOutOrdinals` is `true`,\n * 1 through 9 will be spelled out per AP style. Handles the special cases of\n * 11, 12 and 13, too. If a non-integer is submitted it will be returned in\n * its original form.\n *\n * @param  {number|string} val\n * @param {boolean} [spellOutOrdinals]\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * journalize.ordinal(5);\n * // returns '5th'\n *\n * journalize.ordinal(13);\n * // returns '13th'\n *\n * journalize.ordinal(103);\n * // returns '103rd'\n *\n * journalize.ordinal(7, true);\n * // returns 'seventh'\n */\nexport default function ordinal(val, spellOutOrdinals = false) {\n  // if `val` is undefined or null, return an empty string\n  if (isNil(val)) return '';\n\n  // ensure `val` is a number\n  const convertedVal = +val;\n\n  // if `convertedVal` is not an integer, return `val`\n  if (!isInteger(convertedVal)) return val.toString();\n\n  // if `spellOutOrdinals` is true, return the spelled out versions of 1-9\n  if (spellOutOrdinals && convertedVal < 10) {\n    return AP_ORDINALS[convertedVal - 1];\n  }\n\n  // get the suffix\n  const suffix = ordinalsuffix(convertedVal);\n\n  // return the original value with the suffix\n  return convertedVal + suffix;\n}\n","/**\n * Returns a plural suffix if the value is not 1. By default, `pluralize`\n * uses \"s\" as the suffix. If a `String` is provided, `pluralize` will attempt\n * to convert it into a `Number`. If an `Array` is provided instead of a\n * number, the length of the `Array` is used to determine the suffix. An\n * alternative plural suffix can be provided as the second parameter, and if\n * necessary, an alternative singular suffix can be provided as the third.\n *\n * @param {number|string|array} value\n * @param {string} [pluralSuffix='s']\n * @param {string} [singularSuffix='']\n * @return {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * // typical usage\n * 'vote' + journalize.pluralize(0); // votes\n * 'vote' + journalize.pluralize(1); // vote\n * 'vote' + journalize.pluralize(2); // votes\n *\n * // the plural suffix may be changed\n * 'class' + journalize.pluralize(0, 'es'); // classes\n * 'class' + journalize.pluralize(1, 'es'); // class\n * 'class' + journalize.pluralize(2, 'es'); // classes\n *\n * // some words also need a custom singular suffix\n * 'cand' + journalize.pluralize(0, 'ies', 'y'); // candies\n * 'cand' + journalize.pluralize(1, 'ies', 'y'); // candy\n * 'cand' + journalize.pluralize(2, 'ies', 'y'); // candies\n */\nexport default function pluralize(\n  value,\n  pluralSuffix = 's',\n  singularSuffix = ''\n) {\n  // if this is an array, base the return value on the length\n  if (Array.isArray(value)) {\n    if (value.length !== 1) {\n      return pluralSuffix;\n    } else {\n      return singularSuffix;\n    }\n  }\n\n  // otherwise we have a string or number - convert it and test if its 1\n  if (Number(value) !== 1) {\n    return pluralSuffix;\n  }\n\n  return singularSuffix;\n}\n","import { isNil } from './utils';\n\n/**\n * The non-breaking space character added to the string passed to widont.\n * Exported for testing purposes.\n *\n * @private\n * @type {string}\n */\nexport const nbsp = '\\xA0';\n\n/**\n * The regular expression to find the final space in a string for widont.\n *\n * @private\n * @type {RegExp}\n */\nconst widontRegex = new RegExp(/\\s+([^\\s]*)\\s*$/);\n\n/**\n * Prevents \"widows\" - a word by itself on a line - from appearing in strings\n * by replacing the space between the last two words with a non-breaking space\n * character.\n *\n * @param {string} val\n * @param {string} [replaceChar='\\xA0'] The character to replace the space with\n * @returns {string}\n * @example\n *\n * var journalize = require('journalize');\n *\n * journalize.widont('this is a string');\n * // returns 'this is a&nbsp;string'\n *\n * journalize.widont('this is a string', 'HELLO');\n * // returns 'this is aHELLOstring'\n *\n */\nexport default function widont(val, replaceChar = nbsp) {\n  // if `val` is undefined or null, return an empty string\n  if (isNil(val)) return '';\n\n  // coerce value to a String\n  const str = String(val);\n\n  return str.replace(widontRegex, `${replaceChar}$1`);\n}\n","import { isNil } from './utils';\n\n/**\n * Given a mapping of arguments for `true`, `false`, and (optionally)\n * `null`/`undefined`, return a string according to the value. If `maybe` is not\n * provided, a `null` or `undefined` value will return the `no` argument.\n *\n * @param {boolean|Null|undefined} val\n * @param {string} [yes='yes']\n * @param {string} [no='no']\n * @param {string} [maybe='maybe']\n * @returns {string|boolean|Null|undefined}\n * @example\n *\n * var journalize = require('journalize');\n *\n * journalize.yesno(true);\n * // returns 'yes'\n * journalize.yesno(false);\n * // returns 'no'\n * journalize.yesno(null);\n * // returns 'maybe'\n *\n * journalize.yesno(true, 'yay', 'nay', 'shruggie');\n * // returns 'yay'\n * journalize.yesno(false, 'yay', 'nay', 'shruggie');\n * // returns 'nay'\n * journalize.yesno(null, 'yay', 'nay', 'shruggie');\n * // returns 'shruggie'\n */\nexport default function yesno(val, yes = 'yes', no = 'no', maybe = 'maybe') {\n  const numberOfArguments = arguments.length;\n\n  // if the user only passes the value and a `yes` argument that's too\n  // ambiguous, so we give up\n  if (numberOfArguments === 2) return val;\n  // if the user passes the value, a `yes` and a `no` argument, don't assume\n  // the default `maybe` is what they want and use `no` instead\n  if (numberOfArguments === 3) maybe = no;\n\n  // if null or undefined, use `maybe`\n  if (isNil(val)) return maybe;\n\n  // if true, use `yes`\n  if (val) {\n    return yes;\n  }\n\n  // otherwise, must be `no`\n  return no;\n}\n","const RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\n\nfunction getClientPosition(elem) {\n  let box;\n  let x;\n  let y;\n  const doc = elem.ownerDocument;\n  const body = doc.body;\n  const docElem = doc && doc.documentElement;\n  // 根据 GBS 最新数据，A-Grade Browsers 都已支持 getBoundingClientRect 方法，不用再考虑传统的实现方式\n  box = elem.getBoundingClientRect();\n\n  // 注：jQuery 还考虑减去 docElem.clientLeft/clientTop\n  // 但测试发现，这样反而会导致当 html 和 body 有边距/边框样式时，获取的值不正确\n  // 此外，ie6 会忽略 html 的 margin 值，幸运地是没有谁会去设置 html 的 margin\n\n  x = box.left;\n  y = box.top;\n\n  // In IE, most of the time, 2 extra pixels are added to the top and left\n  // due to the implicit 2-pixel inset border.  In IE6/7 quirks mode and\n  // IE6 standards mode, this border can be overridden by setting the\n  // document element's border to zero -- thus, we cannot rely on the\n  // offset always being 2 pixels.\n\n  // In quirks mode, the offset can be determined by querying the body's\n  // clientLeft/clientTop, but in standards mode, it is found by querying\n  // the document element's clientLeft/clientTop.  Since we already called\n  // getClientBoundingRect we have already forced a reflow, so it is not\n  // too expensive just to query them all.\n\n  // ie 下应该减去窗口的边框吧，毕竟默认 absolute 都是相对窗口定位的\n  // 窗口边框标准是设 documentElement ,quirks 时设置 body\n  // 最好禁止在 body 和 html 上边框 ，但 ie < 9 html 默认有 2px ，减去\n  // 但是非 ie 不可能设置窗口边框，body html 也不是窗口 ,ie 可以通过 html,body 设置\n  // 标准 ie 下 docElem.clientTop 就是 border-top\n  // ie7 html 即窗口边框改变不了。永远为 2\n  // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框，即使设了 border-top 也为 0\n\n  x -= docElem.clientLeft || body.clientLeft || 0;\n  y -= docElem.clientTop || body.clientTop || 0;\n\n  return {\n    left: x,\n    top: y,\n  };\n}\n\nfunction getScroll(w, top) {\n  let ret = w[`page${top ? 'Y' : 'X'}Offset`];\n  const method = `scroll${top ? 'Top' : 'Left'}`;\n  if (typeof ret !== 'number') {\n    const d = w.document;\n    // ie6,7,8 standard mode\n    ret = d.documentElement[method];\n    if (typeof ret !== 'number') {\n      // quirks mode\n      ret = d.body[method];\n    }\n  }\n  return ret;\n}\n\nfunction getScrollLeft(w) {\n  return getScroll(w);\n}\n\nfunction getScrollTop(w) {\n  return getScroll(w, true);\n}\n\nfunction getOffset(el) {\n  const pos = getClientPosition(el);\n  const doc = el.ownerDocument;\n  const w = doc.defaultView || doc.parentWindow;\n  pos.left += getScrollLeft(w);\n  pos.top += getScrollTop(w);\n  return pos;\n}\nfunction _getComputedStyle(elem, name, computedStyle_) {\n  let val = '';\n  const d = elem.ownerDocument;\n  const computedStyle =\n    computedStyle_ || d.defaultView.getComputedStyle(elem, null);\n\n  // https://github.com/kissyteam/kissy/issues/61\n  if (computedStyle) {\n    val = computedStyle.getPropertyValue(name) || computedStyle[name];\n  }\n\n  return val;\n}\n\nconst _RE_NUM_NO_PX = new RegExp(`^(${RE_NUM})(?!px)[a-z%]+$`, 'i');\nconst RE_POS = /^(top|right|bottom|left)$/;\nconst CURRENT_STYLE = 'currentStyle';\nconst RUNTIME_STYLE = 'runtimeStyle';\nconst LEFT = 'left';\nconst PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n  // currentStyle maybe null\n  // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n  let ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];\n\n  // 当 width/height 设置为百分比时，通过 pixelLeft 方式转换的 width/height 值\n  // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19\n  // 在 ie 下不对，需要直接用 offset 方式\n  // borderWidth 等值也有问题，但考虑到 borderWidth 设为百分比的概率很小，这里就不考虑了\n\n  // From the awesome hack by Dean Edwards\n  // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n  // If we're not dealing with a regular pixel number\n  // but a number that has a weird ending, we need to convert it to pixels\n  // exclude left right for relativity\n  if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {\n    // Remember the original values\n    const style = elem.style;\n    const left = style[LEFT];\n    const rsLeft = elem[RUNTIME_STYLE][LEFT];\n\n    // prevent flashing of content\n    elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];\n\n    // Put in the new values to get a computed value out\n    style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;\n    ret = style.pixelLeft + PX;\n\n    // Revert the changed values\n    style[LEFT] = left;\n\n    elem[RUNTIME_STYLE][LEFT] = rsLeft;\n  }\n  return ret === '' ? 'auto' : ret;\n}\n\nlet getComputedStyleX;\nif (typeof window !== 'undefined') {\n  getComputedStyleX = window.getComputedStyle\n    ? _getComputedStyle\n    : _getComputedStyleIE;\n}\n\nfunction each(arr, fn) {\n  for (let i = 0; i < arr.length; i++) {\n    fn(arr[i]);\n  }\n}\n\nfunction isBorderBoxFn(elem) {\n  return getComputedStyleX(elem, 'boxSizing') === 'border-box';\n}\n\nconst BOX_MODELS = ['margin', 'border', 'padding'];\nconst CONTENT_INDEX = -1;\nconst PADDING_INDEX = 2;\nconst BORDER_INDEX = 1;\nconst MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n  const old = {};\n  const style = elem.style;\n  let name;\n\n  // Remember the old values, and insert the new ones\n  for (name in options) {\n    if (options.hasOwnProperty(name)) {\n      old[name] = style[name];\n      style[name] = options[name];\n    }\n  }\n\n  callback.call(elem);\n\n  // Revert the old values\n  for (name in options) {\n    if (options.hasOwnProperty(name)) {\n      style[name] = old[name];\n    }\n  }\n}\n\nfunction getPBMWidth(elem, props, which) {\n  let value = 0;\n  let prop;\n  let j;\n  let i;\n  for (j = 0; j < props.length; j++) {\n    prop = props[j];\n    if (prop) {\n      for (i = 0; i < which.length; i++) {\n        let cssProp;\n        if (prop === 'border') {\n          cssProp = `${prop + which[i]}Width`;\n        } else {\n          cssProp = prop + which[i];\n        }\n        value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;\n      }\n    }\n  }\n  return value;\n}\n\n/**\n * A crude way of determining if an object is a window\n * @member util\n */\nfunction isWindow(obj) {\n  // must use == for ie8\n  /* eslint eqeqeq:0 */\n  return obj != null && obj == obj.window;\n}\n\nconst domUtils = {};\n\neach(['Width', 'Height'], name => {\n  domUtils[`doc${name}`] = refWin => {\n    const d = refWin.document;\n    return Math.max(\n      // firefox chrome documentElement.scrollHeight< body.scrollHeight\n      // ie standard mode : documentElement.scrollHeight> body.scrollHeight\n      d.documentElement[`scroll${name}`],\n      // quirks : documentElement.scrollHeight 最大等于可视窗口多一点？\n      d.body[`scroll${name}`],\n      domUtils[`viewport${name}`](d),\n    );\n  };\n\n  domUtils[`viewport${name}`] = win => {\n    // pc browser includes scrollbar in window.innerWidth\n    const prop = `client${name}`;\n    const doc = win.document;\n    const body = doc.body;\n    const documentElement = doc.documentElement;\n    const documentElementProp = documentElement[prop];\n    // 标准模式取 documentElement\n    // backcompat 取 body\n    return (\n      (doc.compatMode === 'CSS1Compat' && documentElementProp) ||\n      (body && body[prop]) ||\n      documentElementProp\n    );\n  };\n});\n\n/*\n 得到元素的大小信息\n @param elem\n @param name\n @param {String} [extra]  'padding' : (css width) + padding\n 'border' : (css width) + padding + border\n 'margin' : (css width) + padding + border + margin\n */\nfunction getWH(elem, name, extra) {\n  if (isWindow(elem)) {\n    return name === 'width'\n      ? domUtils.viewportWidth(elem)\n      : domUtils.viewportHeight(elem);\n  } else if (elem.nodeType === 9) {\n    return name === 'width'\n      ? domUtils.docWidth(elem)\n      : domUtils.docHeight(elem);\n  }\n  const which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n  let borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;\n  const computedStyle = getComputedStyleX(elem);\n  const isBorderBox = isBorderBoxFn(elem, computedStyle);\n  let cssBoxValue = 0;\n  if (borderBoxValue == null || borderBoxValue <= 0) {\n    borderBoxValue = undefined;\n    // Fall back to computed then un computed css if necessary\n    cssBoxValue = getComputedStyleX(elem, name);\n    if (cssBoxValue == null || Number(cssBoxValue) < 0) {\n      cssBoxValue = elem.style[name] || 0;\n    }\n    // Normalize '', auto, and prepare for extra\n    cssBoxValue = parseFloat(cssBoxValue) || 0;\n  }\n  if (extra === undefined) {\n    extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;\n  }\n  const borderBoxValueOrIsBorderBox =\n    borderBoxValue !== undefined || isBorderBox;\n  const val = borderBoxValue || cssBoxValue;\n  if (extra === CONTENT_INDEX) {\n    if (borderBoxValueOrIsBorderBox) {\n      return (\n        val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle)\n      );\n    }\n    return cssBoxValue;\n  }\n  if (borderBoxValueOrIsBorderBox) {\n    const padding =\n      extra === PADDING_INDEX\n        ? -getPBMWidth(elem, ['border'], which, computedStyle)\n        : getPBMWidth(elem, ['margin'], which, computedStyle);\n    return val + (extra === BORDER_INDEX ? 0 : padding);\n  }\n  return (\n    cssBoxValue +\n    getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle)\n  );\n}\n\nconst cssShow = {\n  position: 'absolute',\n  visibility: 'hidden',\n  display: 'block',\n};\n\n// fix #119 : https://github.com/kissyteam/kissy/issues/119\nfunction getWHIgnoreDisplay(elem) {\n  let val;\n  const args = arguments;\n  // in case elem is window\n  // elem.offsetWidth === undefined\n  if (elem.offsetWidth !== 0) {\n    val = getWH.apply(undefined, args);\n  } else {\n    swap(elem, cssShow, () => {\n      val = getWH.apply(undefined, args);\n    });\n  }\n  return val;\n}\n\nfunction css(el, name, v) {\n  let value = v;\n  if (typeof name === 'object') {\n    for (const i in name) {\n      if (name.hasOwnProperty(i)) {\n        css(el, i, name[i]);\n      }\n    }\n    return undefined;\n  }\n  if (typeof value !== 'undefined') {\n    if (typeof value === 'number') {\n      value += 'px';\n    }\n    el.style[name] = value;\n    return undefined;\n  }\n  return getComputedStyleX(el, name);\n}\n\neach(['width', 'height'], name => {\n  const first = name.charAt(0).toUpperCase() + name.slice(1);\n  domUtils[`outer${first}`] = (el, includeMargin) => {\n    return (\n      el &&\n      getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX)\n    );\n  };\n  const which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n  domUtils[name] = (elem, val) => {\n    if (val !== undefined) {\n      if (elem) {\n        const computedStyle = getComputedStyleX(elem);\n        const isBorderBox = isBorderBoxFn(elem);\n        if (isBorderBox) {\n          val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);\n        }\n        return css(elem, name, val);\n      }\n      return undefined;\n    }\n    return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n  };\n});\n\n// 设置 elem 相对 elem.ownerDocument 的坐标\nfunction setOffset(elem, offset) {\n  // set position first, in-case top/left are set even on static elem\n  if (css(elem, 'position') === 'static') {\n    elem.style.position = 'relative';\n  }\n\n  const old = getOffset(elem);\n  const ret = {};\n  let current;\n  let key;\n\n  for (key in offset) {\n    if (offset.hasOwnProperty(key)) {\n      current = parseFloat(css(elem, key)) || 0;\n      ret[key] = current + offset[key] - old[key];\n    }\n  }\n  css(elem, ret);\n}\n\nexport default {\n  getWindow(node) {\n    const doc = node.ownerDocument || node;\n    return doc.defaultView || doc.parentWindow;\n  },\n  offset(el, value) {\n    if (typeof value !== 'undefined') {\n      setOffset(el, value);\n    } else {\n      return getOffset(el);\n    }\n  },\n  isWindow,\n  each,\n  css,\n  clone(obj) {\n    const ret = {};\n    for (const i in obj) {\n      if (obj.hasOwnProperty(i)) {\n        ret[i] = obj[i];\n      }\n    }\n    const overflow = obj.overflow;\n    if (overflow) {\n      for (const i in obj) {\n        if (obj.hasOwnProperty(i)) {\n          ret.overflow[i] = obj.overflow[i];\n        }\n      }\n    }\n    return ret;\n  },\n  scrollLeft(w, v) {\n    if (isWindow(w)) {\n      if (v === undefined) {\n        return getScrollLeft(w);\n      }\n      window.scrollTo(v, getScrollTop(w));\n    } else {\n      if (v === undefined) {\n        return w.scrollLeft;\n      }\n      w.scrollLeft = v;\n    }\n  },\n  scrollTop(w, v) {\n    if (isWindow(w)) {\n      if (v === undefined) {\n        return getScrollTop(w);\n      }\n      window.scrollTo(getScrollLeft(w), v);\n    } else {\n      if (v === undefined) {\n        return w.scrollTop;\n      }\n      w.scrollTop = v;\n    }\n  },\n  viewportWidth: 0,\n  viewportHeight: 0,\n  ...domUtils,\n};\n","import util from './util';\n\nfunction scrollIntoView(elem, container, config) {\n  config = config || {};\n  // document 归一化到 window\n  if (container.nodeType === 9) {\n    container = util.getWindow(container);\n  }\n\n  let allowHorizontalScroll = config.allowHorizontalScroll;\n  const onlyScrollIfNeeded = config.onlyScrollIfNeeded;\n  let alignWithTop = config.alignWithTop;\n  let alignWithLeft = config.alignWithLeft;\n  const offsetTop = config.offsetTop || 0;\n  const offsetLeft = config.offsetLeft || 0;\n  const offsetBottom = config.offsetBottom || 0;\n  const offsetRight = config.offsetRight || 0;\n\n  allowHorizontalScroll =\n    allowHorizontalScroll === undefined ? true : allowHorizontalScroll;\n\n  const isWin = util.isWindow(container);\n  const elemOffset = util.offset(elem);\n  const eh = util.outerHeight(elem);\n  const ew = util.outerWidth(elem);\n  let containerOffset;\n  let ch;\n  let cw;\n  let containerScroll;\n  let diffTop;\n  let diffBottom;\n  let win;\n  let winScroll;\n  let ww;\n  let wh;\n\n  if (isWin) {\n    win = container;\n    wh = util.height(win);\n    ww = util.width(win);\n    winScroll = {\n      left: util.scrollLeft(win),\n      top: util.scrollTop(win),\n    };\n    // elem 相对 container 可视视窗的距离\n    diffTop = {\n      left: elemOffset.left - winScroll.left - offsetLeft,\n      top: elemOffset.top - winScroll.top - offsetTop,\n    };\n    diffBottom = {\n      left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight,\n      top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom,\n    };\n    containerScroll = winScroll;\n  } else {\n    containerOffset = util.offset(container);\n    ch = container.clientHeight;\n    cw = container.clientWidth;\n    containerScroll = {\n      left: container.scrollLeft,\n      top: container.scrollTop,\n    };\n    // elem 相对 container 可视视窗的距离\n    // 注意边框, offset 是边框到根节点\n    diffTop = {\n      left:\n        elemOffset.left -\n        (containerOffset.left +\n          (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) -\n        offsetLeft,\n      top:\n        elemOffset.top -\n        (containerOffset.top +\n          (parseFloat(util.css(container, 'borderTopWidth')) || 0)) -\n        offsetTop,\n    };\n    diffBottom = {\n      left:\n        elemOffset.left +\n        ew -\n        (containerOffset.left +\n          cw +\n          (parseFloat(util.css(container, 'borderRightWidth')) || 0)) +\n        offsetRight,\n      top:\n        elemOffset.top +\n        eh -\n        (containerOffset.top +\n          ch +\n          (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) +\n        offsetBottom,\n    };\n  }\n\n  if (diffTop.top < 0 || diffBottom.top > 0) {\n    // 强制向上\n    if (alignWithTop === true) {\n      util.scrollTop(container, containerScroll.top + diffTop.top);\n    } else if (alignWithTop === false) {\n      util.scrollTop(container, containerScroll.top + diffBottom.top);\n    } else {\n      // 自动调整\n      if (diffTop.top < 0) {\n        util.scrollTop(container, containerScroll.top + diffTop.top);\n      } else {\n        util.scrollTop(container, containerScroll.top + diffBottom.top);\n      }\n    }\n  } else {\n    if (!onlyScrollIfNeeded) {\n      alignWithTop = alignWithTop === undefined ? true : !!alignWithTop;\n      if (alignWithTop) {\n        util.scrollTop(container, containerScroll.top + diffTop.top);\n      } else {\n        util.scrollTop(container, containerScroll.top + diffBottom.top);\n      }\n    }\n  }\n\n  if (allowHorizontalScroll) {\n    if (diffTop.left < 0 || diffBottom.left > 0) {\n      // 强制向上\n      if (alignWithLeft === true) {\n        util.scrollLeft(container, containerScroll.left + diffTop.left);\n      } else if (alignWithLeft === false) {\n        util.scrollLeft(container, containerScroll.left + diffBottom.left);\n      } else {\n        // 自动调整\n        if (diffTop.left < 0) {\n          util.scrollLeft(container, containerScroll.left + diffTop.left);\n        } else {\n          util.scrollLeft(container, containerScroll.left + diffBottom.left);\n        }\n      }\n    } else {\n      if (!onlyScrollIfNeeded) {\n        alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft;\n        if (alignWithLeft) {\n          util.scrollLeft(container, containerScroll.left + diffTop.left);\n        } else {\n          util.scrollLeft(container, containerScroll.left + diffBottom.left);\n        }\n      }\n    }\n  }\n}\n\nexport default scrollIntoView;\n","function _arrayLikeToArray(r, a) {\n  (null == a || a > r.length) && (a = r.length);\n  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n  return n;\n}\nexport { _arrayLikeToArray as default };","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n  return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","function _arrayWithHoles(r) {\n  if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","function _iterableToArrayLimit(r, l) {\n  var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n  if (null != t) {\n    var e,\n      n,\n      i,\n      u,\n      a = [],\n      f = !0,\n      o = !1;\n    try {\n      if (i = (t = t.call(r)).next, 0 === l) {\n        if (Object(t) !== t) return;\n        f = !1;\n      } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n    } catch (r) {\n      o = !0, n = r;\n    } finally {\n      try {\n        if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n      } finally {\n        if (o) throw n;\n      }\n    }\n    return a;\n  }\n}\nexport { _iterableToArrayLimit as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n  if (r) {\n    if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n    var t = {}.toString.call(r).slice(8, -1);\n    return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n  }\n}\nexport { _unsupportedIterableToArray as default };","function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.\n *\n *  https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n */\n\n(function(window, document) {\n'use strict';\n\n\n// Exits early if all IntersectionObserver and IntersectionObserverEntry\n// features are natively supported.\nif ('IntersectionObserver' in window &&\n    'IntersectionObserverEntry' in window &&\n    'intersectionRatio' in window.IntersectionObserverEntry.prototype) {\n\n  // Minimal polyfill for Edge 15's lack of `isIntersecting`\n  // See: https://github.com/w3c/IntersectionObserver/issues/211\n  if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {\n    Object.defineProperty(window.IntersectionObserverEntry.prototype,\n      'isIntersecting', {\n      get: function () {\n        return this.intersectionRatio > 0;\n      }\n    });\n  }\n  return;\n}\n\n\n/**\n * An IntersectionObserver registry. This registry exists to hold a strong\n * reference to IntersectionObserver instances currently observing a target\n * element. Without this registry, instances without another reference may be\n * garbage collected.\n */\nvar registry = [];\n\n\n/**\n * Creates the global IntersectionObserverEntry constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry\n * @param {Object} entry A dictionary of instance properties.\n * @constructor\n */\nfunction IntersectionObserverEntry(entry) {\n  this.time = entry.time;\n  this.target = entry.target;\n  this.rootBounds = entry.rootBounds;\n  this.boundingClientRect = entry.boundingClientRect;\n  this.intersectionRect = entry.intersectionRect || getEmptyRect();\n  this.isIntersecting = !!entry.intersectionRect;\n\n  // Calculates the intersection ratio.\n  var targetRect = this.boundingClientRect;\n  var targetArea = targetRect.width * targetRect.height;\n  var intersectionRect = this.intersectionRect;\n  var intersectionArea = intersectionRect.width * intersectionRect.height;\n\n  // Sets intersection ratio.\n  if (targetArea) {\n    // Round the intersection ratio to avoid floating point math issues:\n    // https://github.com/w3c/IntersectionObserver/issues/324\n    this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));\n  } else {\n    // If area is zero and is intersecting, sets to 1, otherwise to 0\n    this.intersectionRatio = this.isIntersecting ? 1 : 0;\n  }\n}\n\n\n/**\n * Creates the global IntersectionObserver constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface\n * @param {Function} callback The function to be invoked after intersection\n *     changes have queued. The function is not invoked if the queue has\n *     been emptied by calling the `takeRecords` method.\n * @param {Object=} opt_options Optional configuration options.\n * @constructor\n */\nfunction IntersectionObserver(callback, opt_options) {\n\n  var options = opt_options || {};\n\n  if (typeof callback != 'function') {\n    throw new Error('callback must be a function');\n  }\n\n  if (options.root && options.root.nodeType != 1) {\n    throw new Error('root must be an Element');\n  }\n\n  // Binds and throttles `this._checkForIntersections`.\n  this._checkForIntersections = throttle(\n      this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);\n\n  // Private properties.\n  this._callback = callback;\n  this._observationTargets = [];\n  this._queuedEntries = [];\n  this._rootMarginValues = this._parseRootMargin(options.rootMargin);\n\n  // Public properties.\n  this.thresholds = this._initThresholds(options.threshold);\n  this.root = options.root || null;\n  this.rootMargin = this._rootMarginValues.map(function(margin) {\n    return margin.value + margin.unit;\n  }).join(' ');\n}\n\n\n/**\n * The minimum interval within which the document will be checked for\n * intersection changes.\n */\nIntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;\n\n\n/**\n * The frequency in which the polyfill polls for intersection changes.\n * this can be updated on a per instance basis and must be set prior to\n * calling `observe` on the first target.\n */\nIntersectionObserver.prototype.POLL_INTERVAL = null;\n\n/**\n * Use a mutation observer on the root element\n * to detect intersection changes.\n */\nIntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;\n\n\n/**\n * Starts observing a target element for intersection changes based on\n * the thresholds values.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.observe = function(target) {\n  var isTargetAlreadyObserved = this._observationTargets.some(function(item) {\n    return item.element == target;\n  });\n\n  if (isTargetAlreadyObserved) {\n    return;\n  }\n\n  if (!(target && target.nodeType == 1)) {\n    throw new Error('target must be an Element');\n  }\n\n  this._registerInstance();\n  this._observationTargets.push({element: target, entry: null});\n  this._monitorIntersections();\n  this._checkForIntersections();\n};\n\n\n/**\n * Stops observing a target element for intersection changes.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.unobserve = function(target) {\n  this._observationTargets =\n      this._observationTargets.filter(function(item) {\n\n    return item.element != target;\n  });\n  if (!this._observationTargets.length) {\n    this._unmonitorIntersections();\n    this._unregisterInstance();\n  }\n};\n\n\n/**\n * Stops observing all target elements for intersection changes.\n */\nIntersectionObserver.prototype.disconnect = function() {\n  this._observationTargets = [];\n  this._unmonitorIntersections();\n  this._unregisterInstance();\n};\n\n\n/**\n * Returns any queue entries that have not yet been reported to the\n * callback and clears the queue. This can be used in conjunction with the\n * callback to obtain the absolute most up-to-date intersection information.\n * @return {Array} The currently queued entries.\n */\nIntersectionObserver.prototype.takeRecords = function() {\n  var records = this._queuedEntries.slice();\n  this._queuedEntries = [];\n  return records;\n};\n\n\n/**\n * Accepts the threshold value from the user configuration object and\n * returns a sorted array of unique threshold values. If a value is not\n * between 0 and 1 and error is thrown.\n * @private\n * @param {Array|number=} opt_threshold An optional threshold value or\n *     a list of threshold values, defaulting to [0].\n * @return {Array} A sorted list of unique and valid threshold values.\n */\nIntersectionObserver.prototype._initThresholds = function(opt_threshold) {\n  var threshold = opt_threshold || [0];\n  if (!Array.isArray(threshold)) threshold = [threshold];\n\n  return threshold.sort().filter(function(t, i, a) {\n    if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {\n      throw new Error('threshold must be a number between 0 and 1 inclusively');\n    }\n    return t !== a[i - 1];\n  });\n};\n\n\n/**\n * Accepts the rootMargin value from the user configuration object\n * and returns an array of the four margin values as an object containing\n * the value and unit properties. If any of the values are not properly\n * formatted or use a unit other than px or %, and error is thrown.\n * @private\n * @param {string=} opt_rootMargin An optional rootMargin value,\n *     defaulting to '0px'.\n * @return {Array<Object>} An array of margin objects with the keys\n *     value and unit.\n */\nIntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {\n  var marginString = opt_rootMargin || '0px';\n  var margins = marginString.split(/\\s+/).map(function(margin) {\n    var parts = /^(-?\\d*\\.?\\d+)(px|%)$/.exec(margin);\n    if (!parts) {\n      throw new Error('rootMargin must be specified in pixels or percent');\n    }\n    return {value: parseFloat(parts[1]), unit: parts[2]};\n  });\n\n  // Handles shorthand.\n  margins[1] = margins[1] || margins[0];\n  margins[2] = margins[2] || margins[0];\n  margins[3] = margins[3] || margins[1];\n\n  return margins;\n};\n\n\n/**\n * Starts polling for intersection changes if the polling is not already\n * happening, and if the page's visibility state is visible.\n * @private\n */\nIntersectionObserver.prototype._monitorIntersections = function() {\n  if (!this._monitoringIntersections) {\n    this._monitoringIntersections = true;\n\n    // If a poll interval is set, use polling instead of listening to\n    // resize and scroll events or DOM mutations.\n    if (this.POLL_INTERVAL) {\n      this._monitoringInterval = setInterval(\n          this._checkForIntersections, this.POLL_INTERVAL);\n    }\n    else {\n      addEvent(window, 'resize', this._checkForIntersections, true);\n      addEvent(document, 'scroll', this._checkForIntersections, true);\n\n      if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in window) {\n        this._domObserver = new MutationObserver(this._checkForIntersections);\n        this._domObserver.observe(document, {\n          attributes: true,\n          childList: true,\n          characterData: true,\n          subtree: true\n        });\n      }\n    }\n  }\n};\n\n\n/**\n * Stops polling for intersection changes.\n * @private\n */\nIntersectionObserver.prototype._unmonitorIntersections = function() {\n  if (this._monitoringIntersections) {\n    this._monitoringIntersections = false;\n\n    clearInterval(this._monitoringInterval);\n    this._monitoringInterval = null;\n\n    removeEvent(window, 'resize', this._checkForIntersections, true);\n    removeEvent(document, 'scroll', this._checkForIntersections, true);\n\n    if (this._domObserver) {\n      this._domObserver.disconnect();\n      this._domObserver = null;\n    }\n  }\n};\n\n\n/**\n * Scans each observation target for intersection changes and adds them\n * to the internal entries queue. If new entries are found, it\n * schedules the callback to be invoked.\n * @private\n */\nIntersectionObserver.prototype._checkForIntersections = function() {\n  var rootIsInDom = this._rootIsInDom();\n  var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();\n\n  this._observationTargets.forEach(function(item) {\n    var target = item.element;\n    var targetRect = getBoundingClientRect(target);\n    var rootContainsTarget = this._rootContainsTarget(target);\n    var oldEntry = item.entry;\n    var intersectionRect = rootIsInDom && rootContainsTarget &&\n        this._computeTargetAndRootIntersection(target, rootRect);\n\n    var newEntry = item.entry = new IntersectionObserverEntry({\n      time: now(),\n      target: target,\n      boundingClientRect: targetRect,\n      rootBounds: rootRect,\n      intersectionRect: intersectionRect\n    });\n\n    if (!oldEntry) {\n      this._queuedEntries.push(newEntry);\n    } else if (rootIsInDom && rootContainsTarget) {\n      // If the new entry intersection ratio has crossed any of the\n      // thresholds, add a new entry.\n      if (this._hasCrossedThreshold(oldEntry, newEntry)) {\n        this._queuedEntries.push(newEntry);\n      }\n    } else {\n      // If the root is not in the DOM or target is not contained within\n      // root but the previous entry for this target had an intersection,\n      // add a new record indicating removal.\n      if (oldEntry && oldEntry.isIntersecting) {\n        this._queuedEntries.push(newEntry);\n      }\n    }\n  }, this);\n\n  if (this._queuedEntries.length) {\n    this._callback(this.takeRecords(), this);\n  }\n};\n\n\n/**\n * Accepts a target and root rect computes the intersection between then\n * following the algorithm in the spec.\n * TODO(philipwalton): at this time clip-path is not considered.\n * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo\n * @param {Element} target The target DOM element\n * @param {Object} rootRect The bounding rect of the root after being\n *     expanded by the rootMargin value.\n * @return {?Object} The final intersection rect object or undefined if no\n *     intersection is found.\n * @private\n */\nIntersectionObserver.prototype._computeTargetAndRootIntersection =\n    function(target, rootRect) {\n\n  // If the element isn't displayed, an intersection can't happen.\n  if (window.getComputedStyle(target).display == 'none') return;\n\n  var targetRect = getBoundingClientRect(target);\n  var intersectionRect = targetRect;\n  var parent = getParentNode(target);\n  var atRoot = false;\n\n  while (!atRoot) {\n    var parentRect = null;\n    var parentComputedStyle = parent.nodeType == 1 ?\n        window.getComputedStyle(parent) : {};\n\n    // If the parent isn't displayed, an intersection can't happen.\n    if (parentComputedStyle.display == 'none') return;\n\n    if (parent == this.root || parent == document) {\n      atRoot = true;\n      parentRect = rootRect;\n    } else {\n      // If the element has a non-visible overflow, and it's not the <body>\n      // or <html> element, update the intersection rect.\n      // Note: <body> and <html> cannot be clipped to a rect that's not also\n      // the document rect, so no need to compute a new intersection.\n      if (parent != document.body &&\n          parent != document.documentElement &&\n          parentComputedStyle.overflow != 'visible') {\n        parentRect = getBoundingClientRect(parent);\n      }\n    }\n\n    // If either of the above conditionals set a new parentRect,\n    // calculate new intersection data.\n    if (parentRect) {\n      intersectionRect = computeRectIntersection(parentRect, intersectionRect);\n\n      if (!intersectionRect) break;\n    }\n    parent = getParentNode(parent);\n  }\n  return intersectionRect;\n};\n\n\n/**\n * Returns the root rect after being expanded by the rootMargin value.\n * @return {Object} The expanded root rect.\n * @private\n */\nIntersectionObserver.prototype._getRootRect = function() {\n  var rootRect;\n  if (this.root) {\n    rootRect = getBoundingClientRect(this.root);\n  } else {\n    // Use <html>/<body> instead of window since scroll bars affect size.\n    var html = document.documentElement;\n    var body = document.body;\n    rootRect = {\n      top: 0,\n      left: 0,\n      right: html.clientWidth || body.clientWidth,\n      width: html.clientWidth || body.clientWidth,\n      bottom: html.clientHeight || body.clientHeight,\n      height: html.clientHeight || body.clientHeight\n    };\n  }\n  return this._expandRectByRootMargin(rootRect);\n};\n\n\n/**\n * Accepts a rect and expands it by the rootMargin value.\n * @param {Object} rect The rect object to expand.\n * @return {Object} The expanded rect.\n * @private\n */\nIntersectionObserver.prototype._expandRectByRootMargin = function(rect) {\n  var margins = this._rootMarginValues.map(function(margin, i) {\n    return margin.unit == 'px' ? margin.value :\n        margin.value * (i % 2 ? rect.width : rect.height) / 100;\n  });\n  var newRect = {\n    top: rect.top - margins[0],\n    right: rect.right + margins[1],\n    bottom: rect.bottom + margins[2],\n    left: rect.left - margins[3]\n  };\n  newRect.width = newRect.right - newRect.left;\n  newRect.height = newRect.bottom - newRect.top;\n\n  return newRect;\n};\n\n\n/**\n * Accepts an old and new entry and returns true if at least one of the\n * threshold values has been crossed.\n * @param {?IntersectionObserverEntry} oldEntry The previous entry for a\n *    particular target element or null if no previous entry exists.\n * @param {IntersectionObserverEntry} newEntry The current entry for a\n *    particular target element.\n * @return {boolean} Returns true if a any threshold has been crossed.\n * @private\n */\nIntersectionObserver.prototype._hasCrossedThreshold =\n    function(oldEntry, newEntry) {\n\n  // To make comparing easier, an entry that has a ratio of 0\n  // but does not actually intersect is given a value of -1\n  var oldRatio = oldEntry && oldEntry.isIntersecting ?\n      oldEntry.intersectionRatio || 0 : -1;\n  var newRatio = newEntry.isIntersecting ?\n      newEntry.intersectionRatio || 0 : -1;\n\n  // Ignore unchanged ratios\n  if (oldRatio === newRatio) return;\n\n  for (var i = 0; i < this.thresholds.length; i++) {\n    var threshold = this.thresholds[i];\n\n    // Return true if an entry matches a threshold or if the new ratio\n    // and the old ratio are on the opposite sides of a threshold.\n    if (threshold == oldRatio || threshold == newRatio ||\n        threshold < oldRatio !== threshold < newRatio) {\n      return true;\n    }\n  }\n};\n\n\n/**\n * Returns whether or not the root element is an element and is in the DOM.\n * @return {boolean} True if the root element is an element and is in the DOM.\n * @private\n */\nIntersectionObserver.prototype._rootIsInDom = function() {\n  return !this.root || containsDeep(document, this.root);\n};\n\n\n/**\n * Returns whether or not the target element is a child of root.\n * @param {Element} target The target element to check.\n * @return {boolean} True if the target element is a child of root.\n * @private\n */\nIntersectionObserver.prototype._rootContainsTarget = function(target) {\n  return containsDeep(this.root || document, target);\n};\n\n\n/**\n * Adds the instance to the global IntersectionObserver registry if it isn't\n * already present.\n * @private\n */\nIntersectionObserver.prototype._registerInstance = function() {\n  if (registry.indexOf(this) < 0) {\n    registry.push(this);\n  }\n};\n\n\n/**\n * Removes the instance from the global IntersectionObserver registry.\n * @private\n */\nIntersectionObserver.prototype._unregisterInstance = function() {\n  var index = registry.indexOf(this);\n  if (index != -1) registry.splice(index, 1);\n};\n\n\n/**\n * Returns the result of the performance.now() method or null in browsers\n * that don't support the API.\n * @return {number} The elapsed time since the page was requested.\n */\nfunction now() {\n  return window.performance && performance.now && performance.now();\n}\n\n\n/**\n * Throttles a function and delays its execution, so it's only called at most\n * once within a given time period.\n * @param {Function} fn The function to throttle.\n * @param {number} timeout The amount of time that must pass before the\n *     function can be called again.\n * @return {Function} The throttled function.\n */\nfunction throttle(fn, timeout) {\n  var timer = null;\n  return function () {\n    if (!timer) {\n      timer = setTimeout(function() {\n        fn();\n        timer = null;\n      }, timeout);\n    }\n  };\n}\n\n\n/**\n * Adds an event handler to a DOM node ensuring cross-browser compatibility.\n * @param {Node} node The DOM node to add the event handler to.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to add.\n * @param {boolean} opt_useCapture Optionally adds the even to the capture\n *     phase. Note: this only works in modern browsers.\n */\nfunction addEvent(node, event, fn, opt_useCapture) {\n  if (typeof node.addEventListener == 'function') {\n    node.addEventListener(event, fn, opt_useCapture || false);\n  }\n  else if (typeof node.attachEvent == 'function') {\n    node.attachEvent('on' + event, fn);\n  }\n}\n\n\n/**\n * Removes a previously added event handler from a DOM node.\n * @param {Node} node The DOM node to remove the event handler from.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to remove.\n * @param {boolean} opt_useCapture If the event handler was added with this\n *     flag set to true, it should be set to true here in order to remove it.\n */\nfunction removeEvent(node, event, fn, opt_useCapture) {\n  if (typeof node.removeEventListener == 'function') {\n    node.removeEventListener(event, fn, opt_useCapture || false);\n  }\n  else if (typeof node.detatchEvent == 'function') {\n    node.detatchEvent('on' + event, fn);\n  }\n}\n\n\n/**\n * Returns the intersection between two rect objects.\n * @param {Object} rect1 The first rect.\n * @param {Object} rect2 The second rect.\n * @return {?Object} The intersection rect or undefined if no intersection\n *     is found.\n */\nfunction computeRectIntersection(rect1, rect2) {\n  var top = Math.max(rect1.top, rect2.top);\n  var bottom = Math.min(rect1.bottom, rect2.bottom);\n  var left = Math.max(rect1.left, rect2.left);\n  var right = Math.min(rect1.right, rect2.right);\n  var width = right - left;\n  var height = bottom - top;\n\n  return (width >= 0 && height >= 0) && {\n    top: top,\n    bottom: bottom,\n    left: left,\n    right: right,\n    width: width,\n    height: height\n  };\n}\n\n\n/**\n * Shims the native getBoundingClientRect for compatibility with older IE.\n * @param {Element} el The element whose bounding rect to get.\n * @return {Object} The (possibly shimmed) rect of the element.\n */\nfunction getBoundingClientRect(el) {\n  var rect;\n\n  try {\n    rect = el.getBoundingClientRect();\n  } catch (err) {\n    // Ignore Windows 7 IE11 \"Unspecified error\"\n    // https://github.com/w3c/IntersectionObserver/pull/205\n  }\n\n  if (!rect) return getEmptyRect();\n\n  // Older IE\n  if (!(rect.width && rect.height)) {\n    rect = {\n      top: rect.top,\n      right: rect.right,\n      bottom: rect.bottom,\n      left: rect.left,\n      width: rect.right - rect.left,\n      height: rect.bottom - rect.top\n    };\n  }\n  return rect;\n}\n\n\n/**\n * Returns an empty rect object. An empty rect is returned when an element\n * is not in the DOM.\n * @return {Object} The empty rect.\n */\nfunction getEmptyRect() {\n  return {\n    top: 0,\n    bottom: 0,\n    left: 0,\n    right: 0,\n    width: 0,\n    height: 0\n  };\n}\n\n/**\n * Checks to see if a parent element contains a child element (including inside\n * shadow DOM).\n * @param {Node} parent The parent element.\n * @param {Node} child The child element.\n * @return {boolean} True if the parent node contains the child node.\n */\nfunction containsDeep(parent, child) {\n  var node = child;\n  while (node) {\n    if (node == parent) return true;\n\n    node = getParentNode(node);\n  }\n  return false;\n}\n\n\n/**\n * Gets the parent node of an element or its host element if the parent node\n * is a shadow root.\n * @param {Node} node The node whose parent to get.\n * @return {Node|null} The parent node or null if no parent exists.\n */\nfunction getParentNode(node) {\n  var parent = node.parentNode;\n\n  if (parent && parent.nodeType == 11 && parent.host) {\n    // If the parent is a shadow root, return the host element.\n    return parent.host;\n  }\n  return parent;\n}\n\n\n// Exposes the constructors globally.\nwindow.IntersectionObserver = IntersectionObserver;\nwindow.IntersectionObserverEntry = IntersectionObserverEntry;\n\n}(window, document));\n","function _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n  var i = toPrimitive(t, \"string\");\n  return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n  if (\"object\" != _typeof(t) || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != _typeof(i)) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n    value: t,\n    enumerable: !0,\n    configurable: !0,\n    writable: !0\n  }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n    nativeCreate = getNative(Object, 'create');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  getMapData(this, key).set(key, value);\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result);\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 8-9 which returns 'object' for typed array and other constructors.\n  var tag = isObject(value) ? objectToString.call(value) : '';\n  return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = memoize;\n","function _extends() {\n  return _extends = Object.assign ? Object.assign.bind() : function (n) {\n    for (var e = 1; e < arguments.length; e++) {\n      var t = arguments[e];\n      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n    }\n    return n;\n  }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","/**\n * Virtual DOM Node\n * @typedef VNode\n * @property {string | function} nodeName The string of the DOM node to create or Component constructor to render\n * @property {Array<VNode | string>} children The children of node\n * @property {string | number | undefined} key The key used to identify this VNode in a list\n * @property {object} attributes The properties of this VNode\n */\nexport const VNode = function VNode() {};\n","/**\n * @typedef {import('./component').Component} Component\n * @typedef {import('./vnode').VNode} VNode\n */\n\n/**\n * Global options\n * @public\n * @typedef Options\n * @property {boolean} [syncComponentUpdates] If `true`, `prop` changes trigger synchronous component updates. Defaults to true.\n * @property {(vnode: VNode) => void} [vnode] Processes all created VNodes.\n * @property {(component: Component) => void} [afterMount] Hook invoked after a component is mounted.\n * @property {(component: Component) => void} [afterUpdate] Hook invoked after the DOM is updated with a component's latest render.\n * @property {(component: Component) => void} [beforeUnmount] Hook invoked immediately before a component is unmounted.\n * @property {(rerender: function) => void} [debounceRendering] Hook invoked whenever a rerender is requested. Can be used to debounce rerenders.\n * @property {(event: Event) => Event | void} [event] Hook invoked before any Preact event listeners. The return value (if any) replaces the native browser event given to event listeners\n */\n\n/** @type {Options}  */\nconst options = {};\n\nexport default options;\n","import { VNode } from './vnode';\nimport options from './options';\n\n\nconst stack = [];\n\nconst EMPTY_CHILDREN = [];\n\n/**\n * JSX/hyperscript reviver.\n * @see http://jasonformat.com/wtf-is-jsx\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\n *\n * Note: this is exported as both `h()` and `createElement()` for compatibility\n * reasons.\n *\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a\n * lightweight representation of the structure of a DOM tree. This structure can\n * be realized by recursively comparing it against the current _actual_ DOM\n * structure, and applying only the differences.\n *\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\n * and optionally children to append to the element.\n *\n * @example The following DOM tree\n *\n * `<div id=\"foo\" name=\"bar\">Hello!</div>`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string | function} nodeName An element name. Ex: `div`, `a`, `span`, etc.\n * @param {object | null} attributes Any attributes/props to set on the created element.\n * @param {VNode[]} [rest] Additional arguments are taken to be children to\n *  append. Can be infinitely nested Arrays.\n *\n * @public\n */\nexport function h(nodeName, attributes) {\n\tlet children=EMPTY_CHILDREN, lastSimple, child, simple, i;\n\tfor (i=arguments.length; i-- > 2; ) {\n\t\tstack.push(arguments[i]);\n\t}\n\tif (attributes && attributes.children!=null) {\n\t\tif (!stack.length) stack.push(attributes.children);\n\t\tdelete attributes.children;\n\t}\n\twhile (stack.length) {\n\t\tif ((child = stack.pop()) && child.pop!==undefined) {\n\t\t\tfor (i=child.length; i--; ) stack.push(child[i]);\n\t\t}\n\t\telse {\n\t\t\tif (typeof child==='boolean') child = null;\n\n\t\t\tif ((simple = typeof nodeName!=='function')) {\n\t\t\t\tif (child==null) child = '';\n\t\t\t\telse if (typeof child==='number') child = String(child);\n\t\t\t\telse if (typeof child!=='string') simple = false;\n\t\t\t}\n\n\t\t\tif (simple && lastSimple) {\n\t\t\t\tchildren[children.length-1] += child;\n\t\t\t}\n\t\t\telse if (children===EMPTY_CHILDREN) {\n\t\t\t\tchildren = [child];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchildren.push(child);\n\t\t\t}\n\n\t\t\tlastSimple = simple;\n\t\t}\n\t}\n\n\tlet p = new VNode();\n\tp.nodeName = nodeName;\n\tp.children = children;\n\tp.attributes = attributes==null ? undefined : attributes;\n\tp.key = attributes==null ? undefined : attributes.key;\n\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\n\tif (options.vnode!==undefined) options.vnode(p);\n\n\treturn p;\n}\n","/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {object} props Object from which to copy properties.\n * @returns {object}\n * @private\n */\nexport function extend(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn 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\tif (ref) {\n\t\tif (typeof ref=='function') ref(value);\n\t\telse ref.current = value;\n\t}\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 = typeof Promise=='function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n","import { extend } from './util';\nimport { h } from './h';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its\n * children.\n * @param {import('./vnode').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array<import('./vnode').VNode>} [rest] Any additional arguments will be used as replacement\n *  children.\n */\nexport function cloneElement(vnode, props) {\n\treturn h(\n\t\tvnode.nodeName,\n\t\textend(extend({}, vnode.attributes), props),\n\t\targuments.length>2 ? [].slice.call(arguments, 2) : vnode.children\n\t);\n}\n","// render modes\n\n/** Do not re-render a component */\nexport const NO_RENDER = 0;\n/** Synchronously re-render a component and its children */\nexport const SYNC_RENDER = 1;\n/** Synchronously re-render a component, even if its lifecycle methods attempt to prevent it. */\nexport const FORCE_RENDER = 2;\n/** Queue asynchronous re-render of a component and it's children */\nexport const ASYNC_RENDER = 3;\n\n\nexport const ATTR_KEY = '__preactattr_';\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\n","import options from './options';\nimport { defer } from './util';\nimport { renderComponent } from './vdom/component';\n\n/**\n * Managed queue of dirty components to be re-rendered\n * @type {Array<import('./component').Component>}\n */\nlet items = [];\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./component').Component} component The component to rerender\n */\nexport function enqueueRender(component) {\n\tif (!component._dirty && (component._dirty = true) && items.push(component)==1) {\n\t\t(options.debounceRendering || defer)(rerender);\n\t}\n}\n\n/** Rerender all enqueued dirty components */\nexport function rerender() {\n\tlet p;\n\twhile ( (p = items.pop()) ) {\n\t\tif (p._dirty) renderComponent(p);\n\t}\n}\n","import { extend } from '../util';\n\n\n/**\n * Check if two nodes are equivalent.\n * @param {import('../dom').PreactElement} node DOM Node to compare\n * @param {import('../vnode').VNode} vnode Virtual DOM node to compare\n * @param {boolean} [hydrating=false] If true, ignores component constructors\n *  when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n\tif (typeof vnode==='string' || typeof vnode==='number') {\n\t\treturn node.splitText!==undefined;\n\t}\n\tif (typeof vnode.nodeName==='string') {\n\t\treturn !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n\t}\n\treturn hydrating || node._componentConstructor===vnode.nodeName;\n}\n\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n * @param {import('../dom').PreactElement} 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\treturn node.normalizedNodeName===nodeName || 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 * @param {import('../vnode').VNode} vnode The VNode to get props for\n * @returns {object} The props to use for this VNode\n */\nexport function getNodeProps(vnode) {\n\tlet props = extend({}, vnode.attributes);\n\tprops.children = vnode.children;\n\n\tlet defaultProps = vnode.nodeName.defaultProps;\n\tif (defaultProps!==undefined) {\n\t\tfor (let i in defaultProps) {\n\t\t\tif (props[i]===undefined) {\n\t\t\t\tprops[i] = defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn props;\n}\n","import { IS_NON_DIMENSIONAL } from '../constants';\nimport { applyRef } from '../util';\nimport options from '../options';\n\n/**\n * A DOM event listener\n * @typedef {(e: Event) => void} EventListner\n */\n\n/**\n * A mapping of event types to event listeners\n * @typedef {Object.<string, EventListener>} EventListenerMap\n */\n\n/**\n * Properties Preact adds to elements it creates\n * @typedef PreactElementExtensions\n * @property {string} [normalizedNodeName] A normalized node name to use in diffing\n * @property {EventListenerMap} [_listeners] A map of event listeners added by components to this DOM node\n * @property {import('../component').Component} [_component] The component that rendered this DOM node\n * @property {function} [_componentConstructor] The constructor of the component that rendered this DOM node\n */\n\n/**\n * A DOM element that has been extended with Preact properties\n * @typedef {Element & ElementCSSInlineStyle & PreactElementExtensions} PreactElement\n */\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 {PreactElement} The created DOM node\n */\nexport function createNode(nodeName, isSvg) {\n\t/** @type {PreactElement} */\n\tlet node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName);\n\tnode.normalizedNodeName = nodeName;\n\treturn node;\n}\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\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\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 {PreactElement} 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) {\n\tif (name==='className') name = 'class';\n\n\n\tif (name==='key') {\n\t\t// ignore\n\t}\n\telse if (name==='ref') {\n\t\tapplyRef(old, null);\n\t\tapplyRef(value, node);\n\t}\n\telse if (name==='class' && !isSvg) {\n\t\tnode.className = value || '';\n\t}\n\telse if (name==='style') {\n\t\tif (!value || typeof value==='string' || typeof old==='string') {\n\t\t\tnode.style.cssText = value || '';\n\t\t}\n\t\tif (value && typeof value==='object') {\n\t\t\tif (typeof old!=='string') {\n\t\t\t\tfor (let i in old) if (!(i in value)) node.style[i] = '';\n\t\t\t}\n\t\t\tfor (let i in value) {\n\t\t\t\tnode.style[i] = typeof value[i]==='number' && IS_NON_DIMENSIONAL.test(i)===false ? (value[i]+'px') : value[i];\n\t\t\t}\n\t\t}\n\t}\n\telse if (name==='dangerouslySetInnerHTML') {\n\t\tif (value) node.innerHTML = value.__html || '';\n\t}\n\telse if (name[0]=='o' && name[1]=='n') {\n\t\tlet useCapture = name !== (name=name.replace(/Capture$/, ''));\n\t\tname = name.toLowerCase().substring(2);\n\t\tif (value) {\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\n\t\t}\n\t\telse {\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\n\t\t}\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\n\t}\n\telse if (name!=='list' && name!=='type' && !isSvg && name in node) {\n\t\t// Attempt to set a DOM property to the given value.\n\t\t// IE & FF throw for certain property-value combinations.\n\t\ttry {\n\t\t\tnode[name] = value==null ? '' : value;\n\t\t} catch (e) { }\n\t\tif ((value==null || value===false) && name!='spellcheck') node.removeAttribute(name);\n\t}\n\telse {\n\t\tlet ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));\n\t\t// spellcheck is treated differently than all other boolean values and\n\t\t// should not be removed when the value is `false`. See:\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n\t\tif (value==null || value===false) {\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());\n\t\t\telse node.removeAttribute(name);\n\t\t}\n\t\telse if (typeof value!=='function') {\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\n\t\t\telse node.setAttribute(name, value);\n\t\t}\n\t}\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\treturn this._listeners[e.type](options.event && options.event(e) || e);\n}\n","import { ATTR_KEY } from '../constants';\nimport { isSameNodeType, isNamedNode } from './index';\nimport { buildComponentFromVNode } from './component';\nimport { createNode, setAccessor } from '../dom/index';\nimport { unmountComponent } from './component';\nimport options from '../options';\nimport { applyRef } from '../util';\nimport { removeNode } from '../dom/index';\n\n/**\n * Queue of components that have been mounted and are awaiting componentDidMount\n * @type {Array<import('../component').Component>}\n */\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/** Invoke queued componentDidMount lifecycle methods */\nexport function flushMounts() {\n\tlet c;\n\twhile ((c = mounts.shift())) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}\n\n\n/**\n * Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n * @param {import('../dom').PreactElement} dom A DOM node to mutate into the shape of a `vnode`\n * @param {import('../vnode').VNode} vnode A VNode (with descendants forming a tree) representing\n *  the desired DOM structure\n * @param {object} context The current context\n * @param {boolean} mountAll Whether or not to immediately mount all components\n * @param {Element} parent ?\n * @param {boolean} componentRoot ?\n * @returns {import('../dom').PreactElement} The created/mutated element\n * @private\n */\nexport function diff(dom, vnode, context, mountAll, parent, componentRoot) {\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n\tif (!diffLevel++) {\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\n\t\tisSvgMode = parent!=null && parent.ownerSVGElement!==undefined;\n\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\n\t\thydrating = dom!=null && !(ATTR_KEY in dom);\n\t}\n\n\tlet ret = idiff(dom, vnode, context, mountAll, componentRoot);\n\n\t// append the element if its a new parent\n\tif (parent && ret.parentNode!==parent) parent.appendChild(ret);\n\n\t// diffLevel being reduced to 0 means we're exiting the diff\n\tif (!--diffLevel) {\n\t\thydrating = false;\n\t\t// invoke queued componentDidMount lifecycle methods\n\t\tif (!componentRoot) flushMounts();\n\t}\n\n\treturn ret;\n}\n\n\n/**\n * Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing.\n * @param {import('../dom').PreactElement} dom A DOM node to mutate into the shape of a `vnode`\n * @param {import('../vnode').VNode} vnode A VNode (with descendants forming a tree) representing the desired DOM structure\n * @param {object} context The current context\n * @param {boolean} mountAll Whether or not to immediately mount all components\n * @param {boolean} [componentRoot] ?\n * @private\n */\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\n\tlet out = dom,\n\t\tprevSvgMode = isSvgMode;\n\n\t// empty values (null, undefined, booleans) render as empty Text nodes\n\tif (vnode==null || typeof vnode==='boolean') vnode = '';\n\n\n\t// Fast case: Strings & Numbers create/update Text nodes.\n\tif (typeof vnode==='string' || typeof vnode==='number') {\n\n\t\t// update if it's already a Text node:\n\t\tif (dom && dom.splitText!==undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n\t\t\tif (dom.nodeValue!=vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout[ATTR_KEY] = true;\n\n\t\treturn out;\n\t}\n\n\n\t// If the VNode represents a Component, perform a component diff:\n\tlet vnodeName = vnode.nodeName;\n\tif (typeof vnodeName==='function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvgMode = vnodeName==='svg' ? true : vnodeName==='foreignObject' ? false : isSvgMode;\n\n\n\t// If there's no existing element or it's the wrong type, create a new one:\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\t// move children into the replacement node\n\t\t\twhile (dom.firstChild) out.appendChild(dom.firstChild);\n\n\t\t\t// if the previous Element was mounted into the DOM, replace it inline\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t// recycle the old element (skips non-Element node types)\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\n\tlet fc = out.firstChild,\n\t\tprops = out[ATTR_KEY],\n\t\tvchildren = vnode.children;\n\n\tif (props==null) {\n\t\tprops = out[ATTR_KEY] = {};\n\t\tfor (let a=out.attributes, i=a.length; i--; ) props[a[i].name] = a[i].value;\n\t}\n\n\t// Optimization: fast-path for elements containing a single TextNode:\n\tif (!hydrating && vchildren && vchildren.length===1 && typeof vchildren[0]==='string' && fc!=null && fc.splitText!==undefined && fc.nextSibling==null) {\n\t\tif (fc.nodeValue!=vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t}\n\t// otherwise, if there are existing or new children, diff them:\n\telse if (vchildren && vchildren.length || fc!=null) {\n\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML!=null);\n\t}\n\n\n\t// Apply attributes/props from VNode to the DOM Element:\n\tdiffAttributes(out, vnode.attributes, props);\n\n\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}\n\n\n/**\n * Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n * @param {import('../dom').PreactElement} dom Element whose children should be compared & mutated\n * @param {Array<import('../vnode').VNode>} vchildren Array of VNodes to compare to `dom.childNodes`\n * @param {object} context Implicitly descendant context object (from most\n *  recent `getChildContext()`)\n * @param {boolean} mountAll Whether or not to immediately mount all components\n * @param {boolean} isHydrating if `true`, consumes externally created elements\n *  similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\n\tlet originalChildren = dom.childNodes,\n\t\tchildren = [],\n\t\tkeyed = {},\n\t\tkeyedLen = 0,\n\t\tmin = 0,\n\t\tlen = originalChildren.length,\n\t\tchildrenLen = 0,\n\t\tvlen = vchildren ? vchildren.length : 0,\n\t\tj, c, f, vchild, child;\n\n\t// Build up a map of keyed children and an Array of unkeyed children:\n\tif (len!==0) {\n\t\tfor (let i=0; i<len; i++) {\n\t\t\tlet child = originalChildren[i],\n\t\t\t\tprops = child[ATTR_KEY],\n\t\t\t\tkey = vlen && props ? child._component ? child._component.__key : props.key : null;\n\t\t\tif (key!=null) {\n\t\t\t\tkeyedLen++;\n\t\t\t\tkeyed[key] = child;\n\t\t\t}\n\t\t\telse if (props || (child.splitText!==undefined ? (isHydrating ? child.nodeValue.trim() : true) : isHydrating)) {\n\t\t\t\tchildren[childrenLen++] = child;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (vlen!==0) {\n\t\tfor (let i=0; i<vlen; i++) {\n\t\t\tvchild = vchildren[i];\n\t\t\tchild = null;\n\n\t\t\t// attempt to find a node based on key matching\n\t\t\tlet key = vchild.key;\n\t\t\tif (key!=null) {\n\t\t\t\tif (keyedLen && keyed[key]!==undefined) {\n\t\t\t\t\tchild = keyed[key];\n\t\t\t\t\tkeyed[key] = undefined;\n\t\t\t\t\tkeyedLen--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// attempt to pluck a node of the same type from the existing children\n\t\t\telse if (min<childrenLen) {\n\t\t\t\tfor (j=min; j<childrenLen; j++) {\n\t\t\t\t\tif (children[j]!==undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n\t\t\t\t\t\tchild = c;\n\t\t\t\t\t\tchildren[j] = undefined;\n\t\t\t\t\t\tif (j===childrenLen-1) childrenLen--;\n\t\t\t\t\t\tif (j===min) min++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// morph the matched/found/created DOM child to match vchild (deep)\n\t\t\tchild = idiff(child, vchild, context, mountAll);\n\n\t\t\tf = originalChildren[i];\n\t\t\tif (child && child!==dom && child!==f) {\n\t\t\t\tif (f==null) {\n\t\t\t\t\tdom.appendChild(child);\n\t\t\t\t}\n\t\t\t\telse if (child===f.nextSibling) {\n\t\t\t\t\tremoveNode(f);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdom.insertBefore(child, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\t// remove unused keyed children:\n\tif (keyedLen) {\n\t\tfor (let i in keyed) if (keyed[i]!==undefined) recollectNodeTree(keyed[i], false);\n\t}\n\n\t// remove orphaned unkeyed children:\n\twhile (min<=childrenLen) {\n\t\tif ((child = children[childrenLen--])!==undefined) recollectNodeTree(child, false);\n\t}\n}\n\n\n\n/**\n * Recursively recycle (or just unmount) a node and its descendants.\n * @param {import('../dom').PreactElement} node DOM node to start\n *  unmount/removal from\n * @param {boolean} [unmountOnly=false] If `true`, only triggers unmount\n *  lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n\tlet component = node._component;\n\tif (component) {\n\t\t// if node is owned by a Component, unmount that component (ends up recursing back here)\n\t\tunmountComponent(component);\n\t}\n\telse {\n\t\t// If the node's VNode had a ref function, invoke it with null here.\n\t\t// (this is part of the React spec, and smart for unsetting references)\n\t\tif (node[ATTR_KEY]!=null) applyRef(node[ATTR_KEY].ref, null);\n\n\t\tif (unmountOnly===false || node[ATTR_KEY]==null) {\n\t\t\tremoveNode(node);\n\t\t}\n\n\t\tremoveChildren(node);\n\t}\n}\n\n\n/**\n * Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n\tnode = node.lastChild;\n\twhile (node) {\n\t\tlet next = node.previousSibling;\n\t\trecollectNodeTree(node, true);\n\t\tnode = next;\n\t}\n}\n\n\n/**\n * Apply differences in attributes from a VNode to the given DOM Element.\n * @param {import('../dom').PreactElement} 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\n *  element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old) {\n\tlet name;\n\n\t// remove attributes no longer present on the vnode by setting them to undefined\n\tfor (name in old) {\n\t\tif (!(attrs && attrs[name]!=null) && old[name]!=null) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n\t\t}\n\t}\n\n\t// add new & update changed attributes\n\tfor (name in attrs) {\n\t\tif (name!=='children' && name!=='innerHTML' && (!(name in old) || attrs[name]!==(name==='value' || name==='checked' ? dom[name] : old[name]))) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n\t\t}\n\t}\n}\n","import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';\nimport options from '../options';\nimport { extend, applyRef } from '../util';\nimport { enqueueRender } from '../render-queue';\nimport { getNodeProps } from './index';\nimport { diff, mounts, diffLevel, flushMounts, recollectNodeTree, removeChildren } from './diff';\nimport { createComponent, recyclerComponents } from './component-recycler';\nimport { removeNode } from '../dom/index';\n\n/**\n * Set a component's `props` and possibly re-render the component\n * @param {import('../component').Component} component The Component to set props on\n * @param {object} props The new props\n * @param {number} renderMode Render options - specifies how to re-render the component\n * @param {object} context The new context\n * @param {boolean} mountAll Whether or not to immediately mount all components\n */\nexport function setComponentProps(component, props, renderMode, context, mountAll) {\n\tif (component._disable) return;\n\tcomponent._disable = true;\n\n\tcomponent.__ref = props.ref;\n\tcomponent.__key = props.key;\n\tdelete props.ref;\n\tdelete props.key;\n\n\tif (typeof component.constructor.getDerivedStateFromProps === 'undefined') {\n\t\tif (!component.base || mountAll) {\n\t\t\tif (component.componentWillMount) component.componentWillMount();\n\t\t}\n\t\telse if (component.componentWillReceiveProps) {\n\t\t\tcomponent.componentWillReceiveProps(props, context);\n\t\t}\n\t}\n\n\tif (context && context!==component.context) {\n\t\tif (!component.prevContext) component.prevContext = component.context;\n\t\tcomponent.context = context;\n\t}\n\n\tif (!component.prevProps) component.prevProps = component.props;\n\tcomponent.props = props;\n\n\tcomponent._disable = false;\n\n\tif (renderMode!==NO_RENDER) {\n\t\tif (renderMode===SYNC_RENDER || options.syncComponentUpdates!==false || !component.base) {\n\t\t\trenderComponent(component, SYNC_RENDER, mountAll);\n\t\t}\n\t\telse {\n\t\t\tenqueueRender(component);\n\t\t}\n\t}\n\n\tapplyRef(component.__ref, component);\n}\n\n\n\n/**\n * Render a Component, triggering necessary lifecycle events and taking\n * High-Order Components into account.\n * @param {import('../component').Component} component The component to render\n * @param {number} [renderMode] render mode, see constants.js for available options.\n * @param {boolean} [mountAll] Whether or not to immediately mount all components\n * @param {boolean} [isChild] ?\n * @private\n */\nexport function renderComponent(component, renderMode, mountAll, isChild) {\n\tif (component._disable) return;\n\n\tlet props = component.props,\n\t\tstate = component.state,\n\t\tcontext = component.context,\n\t\tpreviousProps = component.prevProps || props,\n\t\tpreviousState = component.prevState || state,\n\t\tpreviousContext = component.prevContext || context,\n\t\tisUpdate = component.base,\n\t\tnextBase = component.nextBase,\n\t\tinitialBase = isUpdate || nextBase,\n\t\tinitialChildComponent = component._component,\n\t\tskip = false,\n\t\tsnapshot = previousContext,\n\t\trendered, inst, cbase;\n\n\tif (component.constructor.getDerivedStateFromProps) {\n\t\tstate = extend(extend({}, state), component.constructor.getDerivedStateFromProps(props, state));\n\t\tcomponent.state = state;\n\t}\n\n\t// if updating\n\tif (isUpdate) {\n\t\tcomponent.props = previousProps;\n\t\tcomponent.state = previousState;\n\t\tcomponent.context = previousContext;\n\t\tif (renderMode!==FORCE_RENDER\n\t\t\t&& component.shouldComponentUpdate\n\t\t\t&& component.shouldComponentUpdate(props, state, context) === false) {\n\t\t\tskip = true;\n\t\t}\n\t\telse if (component.componentWillUpdate) {\n\t\t\tcomponent.componentWillUpdate(props, state, context);\n\t\t}\n\t\tcomponent.props = props;\n\t\tcomponent.state = state;\n\t\tcomponent.context = context;\n\t}\n\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\n\tcomponent._dirty = false;\n\n\tif (!skip) {\n\t\trendered = component.render(props, state, context);\n\n\t\t// context to pass to the child, can be updated via (grand-)parent component\n\t\tif (component.getChildContext) {\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\n\t\t}\n\n\t\tif (isUpdate && component.getSnapshotBeforeUpdate) {\n\t\t\tsnapshot = component.getSnapshotBeforeUpdate(previousProps, previousState);\n\t\t}\n\n\t\tlet childComponent = rendered && rendered.nodeName,\n\t\t\ttoUnmount, base;\n\n\t\tif (typeof childComponent==='function') {\n\t\t\t// set up high order component link\n\n\t\t\tlet childProps = getNodeProps(rendered);\n\t\t\tinst = initialChildComponent;\n\n\t\t\tif (inst && inst.constructor===childComponent && childProps.key==inst.__key) {\n\t\t\t\tsetComponentProps(inst, childProps, SYNC_RENDER, context, false);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttoUnmount = inst;\n\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\n\t\t\t\tinst._parentComponent = component;\n\t\t\t\tsetComponentProps(inst, childProps, NO_RENDER, context, false);\n\t\t\t\trenderComponent(inst, SYNC_RENDER, mountAll, true);\n\t\t\t}\n\n\t\t\tbase = inst.base;\n\t\t}\n\t\telse {\n\t\t\tcbase = initialBase;\n\n\t\t\t// destroy high order component link\n\t\t\ttoUnmount = initialChildComponent;\n\t\t\tif (toUnmount) {\n\t\t\t\tcbase = component._component = null;\n\t\t\t}\n\n\t\t\tif (initialBase || renderMode===SYNC_RENDER) {\n\t\t\t\tif (cbase) cbase._component = null;\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\n\t\t\t}\n\t\t}\n\n\t\tif (initialBase && base!==initialBase && inst!==initialChildComponent) {\n\t\t\tlet baseParent = initialBase.parentNode;\n\t\t\tif (baseParent && base!==baseParent) {\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\n\n\t\t\t\tif (!toUnmount) {\n\t\t\t\t\tinitialBase._component = null;\n\t\t\t\t\trecollectNodeTree(initialBase, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (toUnmount) {\n\t\t\tunmountComponent(toUnmount);\n\t\t}\n\n\t\tcomponent.base = base;\n\t\tif (base && !isChild) {\n\t\t\tlet componentRef = component,\n\t\t\t\tt = component;\n\t\t\twhile ((t=t._parentComponent)) {\n\t\t\t\t(componentRef = t).base = base;\n\t\t\t}\n\t\t\tbase._component = componentRef;\n\t\t\tbase._componentConstructor = componentRef.constructor;\n\t\t}\n\t}\n\n\tif (!isUpdate || mountAll) {\n\t\tmounts.push(component);\n\t}\n\telse if (!skip) {\n\t\t// Ensure that pending componentDidMount() hooks of child components\n\t\t// are called before the componentDidUpdate() hook in the parent.\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\n\t\t// flushMounts();\n\n\t\tif (component.componentDidUpdate) {\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, snapshot);\n\t\t}\n\t\tif (options.afterUpdate) options.afterUpdate(component);\n\t}\n\n\twhile (component._renderCallbacks.length) component._renderCallbacks.pop().call(component);\n\n\tif (!diffLevel && !isChild) flushMounts();\n}\n\n\n\n/**\n * Apply the Component referenced by a VNode to the DOM.\n * @param {import('../dom').PreactElement} dom The DOM node to mutate\n * @param {import('../vnode').VNode} vnode A Component-referencing VNode\n * @param {object} context The current context\n * @param {boolean} mountAll Whether or not to immediately mount all components\n * @returns {import('../dom').PreactElement} The created/mutated element\n * @private\n */\nexport function buildComponentFromVNode(dom, vnode, context, mountAll) {\n\tlet c = dom && dom._component,\n\t\toriginalComponent = c,\n\t\toldDom = dom,\n\t\tisDirectOwner = c && dom._componentConstructor===vnode.nodeName,\n\t\tisOwner = isDirectOwner,\n\t\tprops = getNodeProps(vnode);\n\twhile (c && !isOwner && (c=c._parentComponent)) {\n\t\tisOwner = c.constructor===vnode.nodeName;\n\t}\n\n\tif (c && isOwner && (!mountAll || c._component)) {\n\t\tsetComponentProps(c, props, ASYNC_RENDER, context, mountAll);\n\t\tdom = c.base;\n\t}\n\telse {\n\t\tif (originalComponent && !isDirectOwner) {\n\t\t\tunmountComponent(originalComponent);\n\t\t\tdom = oldDom = null;\n\t\t}\n\n\t\tc = createComponent(vnode.nodeName, props, context);\n\t\tif (dom && !c.nextBase) {\n\t\t\tc.nextBase = dom;\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\n\t\t\toldDom = null;\n\t\t}\n\t\tsetComponentProps(c, props, SYNC_RENDER, context, mountAll);\n\t\tdom = c.base;\n\n\t\tif (oldDom && dom!==oldDom) {\n\t\t\toldDom._component = null;\n\t\t\trecollectNodeTree(oldDom, false);\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n\n\n/**\n * Remove a component from the DOM and recycle it.\n * @param {import('../component').Component} component The Component instance to unmount\n * @private\n */\nexport function unmountComponent(component) {\n\tif (options.beforeUnmount) options.beforeUnmount(component);\n\n\tlet base = component.base;\n\n\tcomponent._disable = true;\n\n\tif (component.componentWillUnmount) component.componentWillUnmount();\n\n\tcomponent.base = null;\n\n\t// recursively tear down & recollect high-order component children:\n\tlet inner = component._component;\n\tif (inner) {\n\t\tunmountComponent(inner);\n\t}\n\telse if (base) {\n\t\tif (base[ATTR_KEY]!=null) applyRef(base[ATTR_KEY].ref, null);\n\n\t\tcomponent.nextBase = base;\n\n\t\tremoveNode(base);\n\t\trecyclerComponents.push(component);\n\n\t\tremoveChildren(base);\n\t}\n\n\tapplyRef(component.__ref, null);\n}\n","import { Component } from '../component';\n\n/**\n * Retains a pool of Components for re-use.\n * @type {Component[]}\n * @private\n */\nexport const recyclerComponents = [];\n\n\n/**\n * Create a component. Normalizes differences between PFC's and classful\n * Components.\n * @param {function} Ctor The constructor of the component to create\n * @param {object} props The initial props of the component\n * @param {object} context The initial context of the component\n * @returns {import('../component').Component}\n */\nexport function createComponent(Ctor, props, context) {\n\tlet inst, i = recyclerComponents.length;\n\n\tif (Ctor.prototype && Ctor.prototype.render) {\n\t\tinst = new Ctor(props, context);\n\t\tComponent.call(inst, props, context);\n\t}\n\telse {\n\t\tinst = new Component(props, context);\n\t\tinst.constructor = Ctor;\n\t\tinst.render = doRender;\n\t}\n\n\n\twhile (i--) {\n\t\tif (recyclerComponents[i].constructor===Ctor) {\n\t\t\tinst.nextBase = recyclerComponents[i].nextBase;\n\t\t\trecyclerComponents.splice(i, 1);\n\t\t\treturn inst;\n\t\t}\n\t}\n\n\treturn inst;\n}\n\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n","import { FORCE_RENDER } from './constants';\nimport { extend } from './util';\nimport { renderComponent } from './vdom/component';\nimport { enqueueRender } from './render-queue';\n/**\n * Base Component class.\n * Provides `setState()` and `forceUpdate()`, which trigger rendering.\n * @typedef {object} Component\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components' getChildContext\n * @public\n *\n * @example\n * class MyFoo extends Component {\n *   render(props, state) {\n *     return <div />;\n *   }\n * }\n */\nexport function Component(props, context) {\n\tthis._dirty = true;\n\n\t/**\n\t * @public\n\t * @type {object}\n\t */\n\tthis.context = context;\n\n\t/**\n\t * @public\n\t * @type {object}\n\t */\n\tthis.props = props;\n\n\t/**\n\t * @public\n\t * @type {object}\n\t */\n\tthis.state = this.state || {};\n\n\tthis._renderCallbacks = [];\n}\n\n\nextend(Component.prototype, {\n\n\t/**\n\t * Update component state and schedule a re-render.\n\t * @param {object} state A dict of state properties to be shallowly merged\n\t * \tinto the current state, or a function that will produce such a dict. The\n\t * \tfunction is called with the current state and props.\n\t * @param {() => void} callback A function to be called once component state is\n\t * \tupdated\n\t */\n\tsetState(state, callback) {\n\t\tif (!this.prevState) this.prevState = this.state;\n\t\tthis.state = extend(\n\t\t\textend({}, this.state),\n\t\t\ttypeof state === 'function' ? state(this.state, this.props) : state\n\t\t);\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t},\n\n\n\t/**\n\t * Immediately perform a synchronous re-render of the component.\n\t * @param {() => void} callback A function to be called after component is\n\t * \tre-rendered.\n\t * @private\n\t */\n\tforceUpdate(callback) {\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\trenderComponent(this, FORCE_RENDER);\n\t},\n\n\n\t/**\n\t * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n\t * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n\t * @param {object} props Props (eg: JSX attributes) received from parent\n\t * \telement/component\n\t * @param {object} state The component's current state\n\t * @param {object} context Context object, as returned by the nearest\n\t *  ancestor's `getChildContext()`\n\t * @returns {import('./vnode').VNode | void}\n\t */\n\trender() {}\n\n});\n","import { diff } from './vdom/diff';\n\n/**\n * Render JSX into a `parent` Element.\n * @param {import('./vnode').VNode} vnode A (JSX) VNode to render\n * @param {import('./dom').PreactElement} parent DOM element to render into\n * @param {import('./dom').PreactElement} [merge] Attempt to re-use an existing DOM tree rooted at\n *  `merge`\n * @public\n *\n * @example\n * // render a div into <body>:\n * render(<div id=\"hello\">hello!</div>, document.body);\n *\n * @example\n * // render a \"Thing\" component into #foo:\n * const Thing = ({ name }) => <span>{ name }</span>;\n * render(<Thing name=\"one\" />, document.querySelector('#foo'));\n */\nexport function render(vnode, parent, merge) {\n\treturn diff(merge, vnode, {}, false, parent, false);\n}\n","import { h, h as createElement } from './h';\nimport { cloneElement } from './clone-element';\nimport { Component } from './component';\nimport { render } from './render';\nimport { rerender } from './render-queue';\nimport options from './options';\n\nfunction createRef() {\n\treturn {};\n}\n\nexport default {\n\th,\n\tcreateElement,\n\tcloneElement,\n\tcreateRef,\n\tComponent,\n\trender,\n\trerender,\n\toptions\n};\n\nexport {\n\th,\n\tcreateElement,\n\tcloneElement,\n\tcreateRef,\n\tComponent,\n\trender,\n\trerender,\n\toptions\n};\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n"],"sourceRoot":""}