{"version":3,"file":"static/js/7887.f904f7f7.js","sources":["webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dhmk+utils@2.4.2/node_modules/@dhmk/utils/esm/lens.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dhmk+utils@2.4.2/node_modules/@dhmk/utils/esm/std.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dhmk+zustand-lens@3.0.4_zustand@4.5.0_@types+react@17.0.80_immer@9.0.19_react@17.0.2_/node_modules/@dhmk/zustand-lens/esm/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+core@6.1.0_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@dnd-kit/core/dist/core.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+accessibility@3.1.0_react@17.0.2/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+core@6.1.0_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/@dnd-kit/core/dist/core.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+accessibility@3.1.0_react@18.3.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+modifiers@6.0.1_@dnd-kit+core@6.1.0_react-dom@17.0.2_react@17.0.2__react@17.0.2__react@17.0.2/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+sortable@8.0.0_@dnd-kit+core@6.1.0_react-dom@17.0.2_react@17.0.2__react@17.0.2__react@17.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+sortable@8.0.0_@dnd-kit+core@6.1.0_react-dom@18.3.0_react@18.3.0__react@18.3.0__react@18.3.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+utilities@3.1.0_react@17.0.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+utilities@3.1.0_react@18.3.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@17.0.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@18.3.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+cache@11.13.1/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+is-prop-valid@0.8.8/node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+memoize@0.7.4/node_modules/@emotion/memoize/dist/memoize.browser.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+react@11.5.0_@babel+core@7.25.9_@types+react@17.0.80_react@17.0.2/node_modules/@emotion/react/dist/emotion-element-99289b21.browser.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+react@11.5.0_@babel+core@7.25.9_@types+react@17.0.80_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+serialize@1.3.2/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+stylis@0.8.5/node_modules/@emotion/stylis/dist/stylis.browser.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+unitless@0.7.5/node_modules/@emotion/unitless/dist/unitless.browser.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@emotion+utils@1.4.1/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@fullstory+browser@1.6.1/node_modules/@fullstory/browser/dist/index.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@hypnosphi+create-react-context@0.3.1_prop-types@15.7.2_react@18.3.0/node_modules/@hypnosphi/create-react-context/lib/implementation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@hypnosphi+create-react-context@0.3.1_prop-types@15.7.2_react@18.3.0/node_modules/@hypnosphi/create-react-context/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getBorders.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/enums.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/debounce.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/getVariation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/modifiers/offset.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getDecorations.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/uniqueBy.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/modifiers/flip.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/utils/within.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/modifiers/hide.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/popper.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.0.3/node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/debounce.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/createPopper.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/enums.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/flip.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/hide.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/offset.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/popper.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getVariation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/math.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/userAgent.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/within.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@preact+signals-core@1.8.0/node_modules/@preact/signals-core/dist/signals-core.module.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@preact+signals-react@2.2.0_react@18.3.0/node_modules/@preact/signals-react/runtime/dist/runtime.module.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@redux-saga+delay-p@1.2.1/node_modules/@redux-saga/delay-p/dist/redux-saga-delay-p.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@redux-saga+core@1.3.0/node_modules/@redux-saga/core/dist/io-22ea0cf9.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@redux-saga+is@1.1.3/node_modules/@redux-saga/is/dist/redux-saga-is.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@redux-saga+symbols@1.1.3/node_modules/@redux-saga/symbols/dist/redux-saga-symbols.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@reduxjs+toolkit@1.8.0_react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react@17.0.2__react@17.0.2/node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/adapters/xhr.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/axios.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/cancel/Cancel.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/cancel/CancelToken.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/cancel/isCancel.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/core/Axios.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/core/InterceptorManager.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/core/buildFullPath.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/core/createError.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/core/dispatchRequest.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/core/enhanceError.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/core/mergeConfig.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/core/settle.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/core/transformData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/defaults.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/env/data.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/bind.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/buildURL.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/combineURLs.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/cookies.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/isAxiosError.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/parseHeaders.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/spread.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/helpers/validator.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@0.24.0/node_modules/axios/lib/utils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/babel-runtime@6.26.0/node_modules/babel-runtime/core-js/json/stringify.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/blueimp-md5@2.16.0/node_modules/blueimp-md5/js/md5.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/clsx@1.1.1/node_modules/clsx/dist/clsx.m.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/content-type@1.0.5/node_modules/content-type/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/core-js@2.6.12/node_modules/core-js/library/fn/json/stringify.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/core-js@2.6.12/node_modules/core-js/library/modules/_core.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/longFormatters/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/protectedTokens/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/roundingMethods/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/toInteger/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addDays/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addHours/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addMilliseconds/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addMinutes/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addMonths/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addQuarters/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addWeeks/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addYears/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/constants/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInCalendarDays/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInCalendarMonths/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInCalendarWeeks/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInCalendarYears/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInDays/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInHours/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInMilliseconds/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInMinutes/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/endOfDay/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/endOfMonth/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/endOfWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/endOfYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/formatters/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/format/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getDate/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getDay/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getDaysInMonth/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getHours/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfISOWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getISOWeekYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfISOWeekYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getISOWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getMinutes/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getMonth/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getQuarter/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getSeconds/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getTime/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getWeekYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfWeekYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/getYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isAfter/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isBefore/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isDate/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isEqual/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isSameDay/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isSameMonth/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isSameQuarter/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isSameYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isValid/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isWithinInterval/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/max/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/min/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/assign/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/setUTCDay/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/setUTCISODay/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/setUTCWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/parse/_lib/parsers/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/parse/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/parseISO/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/set/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/setHours/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/setMinutes/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/setMonth/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/setQuarter/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/setSeconds/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/setYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfDay/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfMonth/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfQuarter/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfWeek/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfYear/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subDays/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subHours/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subMilliseconds/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subMinutes/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subMonths/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subQuarters/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subWeeks/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subYears/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/toDate/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/deep-equal@1.1.2/node_modules/deep-equal/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/dom-scroll-into-view@1.0.1/node_modules/dom-scroll-into-view/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/dom-scroll-into-view@1.0.1/node_modules/dom-scroll-into-view/lib/dom-scroll-into-view.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/dom-scroll-into-view@1.0.1/node_modules/dom-scroll-into-view/lib/util.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/dom-serializer@1.4.1/node_modules/dom-serializer/lib/foreignNames.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/dom-serializer@1.4.1/node_modules/dom-serializer/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/foreignNames.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/dom-to-image-more@2.8.0/node_modules/dom-to-image-more/src/dom-to-image-more.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domhandler@4.3.1/node_modules/domhandler/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domhandler@4.3.1/node_modules/domhandler/lib/node.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/node.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/dommatrix@1.0.3/node_modules/dommatrix/dist/dommatrix.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/dompurify@3.1.6/node_modules/dompurify/dist/purify.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/feeds.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/helpers.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/legacy.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/manipulation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/querying.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/stringify.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@2.8.0/node_modules/domutils/lib/traversal.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@3.1.0/node_modules/domutils/lib/feeds.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@3.1.0/node_modules/domutils/lib/helpers.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@3.1.0/node_modules/domutils/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@3.1.0/node_modules/domutils/lib/legacy.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@3.1.0/node_modules/domutils/lib/manipulation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@3.1.0/node_modules/domutils/lib/querying.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@3.1.0/node_modules/domutils/lib/stringify.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/domutils@3.1.0/node_modules/domutils/lib/traversal.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/emoji-mart@2.11.2_react@18.3.0/node_modules/emoji-mart/dist/components/emoji/emoji.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/emoji-mart@2.11.2_react@18.3.0/node_modules/emoji-mart/dist/components/emoji/nimble-emoji.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/emoji-mart@2.11.2_react@18.3.0/node_modules/emoji-mart/dist/polyfills/extends.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/emoji-mart@2.11.2_react@18.3.0/node_modules/emoji-mart/dist/polyfills/keys.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/emoji-mart@2.11.2_react@18.3.0/node_modules/emoji-mart/dist/polyfills/stringFromCodePoint.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/emoji-mart@2.11.2_react@18.3.0/node_modules/emoji-mart/dist/utils/data.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/emoji-mart@2.11.2_react@18.3.0/node_modules/emoji-mart/dist/utils/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/emoji-mart@2.11.2_react@18.3.0/node_modules/emoji-mart/dist/utils/shared-default-props.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/emoji-mart@2.11.2_react@18.3.0/node_modules/emoji-mart/dist/utils/shared-props.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/decode.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/decode_codepoint.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/encode.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@2.2.0/node_modules/entities/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/decode.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/decode_codepoint.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/encode.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/escape.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/generated/decode-data-html.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/generated/decode-data-xml.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/generated/encode-html.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/es-object-atoms@1.0.0/node_modules/es-object-atoms/RequireObjectCoercible.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/exenv@1.2.2/node_modules/exenv/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/fuse.js@6.4.6/node_modules/fuse.js/dist/fuse.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/gud@1.0.0/node_modules/gud/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/hammerjs@2.0.8/node_modules/hammerjs/hammer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/hoist-non-react-statics@3.3.1/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/FeedHandler.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/Parser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/Tokenizer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/htmlparser2@6.1.0/node_modules/htmlparser2/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/htmlparser2@8.0.2/node_modules/htmlparser2/lib/Parser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/htmlparser2@8.0.2/node_modules/htmlparser2/lib/Tokenizer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/htmlparser2@8.0.2/node_modules/htmlparser2/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/immutable@3.8.2/node_modules/immutable/dist/immutable.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/inline-style-parser@0.2.4/node_modules/inline-style-parser/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_DataView.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_LazyWrapper.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_LodashWrapper.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Promise.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Set.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Uint8Array.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_WeakMap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayEach.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayFilter.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludes.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludesWith.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_asciiToArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssign.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignIn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClamp.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseCreate.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDelay.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseEach.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFindIndex.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetAllKeys.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIndexOf.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMatch.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNaN.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsRegExp.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsSet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIteratee.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseLodash.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatches.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatchesProperty.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseOrderBy.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseProperty.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyOf.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSetData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSetToString.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSlice.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSortBy.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToNumber.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUniq.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castSlice.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_charsEndIndex.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_charsStartIndex.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneArrayBuffer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneBuffer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneDataView.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneRegExp.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneSymbol.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneTypedArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_compareAscending.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_compareMultiple.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_composeArgs.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_composeArgsRight.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyObject.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copySymbols.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copySymbolsIn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_countHolders.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseEach.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBind.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createCtor.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createCurry.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createFlow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createHybrid.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createMathOperation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createPartial.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRecurry.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createSet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createWrap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalArrays.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalByTag.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalObjects.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_flatRest.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeys.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeysIn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getFuncName.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getHolder.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMatchData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbols.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbolsIn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getTag.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getWrapDetails.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasUnicode.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneByTag.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneObject.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_insertWrapDetails.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIterateeCall.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isLaziable.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isStrictComparable.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_matchesStrictComparable.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mergeData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_metaMap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeysIn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overRest.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_realNames.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_reorder.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_replaceHolders.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheAdd.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheHas.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToString.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setWrapToString.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_shortOut.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackClear.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackDelete.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackGet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackHas.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackSet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_strictIndexOf.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_unescapeHtmlChar.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_unicodeToArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_updateWrapDetails.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_wrapperClone.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/add.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/ary.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/before.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/clone.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/cloneDeep.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/curry.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/debounce.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaultTo.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/delay.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/differenceBy.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flowRight.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fp/_baseConvert.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fp/_mapping.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fp/_util.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fp/add.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fp/compose.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fp/convert.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fp/defaultTo.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fp/flowRight.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fp/placeholder.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fp/split.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isElement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEqual.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isError.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isMap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNaN.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNil.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNumber.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isRegExp.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSet.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isString.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isUndefined.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isWeakMap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/iteratee.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/last.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/noop.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/now.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/once.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/rearg.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/sortBy.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/split.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/startsWith.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toInteger.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toPath.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/transform.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/trimEnd.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/trimStart.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/unescape.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/wrapperLodash.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/memoize-one@4.0.0/node_modules/memoize-one/dist/memoize-one.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/node-polyglot@2.4.0/node_modules/node-polyglot/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/object-inspect@1.13.2/node_modules/object-inspect/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/object-is@1.1.6/node_modules/object-is/implementation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/object-is@1.1.6/node_modules/object-is/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/object-is@1.1.6/node_modules/object-is/polyfill.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/object-is@1.1.6/node_modules/object-is/shim.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/object-to-formdata@4.1.0/node_modules/object-to-formdata/dist/index.module.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/parse-srcset@1.0.2/node_modules/parse-srcset/src/parse-srcset.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/pdfjs-dist@2.14.305_worker-loader@3.0.8_webpack@5.91.0_@swc+core@1.7.6_@swc+helpers@0.5.12___/node_modules/pdfjs-dist/legacy/build/pdf.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.browser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popper.js@1.16.1/node_modules/popper.js/dist/esm/popper.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/at-rule.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/comment.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/container.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/css-syntax-error.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/declaration.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/document.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/fromJSON.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/input.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/lazy-result.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/list.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/map-generator.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/no-work-result.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/node.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/parse.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/parser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/postcss.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/previous-map.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/processor.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/result.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/root.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/rule.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/stringifier.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/stringify.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/symbols.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/tokenize.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/warn-once.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/postcss@8.4.38/node_modules/postcss/lib/warning.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/prop-types@15.7.2/node_modules/prop-types/factoryWithThrowingShims.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/prop-types@15.7.2/node_modules/prop-types/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/prop-types@15.7.2/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/formats.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/parse.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/stringify.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/utils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-autocomplete@1.8.1_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-autocomplete/build/lib/Autocomplete.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-datepicker@3.4.1_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-datepicker/dist/react-datepicker.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-datepicker@4.11.0_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-datepicker/dist/react-datepicker.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-dom@17.0.2_react@17.0.2/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-dom@17.0.2_react@17.0.2/node_modules/react-dom/cjs/react-dom.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-dom@17.0.2_react@17.0.2/node_modules/react-dom/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-dom@17.0.2_react@17.0.2/node_modules/react-dom/server.browser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-draggable@4.4.3_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-draggable/build/cjs/Draggable.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-draggable@4.4.3_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-draggable/build/cjs/DraggableCore.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-draggable@4.4.3_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-draggable/build/cjs/cjs.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-draggable@4.4.3_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-draggable/build/cjs/utils/domFns.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-draggable@4.4.3_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-draggable/build/cjs/utils/getPrefix.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-draggable@4.4.3_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-draggable/build/cjs/utils/log.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-draggable@4.4.3_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-draggable/build/cjs/utils/positionFns.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-draggable@4.4.3_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-draggable/build/cjs/utils/shims.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-error-boundary@3.1.4_react@18.3.0/node_modules/react-error-boundary/dist/react-error-boundary.umd.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-fast-compare@3.2.2/node_modules/react-fast-compare/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-geocode@0.2.1/node_modules/react-geocode/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/cjs/react-is.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-lifecycles-compat@3.0.4/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/components/Modal.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/components/ModalPortal.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/helpers/ariaAppHider.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/helpers/bodyTrap.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/helpers/classList.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/helpers/focusManager.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/helpers/portalOpenInstances.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/helpers/safeHTMLElement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/helpers/scopeTab.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/helpers/tabbable.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-modal@3.14.4_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-modal/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-onclickoutside@6.13.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-onclickoutside/dist/react-onclickoutside.es.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-onclickoutside@6.13.1_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-onclickoutside/dist/react-onclickoutside.es.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/make-event-props@1.6.2/node_modules/make-event-props/dist/esm/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/make-cancellable-promise@1.3.2/node_modules/make-cancellable-promise/dist/esm/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/merge-class-names@1.4.2/node_modules/merge-class-names/dist/esm/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/DocumentContext.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/Message.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/LinkService.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/PasswordResponses.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/shared/utils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/shared/propTypes.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/Document.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/OutlineContext.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/Ref.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/OutlineItem.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/Outline.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/merge-refs@1.3.0_@types+react@17.0.80/node_modules/merge-refs/dist/esm/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/PageContext.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/Page/PageCanvas.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/Page/PageSVG.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/Page/TextLayerItem.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/Page/TextLayer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/Page/AnnotationLayer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/Page.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-pdf@5.7.2_@types+react@17.0.80_react-dom@18.3.0_react@18.3.0__react@18.3.0_webpack@5.91_5jyyqblbhjbwkto3k3b3riineq/node_modules/react-pdf/dist/esm/entry.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@1.3.11_react@18.3.0/node_modules/react-popper/lib/esm/Manager.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@1.3.11_react@18.3.0/node_modules/react-popper/lib/esm/Popper.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@1.3.11_react@18.3.0/node_modules/react-popper/lib/esm/Reference.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@1.3.11_react@18.3.0/node_modules/react-popper/lib/esm/utils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@2.3.0_@popperjs+core@2.0.3_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-popper/lib/esm/utils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@2.3.0_@popperjs+core@2.0.3_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-popper/lib/esm/usePopper.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@2.3.0_@popperjs+core@2.11.8_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-popper/lib/esm/Manager.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@2.3.0_@popperjs+core@2.11.8_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-popper/lib/esm/utils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@2.3.0_@popperjs+core@2.11.8_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-popper/lib/esm/usePopper.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@2.3.0_@popperjs+core@2.11.8_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-popper/lib/esm/Popper.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-popper@2.3.0_@popperjs+core@2.11.8_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-popper/lib/esm/Reference.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-quill@2.0.0_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-quill/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/components/Context.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/utils/batch.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/utils/Subscription.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/components/Provider.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/components/connectAdvanced.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/utils/shallowEqual.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/utils/bindActionCreators.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/connect/wrapMapToProps.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/connect/mapDispatchToProps.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/connect/mapStateToProps.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/connect/mergeProps.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/connect/selectorFactory.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/connect/connect.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/hooks/useReduxContext.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/hooks/useStore.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/hooks/useDispatch.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/hooks/useSelector.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-redux@7.2.6_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset-env@7.25.9_sa6lc7ad27pklnmwss37hyomum/node_modules/react-redux/es/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-select@5.2.0_@babel+core@7.25.9_@types+react@17.0.80_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/useCreatable-00a6568c.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-select@5.2.0_@babel+core@7.25.9_@types+react@17.0.80_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/creatable/dist/react-select.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-select@5.2.0_@babel+core@7.25.9_@types+react@17.0.80_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/Select-09b3775e.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-select@5.2.0_@babel+core@7.25.9_@types+react@17.0.80_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/index-c7a4d7ce.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-select@5.2.0_@babel+core@7.25.9_@types+react@17.0.80_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/react-select.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-select@5.2.0_@babel+core@7.25.9_@types+react@17.0.80_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/useStateManager-783b07d5.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-signature-canvas@1.0.6_prop-types@15.7.2_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-signature-canvas/build/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/tslib@2.8.0/node_modules/tslib/tslib.es6.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanem+svg-injector@10.1.68/node_modules/@tanem/svg-injector/dist/svg-injector.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-svg@14.1.1_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-svg/dist/react-svg.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-toastify@8.1.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-toastify/dist/react-toastify.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-webcam@7.2.0_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-webcam/dist/react-webcam.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-window@1.8.5_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-window/dist/index.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-window@1.8.5_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-window/dist/index.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react@17.0.2/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react@17.0.2/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react@17.0.2/node_modules/react/cjs/react.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react@17.0.2/node_modules/react/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react@17.0.2/node_modules/react/jsx-dev-runtime.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react@17.0.2/node_modules/react/jsx-runtime.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@redux-saga+core@1.3.0/node_modules/@redux-saga/core/dist/redux-saga-core.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@redux-saga+deferred@1.2.1/node_modules/@redux-saga/deferred/dist/redux-saga-deferred.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/redux-saga@1.1.3/node_modules/redux-saga/dist/redux-saga-core-npm-proxy.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@redux-saga+core@1.3.0/node_modules/@redux-saga/core/dist/redux-saga-effects.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/redux@4.1.2/node_modules/redux/es/redux.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/regenerator-runtime@0.13.9/node_modules/regenerator-runtime/runtime.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/regexp.prototype.flags@1.5.3/node_modules/regexp.prototype.flags/implementation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/regexp.prototype.flags@1.5.3/node_modules/regexp.prototype.flags/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/regexp.prototype.flags@1.5.3/node_modules/regexp.prototype.flags/polyfill.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/regexp.prototype.flags@1.5.3/node_modules/regexp.prototype.flags/shim.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/reselect@4.1.8/node_modules/reselect/es/defaultMemoize.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/reselect@4.1.8/node_modules/reselect/es/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/sanitize-html@2.13.0/node_modules/sanitize-html/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/sanitize-html@2.7.0/node_modules/sanitize-html/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/scheduler@0.20.2/node_modules/scheduler/cjs/scheduler.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/scheduler@0.20.2/node_modules/scheduler/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/set-function-name@2.0.2/node_modules/set-function-name/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/shallowequal@1.1.0/node_modules/shallowequal/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/smoothscroll-polyfill@0.4.4/node_modules/smoothscroll-polyfill/dist/smoothscroll.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/string.prototype.trim@1.2.9/node_modules/string.prototype.trim/implementation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/string.prototype.trim@1.2.9/node_modules/string.prototype.trim/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/string.prototype.trim@1.2.9/node_modules/string.prototype.trim/polyfill.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/string.prototype.trim@1.2.9/node_modules/string.prototype.trim/shim.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/cjs/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/styled-components@5.3.3_@babel+core@7.25.9_react-dom@18.3.0_react@18.3.0__react-is@17.0.2_react@18.3.0/node_modules/styled-components/dist/styled-components.browser.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/styled-components@5.3.3_@babel+core@7.25.9_react-dom@18.3.0_react@18.3.0__react-is@18.3.1_react@18.3.0/node_modules/styled-components/dist/styled-components.browser.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/trim-canvas@0.1.2/node_modules/trim-canvas/build/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/tslib@2.5.2/node_modules/tslib/tslib.es6.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@17.0.2/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@17.0.2/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@17.0.2/node_modules/use-sync-external-store/shim/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@17.0.2/node_modules/use-sync-external-store/shim/with-selector.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@18.3.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@18.3.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@18.3.0/node_modules/use-sync-external-store/shim/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@18.3.0/node_modules/use-sync-external-store/shim/with-selector.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@17.0.2/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@17.0.2/node_modules/use-sync-external-store/shim/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@18.3.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@18.3.0/node_modules/use-sync-external-store/shim/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/utif@3.1.0/node_modules/utif/UTIF.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/rng.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/native.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/stringify.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/v4.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/warning@4.0.3/node_modules/warning/warning.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/web-streams-polyfill@3.3.3/node_modules/web-streams-polyfill/dist/ponyfill.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/es-abstract@1.23.3/node_modules/es-abstract/2024/ToString.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/nanoid@3.3.7/node_modules/nanoid/non-secure/index.cjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/objectSpread2.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@babel+runtime@7.24.7/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@floating-ui+core@1.6.8/node_modules/@floating-ui/core/dist/floating-ui.core.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@floating-ui+dom@1.6.11/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@floating-ui+react-dom@2.1.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@floating-ui+react@0.26.9_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@floating-ui/react/dist/floating-ui.react.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@floating-ui+react@0.26.9_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@floating-ui+utils@0.2.8/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@floating-ui+utils@0.2.8/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@headlessui+react@1.5.0_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/@headlessui/react/dist/headlessui.esm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/debug-build.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/helpers.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/integrations/contextlines.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/instrument.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/browserMetrics.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/logSpans.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/sampling.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/sentryNonRecordingSpan.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/measurement.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/utils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/sentrySpan.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/trace.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/buildPolyfills/_optionalChain.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/bindReporter.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/generateUniqueID.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getNavigationEntry.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getActivationStart.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/initMetric.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/observe.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/onHidden.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/runOnce.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/whenActivated.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/onFCP.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getCLS.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getFID.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getINP.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getLCP.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/onTTFB.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/utils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/cls.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/metrics/inp.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/idleSpan.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/errors.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/tracing/backgroundtab.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/fetch.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/tracing/request.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/tracing/browserTracingIntegration.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/defaultScopes.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/asyncContext/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/breadcrumbs.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/carrier.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/constants.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/currentScopes.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/debug-build.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/envelope.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/exports.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/integration.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/integrations/captureconsole.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/integrations/extraerrordata.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/metrics/metric-summary.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/scope.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/semanticAttributes.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/session.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/dynamicSamplingContext.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/tracing/spanstatus.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/utils/hasTracingEnabled.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/utils/parseSampleRate.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/eventProcessors.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/utils/applyScopeDataToEvent.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/utils/prepareEvent.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/utils/spanOnScope.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/utils/spanUtils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+fullstory@3.0.0_@sentry+core@8.34.0/node_modules/@sentry/fullstory/dist/es/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+react@8.34.0_react@18.3.0/node_modules/@sentry/react/build/esm/redux.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/integrations/functiontostring.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/instrument/dom.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/integrations/inboundfilters.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/integrations/dedupe.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/sdk.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/error.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/clientreport.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/api.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/baseclient.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/utils/sdkMetadata.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/env.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/eventbuilder.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/userfeedback.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/client.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/breadcrumb-log-level.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/integrations/breadcrumbs.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/integrations/browserapierrors.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/integrations/globalhandlers.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/integrations/httpcontext.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/aggregate-errors.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/integrations/linkederrors.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/stack-parsers.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/getNativeImplementation.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/promisebuffer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/ratelimit.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+core@8.34.0/node_modules/@sentry/core/build/esm/transports/base.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/transports/fetch.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+browser@8.34.0/node_modules/@sentry/browser/build/npm/esm/sdk.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+react@8.34.0_react@18.3.0/node_modules/@sentry/react/build/esm/sdk.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/baggage.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/browser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/debug-build.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/dsn.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/envelope.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/instrument/console.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/instrument/fetch.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/instrument/globalError.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/instrument/globalUnhandledRejection.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/instrument/handlers.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/is.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/logger.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/misc.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/memo.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/normalize.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/object.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/propagationContext.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/severity.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/stacktrace.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/string.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/supports.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/syncpromise.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/time.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/tracing.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/url.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/version.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/worldwide.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/debug-build.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/instrument/history.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry+utils@8.34.0/node_modules/@sentry/utils/build/esm/vendor/supportsHistory.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/instrument/xhr.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@sentry-internal+browser-utils@8.34.0/node_modules/@sentry-internal/browser-utils/build/esm/types.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@swc+helpers@0.5.12/node_modules/@swc/helpers/esm/_define_property.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@swc+helpers@0.5.12/node_modules/@swc/helpers/esm/_extends.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@swc+helpers@0.5.12/node_modules/@swc/helpers/esm/_object_destructuring_empty.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@swc+helpers@0.5.12/node_modules/@swc/helpers/esm/_object_spread.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@swc+helpers@0.5.12/node_modules/@swc/helpers/esm/_object_spread_props.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@swc+helpers@0.5.12/node_modules/@swc/helpers/esm/_object_without_properties_loose.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@swc+helpers@0.5.12/node_modules/@swc/helpers/esm/_object_without_properties.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/focusManager.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/logger.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/mutation.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/notifyManager.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/onlineManager.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/query.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/queryCache.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/mutationCache.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/infiniteQueryBehavior.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/queryClient.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/queryObserver.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/removable.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/retryer.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/subscribable.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/utils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query-devtools@4.36.1_@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17._cvu5tgrxl3gxjn3cmbfcaddzla/node_modules/@tanstack/react-query-devtools/build/lib/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/QueryClientProvider.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/QueryErrorResetBoundary.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/errorBoundaryUtils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/isRestoring.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/suspense.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/useIsFetching.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/mutationObserver.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/useMutation.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+query-core@4.36.1/node_modules/@tanstack/query-core/build/lib/queriesObserver.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/useQueries.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/useBaseQuery.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/useQuery.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/useSyncExternalStore.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@tanstack+react-query@4.36.1_react-dom@17.0.2_react@17.0.2__react-native@0.72.7_@babel+preset_p2ge3t3lalvwxmohtbvw5daszi/node_modules/@tanstack/react-query/build/lib/utils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/utils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/platform/common/utils.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/adapters/fetch.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/bind.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/core/AxiosError.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/null.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/toFormData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/AxiosURLSearchParams.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/buildURL.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/core/InterceptorManager.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/defaults/transitional.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/platform/browser/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/platform/browser/classes/FormData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/platform/browser/classes/Blob.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/platform/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/toURLEncodedForm.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/formDataToJSON.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/defaults/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/parseHeaders.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/core/AxiosHeaders.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/core/transformData.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/cancel/isCancel.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/cancel/CanceledError.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/core/settle.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/parseProtocol.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/speedometer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/throttle.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/progressEventReducer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/cookies.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/combineURLs.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/core/buildFullPath.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/core/mergeConfig.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/resolveConfig.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/adapters/xhr.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/composeSignals.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/trackStream.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/adapters/adapters.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/core/dispatchRequest.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/env/data.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/validator.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/core/Axios.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/cancel/CancelToken.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/spread.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/isAxiosError.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/helpers/HttpStatusCode.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/axios@1.7.2/node_modules/axios/lib/axios.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/clsx@2.0.0/node_modules/clsx/dist/clsx.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/class-variance-authority@0.7.0/node_modules/class-variance-authority/dist/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/utils/types.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/process.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/features/definitions.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/hey-listen@1.0.8/node_modules/hey-listen/dist/hey-listen.es.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/LazyContext.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/features/use-features.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/PresenceContext.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/is-browser.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/utils/variants.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-constant.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/node/state.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/node/id.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/features/use-projection.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/utils/VisualElementHandler.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/utils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/numbers/units.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/numbers/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/html/use-props.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/use-props.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/use-render.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/html/utils/render.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/resolve-value.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/html/config-motion.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/events/use-dom-event.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/use-focus-gesture.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/utils/event-type.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/events/event-info.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/events/utils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/events/use-pointer-event.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/use-hover-gesture.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/pipe.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/use-tap-gesture.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/warn-once.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/features/viewport/use-viewport.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/features/gestures.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-id.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/clamp.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/utils/find-spring.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/generators/spring.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/progress.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/mix.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/utils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/rgba.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/hex.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/hsla.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/hsla-to-rgba.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/mix-color.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/complex/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/inc.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/mix-complex.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/interpolate.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/easing/utils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/easing/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/generators/keyframes.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/generators/decay.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/on-next-frame.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/create-render-step.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/utils/elapsed.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/velocity-per-second.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/inertia.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/time-conversion.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/easing/cubic-bezier.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/animation/utils/easing.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/complex/filter.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/array.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/value/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/utils/setters.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/utils/animation.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/features/animations.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/is-point.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/is-point-3d.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/distance.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/PanSession.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/geometry/models.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/utils/measure.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/drag/use-drag.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/features/drag.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/gestures/use-pan-gesture.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/utils/lifecycles.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/html/visual-element.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/svg/visual-element.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/motion/features/layout/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/animation/animate.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/shared/stack.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/styles/transform.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/motion.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/immer@9.0.19/node_modules/immer/dist/immer.esm.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/nanoid@4.0.2/node_modules/nanoid/index.browser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/schema.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/merge.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/normalize.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/info.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/types.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/defined-info.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/create.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/xlink.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/xml.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/case-sensitive-transform.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/util/case-insensitive-transform.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/xmlns.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/aria.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/html.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/svg.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/find.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/property-information@6.5.0/node_modules/property-information/lib/hast-to-react.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/esm/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/vfile-message@4.0.2/node_modules/vfile-message/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.2/node_modules/hast-util-to-jsx-runtime/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/html-url-attributes@3.0.1/node_modules/html-url-attributes/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-chunked@2.0.0/node_modules/micromark-util-chunked/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-subtokenize@2.0.1/node_modules/micromark-util-subtokenize/lib/splice-buffer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-subtokenize@2.0.1/node_modules/micromark-util-subtokenize/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark@4.0.0/node_modules/micromark/lib/postprocess.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-combine-extensions@2.0.0/node_modules/micromark-util-combine-extensions/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-character@2.1.0/node_modules/micromark-util-character/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-factory-space@2.0.0/node_modules/micromark-factory-space/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark@4.0.0/node_modules/micromark/lib/initialize/content.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark@4.0.0/node_modules/micromark/lib/initialize/document.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/blank-line.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/content.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark@4.0.0/node_modules/micromark/lib/initialize/flow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark@4.0.0/node_modules/micromark/lib/initialize/text.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-resolve-all@2.0.0/node_modules/micromark-util-resolve-all/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark@4.0.0/node_modules/micromark/lib/create-tokenizer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/thematic-break.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/list.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/block-quote.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-factory-destination@2.0.0/node_modules/micromark-factory-destination/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-factory-label@2.0.0/node_modules/micromark-factory-label/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-factory-title@2.0.0/node_modules/micromark-factory-title/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-factory-whitespace@2.0.0/node_modules/micromark-factory-whitespace/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-normalize-identifier@2.0.0/node_modules/micromark-util-normalize-identifier/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/definition.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/code-indented.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/heading-atx.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/setext-underline.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-html-tag-name@2.0.0/node_modules/micromark-util-html-tag-name/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/html-flow.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/code-fenced.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/decode-named-character-reference@1.0.2/node_modules/decode-named-character-reference/index.dom.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/character-reference.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/character-escape.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/line-ending.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/label-end.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/label-start-image.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-classify-character@2.0.0/node_modules/micromark-util-classify-character/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/attention.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/autolink.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/html-text.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/label-start-link.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark@4.0.0/node_modules/micromark/lib/constructs.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/hard-break-escape.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-core-commonmark@2.0.1/node_modules/micromark-core-commonmark/lib/code-text.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark@4.0.0/node_modules/micromark/lib/parse.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark@4.0.0/node_modules/micromark/lib/preprocess.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.1/node_modules/micromark-util-decode-numeric-character-reference/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-decode-string@2.0.0/node_modules/micromark-util-decode-string/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-from-markdown@2.0.1/node_modules/mdast-util-from-markdown/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@ungap+structured-clone@1.2.0/node_modules/@ungap/structured-clone/esm/types.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@ungap+structured-clone@1.2.0/node_modules/@ungap/structured-clone/esm/deserialize.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@ungap+structured-clone@1.2.0/node_modules/@ungap/structured-clone/esm/serialize.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/@ungap+structured-clone@1.2.0/node_modules/@ungap/structured-clone/esm/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/micromark-util-sanitize-uri@2.0.0/node_modules/micromark-util-sanitize-uri/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/footer.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/color.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/revert.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list-item.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/break.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/code.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/delete.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/heading.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/html.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/root.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/strong.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-row.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/text.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/state.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/remark-rehype@11.1.1/node_modules/remark-rehype/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-markdown@9.0.1_@types+react@17.0.80_react@18.3.0/node_modules/react-markdown/lib/index.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-virtuoso@4.2.0_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-virtuoso/dist/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/react-virtuoso@4.2.0_react-dom@18.3.0_react@18.3.0__react@18.3.0/node_modules/react-virtuoso/dist/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/signature_pad@2.3.2/node_modules/signature_pad/dist/signature_pad.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/zustand@4.5.0_@types+react@17.0.80_immer@9.0.19_react@17.0.2/node_modules/zustand/esm/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/zustand@4.5.0_@types+react@17.0.80_immer@9.0.19_react@17.0.2/node_modules/zustand/esm/middleware.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/zustand@4.5.0_@types+react@17.0.80_immer@9.0.19_react@17.0.2/node_modules/zustand/esm/middleware/immer.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/zustand@4.5.0_@types+react@17.0.80_immer@9.0.19_react@17.0.2/node_modules/zustand/esm/vanilla.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/zustand@4.5.0_@types+react@17.0.80_immer@9.0.19_react@18.3.0/node_modules/zustand/esm/index.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/zustand@4.5.0_@types+react@17.0.80_immer@9.0.19_react@18.3.0/node_modules/zustand/esm/middleware/immer.mjs","webpack://@jotforminc/sheets/../../../node_modules/.pnpm/zustand@4.5.0_@types+react@17.0.80_immer@9.0.19_react@18.3.0/node_modules/zustand/esm/vanilla.mjs"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(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))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nexport var getIn = function (x, path) { return path.reduce(function (src, k) { return src[k]; }, x); };\r\nexport var setIn = function (x, path, v) {\r\n if (path.length === 0) {\r\n return typeof v === \"function\" ? v(x) : v;\r\n }\r\n var k = path[0], rest = path.slice(1);\r\n var value = setIn(x[k], rest, v);\r\n return Array.isArray(x)\r\n ? arraySet(x, Number(k), value)\r\n : objectSet(x, k, value);\r\n};\r\nvar arraySet = function (x, k, v) { return x.map(function (_v, i) { return (i === k ? v : _v); }); };\r\nvar objectSet = function (x, k, v) {\r\n var _a;\r\n return (__assign(__assign({}, x), (_a = {}, _a[k] = v, _a)));\r\n};\r\n","var __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(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))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n};\r\nexport var noop = function () { };\r\nexport var id = function (x) { return x; };\r\nexport var range = function (count, start) {\r\n if (start === void 0) { start = 0; }\r\n return Array.from(Array(count).keys()).map(function (i) { return start + i; });\r\n};\r\nexport var arraysEqual = function (a, b) {\r\n return a.length === b.length && a.every(function (av, i) { return av === b[i]; });\r\n};\r\nexport var shallowEqual = function (a, b) {\r\n var ka = Object.keys(a);\r\n var kb = Object.keys(b);\r\n return ka.length === kb.length && ka.every(function (k) { return a[k] === b[k]; });\r\n};\r\nexport function objectFrom(entries) {\r\n return Array.from(entries).reduce(function (res, _a) {\r\n var k = _a[0], v = _a[1];\r\n res[k] = v;\r\n return res;\r\n }, {});\r\n}\r\nexport function objectMap(src, mapValue, mapKey) {\r\n if (mapKey === void 0) { mapKey = id; }\r\n return objectFrom(Object.keys(src).map(function (k) { return [\r\n mapKey(k, src[k], src),\r\n mapValue(src[k], k, src),\r\n ]; }));\r\n}\r\nexport function objectTransform(src, mapEntry) {\r\n return objectFrom(Object.keys(src)\r\n .map(function (k) { return mapEntry(src[k], k, src); })\r\n .filter(Boolean));\r\n}\r\nexport function getter(t, k, value) {\r\n if (arguments.length === 2) {\r\n return { use: function (value) { return getter(t, k, value); } };\r\n }\r\n else {\r\n Object.defineProperty(t, k, { value: value, enumerable: true });\r\n return value;\r\n }\r\n}\r\nexport function createFactory(c) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // @ts-ignore\r\n return new (c.bind.apply(c, __spreadArray([void 0], args, false)))();\r\n };\r\n}\r\nexport function createFactoryAs() {\r\n return function (c) {\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // @ts-ignore\r\n return new (c.bind.apply(c, __spreadArray([void 0], args, false)))();\r\n };\r\n };\r\n}\r\nexport var call = function (fn) { return fn(); };\r\nexport var deepReadonly = function (x) { return x; };\r\nexport var merge = function (a, b) {\r\n return b ? __assign(__assign({}, a), b) : function (b) { return (__assign(__assign({}, b), a)); };\r\n};\r\nvar mergeDeepRec = function (a, b) {\r\n if (!isPlainObject(a) || !isPlainObject(b))\r\n return b;\r\n var res = __assign({}, a);\r\n for (var k in b) {\r\n var v = b[k];\r\n res[k] = mergeDeepRec(a[k], v);\r\n }\r\n return res;\r\n};\r\nexport var mergeDeep = function (a, b) {\r\n return b ? mergeDeepRec(a, b) : function (b) { return mergeDeepRec(b, a); };\r\n};\r\nexport var join = function (a, sep, b) { return (a + sep + b); };\r\nexport var namespace = function (s) {\r\n return function (suffix) {\r\n return join(s, \"/\", suffix);\r\n };\r\n};\r\nexport function assert(condition, msg) {\r\n if (msg === void 0) { msg = \"Assertion failed\"; }\r\n if (!condition)\r\n throw new Error(msg);\r\n}\r\nexport var isPlainObject = function (x) {\r\n return !!x && typeof x === \"object\" && Object.getPrototypeOf(x) === Object.prototype;\r\n};\r\nexport function flatMap(src, fn) {\r\n var res = [];\r\n src.forEach(function (x, i) { return res.push.apply(res, fn(x, i)); });\r\n return res;\r\n}\r\n","var __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(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))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n};\r\nimport { getIn, setIn, shallowEqual, isPlainObject, } from \"@dhmk/utils\";\r\nexport { mergeDeep } from \"@dhmk/utils\";\r\nexport function createLens(set, get, path) {\r\n var normPath = typeof path === \"string\" ? [path] : path;\r\n var _set = function (partial, replace) {\r\n var args = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n args[_i - 2] = arguments[_i];\r\n }\r\n return set.apply(void 0, __spreadArray([function (parentValue) {\r\n var ourOldValue = getIn(parentValue, normPath);\r\n var ourTmpValue = typeof partial === \"function\" ? partial(ourOldValue) : partial;\r\n var isPlain = isPlainObject(ourOldValue);\r\n var ourNextValue = replace || !isPlain\r\n ? ourTmpValue\r\n : __assign(__assign({}, ourOldValue), ourTmpValue);\r\n var isSame = isPlain\r\n ? shallowEqual(ourOldValue, ourNextValue)\r\n : ourOldValue === ourNextValue; // todo Object.is\r\n return isSame\r\n ? parentValue\r\n : setIn(parentValue, normPath, ourNextValue);\r\n },\r\n false], args, false));\r\n };\r\n var _get = function () { return getIn(get(), normPath); };\r\n return [_set, _get];\r\n}\r\nvar LENS_TAG = \"@dhmk/LENS_TAG\";\r\nvar isLens = function (x) { return !!x && x[LENS_TAG]; };\r\nvar LensTypeInfo = /** @class */ (function () {\r\n function LensTypeInfo() {\r\n }\r\n return LensTypeInfo;\r\n}());\r\nexport function lens(fn) {\r\n var self = function (set, get, api, path) {\r\n var _a = createLens(set, get, path), _set = _a[0], _get = _a[1];\r\n return fn(_set, _get, api, path);\r\n };\r\n self[LENS_TAG] = true;\r\n return self;\r\n}\r\nvar findLensAndCreate = function (x, set, get, api, path) {\r\n var _a, _b;\r\n if (path === void 0) { path = []; }\r\n var res = x;\r\n if (isPlainObject(x)) {\r\n res = {};\r\n var keys = Array().concat(Object.getOwnPropertyNames(x), (_b = (_a = Object.getOwnPropertySymbols) === null || _a === void 0 ? void 0 : _a.call(Object, x)) !== null && _b !== void 0 ? _b : [] // ie 11\r\n );\r\n keys.forEach(function (k) {\r\n var v = x[k];\r\n // Symbol props are only for storing metadata\r\n if (typeof k === \"symbol\") {\r\n res[k] = v;\r\n return;\r\n }\r\n if (isLens(v)) {\r\n v = v(set, get, api, path.concat(k));\r\n }\r\n res[k] = findLensAndCreate(v, set, get, api, path.concat(k));\r\n });\r\n }\r\n return res;\r\n};\r\nvar withLensesImpl = function (config) { return function (set, get, api) {\r\n // @ts-ignore\r\n var obj = typeof config === \"function\" ? config(set, get, api) : config;\r\n return findLensAndCreate(obj, set, get, api);\r\n}; };\r\nexport var withLenses = withLensesImpl;\r\nexport var customSetter = function (setter) { return function (fn) { return function (set, get, api, path) {\r\n return fn(setter(set), get, api, path);\r\n}; }; };\r\nexport var namedSetter = customSetter(function (set) { return function (partial, name, replace) { return set(partial, replace, name); }; });\r\n","import React, { createContext, useContext, useEffect, useState, useCallback, useMemo, useRef, useReducer, memo, cloneElement, forwardRef } from 'react';\nimport { createPortal, unstable_batchedUpdates } from 'react-dom';\nimport { useUniqueId, getEventCoordinates, getWindow, isDocument, isHTMLElement, isSVGElement, canUseDOM, isWindow, isNode, getOwnerDocument, add, isKeyboardEvent, subtract, useLazyMemo, useInterval, usePrevious, useLatestValue, useEvent, useIsomorphicLayoutEffect, useNodeRef, findFirstFocusableNode, CSS } from '@dnd-kit/utilities';\nimport { useAnnouncement, HiddenText, LiveRegion } from '@dnd-kit/accessibility';\n\nconst DndMonitorContext = /*#__PURE__*/createContext(null);\n\nfunction useDndMonitor(listener) {\n const registerListener = useContext(DndMonitorContext);\n useEffect(() => {\n if (!registerListener) {\n throw new Error('useDndMonitor must be used within a children of ');\n }\n\n const unsubscribe = registerListener(listener);\n return unsubscribe;\n }, [listener, registerListener]);\n}\n\nfunction useDndMonitorProvider() {\n const [listeners] = useState(() => new Set());\n const registerListener = useCallback(listener => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n }, [listeners]);\n const dispatch = useCallback(_ref => {\n let {\n type,\n event\n } = _ref;\n listeners.forEach(listener => {\n var _listener$type;\n\n return (_listener$type = listener[type]) == null ? void 0 : _listener$type.call(listener, event);\n });\n }, [listeners]);\n return [dispatch, registerListener];\n}\n\nconst defaultScreenReaderInstructions = {\n draggable: \"\\n To pick up a draggable item, press the space bar.\\n While dragging, use the arrow keys to move the item.\\n Press space again to drop the item in its new position, or press escape to cancel.\\n \"\n};\nconst defaultAnnouncements = {\n onDragStart(_ref) {\n let {\n active\n } = _ref;\n return \"Picked up draggable item \" + active.id + \".\";\n },\n\n onDragOver(_ref2) {\n let {\n active,\n over\n } = _ref2;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was moved over droppable area \" + over.id + \".\";\n }\n\n return \"Draggable item \" + active.id + \" is no longer over a droppable area.\";\n },\n\n onDragEnd(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was dropped over droppable area \" + over.id;\n }\n\n return \"Draggable item \" + active.id + \" was dropped.\";\n },\n\n onDragCancel(_ref4) {\n let {\n active\n } = _ref4;\n return \"Dragging was cancelled. Draggable item \" + active.id + \" was dropped.\";\n }\n\n};\n\nfunction Accessibility(_ref) {\n let {\n announcements = defaultAnnouncements,\n container,\n hiddenTextDescribedById,\n screenReaderInstructions = defaultScreenReaderInstructions\n } = _ref;\n const {\n announce,\n announcement\n } = useAnnouncement();\n const liveRegionId = useUniqueId(\"DndLiveRegion\");\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n useDndMonitor(useMemo(() => ({\n onDragStart(_ref2) {\n let {\n active\n } = _ref2;\n announce(announcements.onDragStart({\n active\n }));\n },\n\n onDragMove(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (announcements.onDragMove) {\n announce(announcements.onDragMove({\n active,\n over\n }));\n }\n },\n\n onDragOver(_ref4) {\n let {\n active,\n over\n } = _ref4;\n announce(announcements.onDragOver({\n active,\n over\n }));\n },\n\n onDragEnd(_ref5) {\n let {\n active,\n over\n } = _ref5;\n announce(announcements.onDragEnd({\n active,\n over\n }));\n },\n\n onDragCancel(_ref6) {\n let {\n active,\n over\n } = _ref6;\n announce(announcements.onDragCancel({\n active,\n over\n }));\n }\n\n }), [announce, announcements]));\n\n if (!mounted) {\n return null;\n }\n\n const markup = React.createElement(React.Fragment, null, React.createElement(HiddenText, {\n id: hiddenTextDescribedById,\n value: screenReaderInstructions.draggable\n }), React.createElement(LiveRegion, {\n id: liveRegionId,\n announcement: announcement\n }));\n return container ? createPortal(markup, container) : markup;\n}\n\nvar Action;\n\n(function (Action) {\n Action[\"DragStart\"] = \"dragStart\";\n Action[\"DragMove\"] = \"dragMove\";\n Action[\"DragEnd\"] = \"dragEnd\";\n Action[\"DragCancel\"] = \"dragCancel\";\n Action[\"DragOver\"] = \"dragOver\";\n Action[\"RegisterDroppable\"] = \"registerDroppable\";\n Action[\"SetDroppableDisabled\"] = \"setDroppableDisabled\";\n Action[\"UnregisterDroppable\"] = \"unregisterDroppable\";\n})(Action || (Action = {}));\n\nfunction noop() {}\n\nfunction useSensor(sensor, options) {\n return useMemo(() => ({\n sensor,\n options: options != null ? options : {}\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [sensor, options]);\n}\n\nfunction useSensors() {\n for (var _len = arguments.length, sensors = new Array(_len), _key = 0; _key < _len; _key++) {\n sensors[_key] = arguments[_key];\n }\n\n return useMemo(() => [...sensors].filter(sensor => sensor != null), // eslint-disable-next-line react-hooks/exhaustive-deps\n [...sensors]);\n}\n\nconst defaultCoordinates = /*#__PURE__*/Object.freeze({\n x: 0,\n y: 0\n});\n\n/**\r\n * Returns the distance between two points\r\n */\nfunction distanceBetween(p1, p2) {\n return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n}\n\nfunction getRelativeTransformOrigin(event, rect) {\n const eventCoordinates = getEventCoordinates(event);\n\n if (!eventCoordinates) {\n return '0 0';\n }\n\n const transformOrigin = {\n x: (eventCoordinates.x - rect.left) / rect.width * 100,\n y: (eventCoordinates.y - rect.top) / rect.height * 100\n };\n return transformOrigin.x + \"% \" + transformOrigin.y + \"%\";\n}\n\n/**\r\n * Sort collisions from smallest to greatest value\r\n */\nfunction sortCollisionsAsc(_ref, _ref2) {\n let {\n data: {\n value: a\n }\n } = _ref;\n let {\n data: {\n value: b\n }\n } = _ref2;\n return a - b;\n}\n/**\r\n * Sort collisions from greatest to smallest value\r\n */\n\nfunction sortCollisionsDesc(_ref3, _ref4) {\n let {\n data: {\n value: a\n }\n } = _ref3;\n let {\n data: {\n value: b\n }\n } = _ref4;\n return b - a;\n}\n/**\r\n * Returns the coordinates of the corners of a given rectangle:\r\n * [TopLeft {x, y}, TopRight {x, y}, BottomLeft {x, y}, BottomRight {x, y}]\r\n */\n\nfunction cornersOfRectangle(_ref5) {\n let {\n left,\n top,\n height,\n width\n } = _ref5;\n return [{\n x: left,\n y: top\n }, {\n x: left + width,\n y: top\n }, {\n x: left,\n y: top + height\n }, {\n x: left + width,\n y: top + height\n }];\n}\nfunction getFirstCollision(collisions, property) {\n if (!collisions || collisions.length === 0) {\n return null;\n }\n\n const [firstCollision] = collisions;\n return property ? firstCollision[property] : firstCollision;\n}\n\n/**\r\n * Returns the coordinates of the center of a given ClientRect\r\n */\n\nfunction centerOfRectangle(rect, left, top) {\n if (left === void 0) {\n left = rect.left;\n }\n\n if (top === void 0) {\n top = rect.top;\n }\n\n return {\n x: left + rect.width * 0.5,\n y: top + rect.height * 0.5\n };\n}\n/**\r\n * Returns the closest rectangles from an array of rectangles to the center of a given\r\n * rectangle.\r\n */\n\n\nconst closestCenter = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const centerRect = centerOfRectangle(collisionRect, collisionRect.left, collisionRect.top);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const distBetween = distanceBetween(centerOfRectangle(rect), centerRect);\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: distBetween\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the closest rectangles from an array of rectangles to the corners of\r\n * another rectangle.\r\n */\n\nconst closestCorners = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const corners = cornersOfRectangle(collisionRect);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const rectCorners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner, index) => {\n return accumulator + distanceBetween(rectCorners[index], corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the intersecting rectangle area between two rectangles\r\n */\n\nfunction getIntersectionRatio(entry, target) {\n const top = Math.max(target.top, entry.top);\n const left = Math.max(target.left, entry.left);\n const right = Math.min(target.left + target.width, entry.left + entry.width);\n const bottom = Math.min(target.top + target.height, entry.top + entry.height);\n const width = right - left;\n const height = bottom - top;\n\n if (left < right && top < bottom) {\n const targetArea = target.width * target.height;\n const entryArea = entry.width * entry.height;\n const intersectionArea = width * height;\n const intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea);\n return Number(intersectionRatio.toFixed(4));\n } // Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)\n\n\n return 0;\n}\n/**\r\n * Returns the rectangles that has the greatest intersection area with a given\r\n * rectangle in an array of rectangles.\r\n */\n\nconst rectIntersection = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const intersectionRatio = getIntersectionRatio(rect, collisionRect);\n\n if (intersectionRatio > 0) {\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: intersectionRatio\n }\n });\n }\n }\n }\n\n return collisions.sort(sortCollisionsDesc);\n};\n\n/**\r\n * Check if a given point is contained within a bounding rectangle\r\n */\n\nfunction isPointWithinRect(point, rect) {\n const {\n top,\n left,\n bottom,\n right\n } = rect;\n return top <= point.y && point.y <= bottom && left <= point.x && point.x <= right;\n}\n/**\r\n * Returns the rectangles that the pointer is hovering over\r\n */\n\n\nconst pointerWithin = _ref => {\n let {\n droppableContainers,\n droppableRects,\n pointerCoordinates\n } = _ref;\n\n if (!pointerCoordinates) {\n return [];\n }\n\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect && isPointWithinRect(pointerCoordinates, rect)) {\n /* There may be more than a single rectangle intersecting\r\n * with the pointer coordinates. In order to sort the\r\n * colliding rectangles, we measure the distance between\r\n * the pointer and the corners of the intersecting rectangle\r\n */\n const corners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner) => {\n return accumulator + distanceBetween(pointerCoordinates, corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\nfunction adjustScale(transform, rect1, rect2) {\n return { ...transform,\n scaleX: rect1 && rect2 ? rect1.width / rect2.width : 1,\n scaleY: rect1 && rect2 ? rect1.height / rect2.height : 1\n };\n}\n\nfunction getRectDelta(rect1, rect2) {\n return rect1 && rect2 ? {\n x: rect1.left - rect2.left,\n y: rect1.top - rect2.top\n } : defaultCoordinates;\n}\n\nfunction createRectAdjustmentFn(modifier) {\n return function adjustClientRect(rect) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((acc, adjustment) => ({ ...acc,\n top: acc.top + modifier * adjustment.y,\n bottom: acc.bottom + modifier * adjustment.y,\n left: acc.left + modifier * adjustment.x,\n right: acc.right + modifier * adjustment.x\n }), { ...rect\n });\n };\n}\nconst getAdjustedRect = /*#__PURE__*/createRectAdjustmentFn(1);\n\nfunction parseTransform(transform) {\n if (transform.startsWith('matrix3d(')) {\n const transformArray = transform.slice(9, -1).split(/, /);\n return {\n x: +transformArray[12],\n y: +transformArray[13],\n scaleX: +transformArray[0],\n scaleY: +transformArray[5]\n };\n } else if (transform.startsWith('matrix(')) {\n const transformArray = transform.slice(7, -1).split(/, /);\n return {\n x: +transformArray[4],\n y: +transformArray[5],\n scaleX: +transformArray[0],\n scaleY: +transformArray[3]\n };\n }\n\n return null;\n}\n\nfunction inverseTransform(rect, transform, transformOrigin) {\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return rect;\n }\n\n const {\n scaleX,\n scaleY,\n x: translateX,\n y: translateY\n } = parsedTransform;\n const x = rect.left - translateX - (1 - scaleX) * parseFloat(transformOrigin);\n const y = rect.top - translateY - (1 - scaleY) * parseFloat(transformOrigin.slice(transformOrigin.indexOf(' ') + 1));\n const w = scaleX ? rect.width / scaleX : rect.width;\n const h = scaleY ? rect.height / scaleY : rect.height;\n return {\n width: w,\n height: h,\n top: y,\n right: x + w,\n bottom: y + h,\n left: x\n };\n}\n\nconst defaultOptions = {\n ignoreTransform: false\n};\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n */\n\nfunction getClientRect(element, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n let rect = element.getBoundingClientRect();\n\n if (options.ignoreTransform) {\n const {\n transform,\n transformOrigin\n } = getWindow(element).getComputedStyle(element);\n\n if (transform) {\n rect = inverseTransform(rect, transform, transformOrigin);\n }\n }\n\n const {\n top,\n left,\n width,\n height,\n bottom,\n right\n } = rect;\n return {\n top,\n left,\n width,\n height,\n bottom,\n right\n };\n}\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n *\r\n * @remarks\r\n * The ClientRect returned by this method does not take into account transforms\r\n * applied to the element it measures.\r\n *\r\n */\n\nfunction getTransformAgnosticClientRect(element) {\n return getClientRect(element, {\n ignoreTransform: true\n });\n}\n\nfunction getWindowClientRect(element) {\n const width = element.innerWidth;\n const height = element.innerHeight;\n return {\n top: 0,\n left: 0,\n right: width,\n bottom: height,\n width,\n height\n };\n}\n\nfunction isFixed(node, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(node).getComputedStyle(node);\n }\n\n return computedStyle.position === 'fixed';\n}\n\nfunction isScrollable(element, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(element).getComputedStyle(element);\n }\n\n const overflowRegex = /(auto|scroll|overlay)/;\n const properties = ['overflow', 'overflowX', 'overflowY'];\n return properties.some(property => {\n const value = computedStyle[property];\n return typeof value === 'string' ? overflowRegex.test(value) : false;\n });\n}\n\nfunction getScrollableAncestors(element, limit) {\n const scrollParents = [];\n\n function findScrollableAncestors(node) {\n if (limit != null && scrollParents.length >= limit) {\n return scrollParents;\n }\n\n if (!node) {\n return scrollParents;\n }\n\n if (isDocument(node) && node.scrollingElement != null && !scrollParents.includes(node.scrollingElement)) {\n scrollParents.push(node.scrollingElement);\n return scrollParents;\n }\n\n if (!isHTMLElement(node) || isSVGElement(node)) {\n return scrollParents;\n }\n\n if (scrollParents.includes(node)) {\n return scrollParents;\n }\n\n const computedStyle = getWindow(element).getComputedStyle(node);\n\n if (node !== element) {\n if (isScrollable(node, computedStyle)) {\n scrollParents.push(node);\n }\n }\n\n if (isFixed(node, computedStyle)) {\n return scrollParents;\n }\n\n return findScrollableAncestors(node.parentNode);\n }\n\n if (!element) {\n return scrollParents;\n }\n\n return findScrollableAncestors(element);\n}\nfunction getFirstScrollableAncestor(node) {\n const [firstScrollableAncestor] = getScrollableAncestors(node, 1);\n return firstScrollableAncestor != null ? firstScrollableAncestor : null;\n}\n\nfunction getScrollableElement(element) {\n if (!canUseDOM || !element) {\n return null;\n }\n\n if (isWindow(element)) {\n return element;\n }\n\n if (!isNode(element)) {\n return null;\n }\n\n if (isDocument(element) || element === getOwnerDocument(element).scrollingElement) {\n return window;\n }\n\n if (isHTMLElement(element)) {\n return element;\n }\n\n return null;\n}\n\nfunction getScrollXCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollX;\n }\n\n return element.scrollLeft;\n}\nfunction getScrollYCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollY;\n }\n\n return element.scrollTop;\n}\nfunction getScrollCoordinates(element) {\n return {\n x: getScrollXCoordinate(element),\n y: getScrollYCoordinate(element)\n };\n}\n\nvar Direction;\n\n(function (Direction) {\n Direction[Direction[\"Forward\"] = 1] = \"Forward\";\n Direction[Direction[\"Backward\"] = -1] = \"Backward\";\n})(Direction || (Direction = {}));\n\nfunction isDocumentScrollingElement(element) {\n if (!canUseDOM || !element) {\n return false;\n }\n\n return element === document.scrollingElement;\n}\n\nfunction getScrollPosition(scrollingContainer) {\n const minScroll = {\n x: 0,\n y: 0\n };\n const dimensions = isDocumentScrollingElement(scrollingContainer) ? {\n height: window.innerHeight,\n width: window.innerWidth\n } : {\n height: scrollingContainer.clientHeight,\n width: scrollingContainer.clientWidth\n };\n const maxScroll = {\n x: scrollingContainer.scrollWidth - dimensions.width,\n y: scrollingContainer.scrollHeight - dimensions.height\n };\n const isTop = scrollingContainer.scrollTop <= minScroll.y;\n const isLeft = scrollingContainer.scrollLeft <= minScroll.x;\n const isBottom = scrollingContainer.scrollTop >= maxScroll.y;\n const isRight = scrollingContainer.scrollLeft >= maxScroll.x;\n return {\n isTop,\n isLeft,\n isBottom,\n isRight,\n maxScroll,\n minScroll\n };\n}\n\nconst defaultThreshold = {\n x: 0.2,\n y: 0.2\n};\nfunction getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref, acceleration, thresholdPercentage) {\n let {\n top,\n left,\n right,\n bottom\n } = _ref;\n\n if (acceleration === void 0) {\n acceleration = 10;\n }\n\n if (thresholdPercentage === void 0) {\n thresholdPercentage = defaultThreshold;\n }\n\n const {\n isTop,\n isBottom,\n isLeft,\n isRight\n } = getScrollPosition(scrollContainer);\n const direction = {\n x: 0,\n y: 0\n };\n const speed = {\n x: 0,\n y: 0\n };\n const threshold = {\n height: scrollContainerRect.height * thresholdPercentage.y,\n width: scrollContainerRect.width * thresholdPercentage.x\n };\n\n if (!isTop && top <= scrollContainerRect.top + threshold.height) {\n // Scroll Up\n direction.y = Direction.Backward;\n speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold.height - top) / threshold.height);\n } else if (!isBottom && bottom >= scrollContainerRect.bottom - threshold.height) {\n // Scroll Down\n direction.y = Direction.Forward;\n speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold.height - bottom) / threshold.height);\n }\n\n if (!isRight && right >= scrollContainerRect.right - threshold.width) {\n // Scroll Right\n direction.x = Direction.Forward;\n speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold.width - right) / threshold.width);\n } else if (!isLeft && left <= scrollContainerRect.left + threshold.width) {\n // Scroll Left\n direction.x = Direction.Backward;\n speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold.width - left) / threshold.width);\n }\n\n return {\n direction,\n speed\n };\n}\n\nfunction getScrollElementRect(element) {\n if (element === document.scrollingElement) {\n const {\n innerWidth,\n innerHeight\n } = window;\n return {\n top: 0,\n left: 0,\n right: innerWidth,\n bottom: innerHeight,\n width: innerWidth,\n height: innerHeight\n };\n }\n\n const {\n top,\n left,\n right,\n bottom\n } = element.getBoundingClientRect();\n return {\n top,\n left,\n right,\n bottom,\n width: element.clientWidth,\n height: element.clientHeight\n };\n}\n\nfunction getScrollOffsets(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return add(acc, getScrollCoordinates(node));\n }, defaultCoordinates);\n}\nfunction getScrollXOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollXCoordinate(node);\n }, 0);\n}\nfunction getScrollYOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollYCoordinate(node);\n }, 0);\n}\n\nfunction scrollIntoViewIfNeeded(element, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n if (!element) {\n return;\n }\n\n const {\n top,\n left,\n bottom,\n right\n } = measure(element);\n const firstScrollableAncestor = getFirstScrollableAncestor(element);\n\n if (!firstScrollableAncestor) {\n return;\n }\n\n if (bottom <= 0 || right <= 0 || top >= window.innerHeight || left >= window.innerWidth) {\n element.scrollIntoView({\n block: 'center',\n inline: 'center'\n });\n }\n}\n\nconst properties = [['x', ['left', 'right'], getScrollXOffset], ['y', ['top', 'bottom'], getScrollYOffset]];\nclass Rect {\n constructor(rect, element) {\n this.rect = void 0;\n this.width = void 0;\n this.height = void 0;\n this.top = void 0;\n this.bottom = void 0;\n this.right = void 0;\n this.left = void 0;\n const scrollableAncestors = getScrollableAncestors(element);\n const scrollOffsets = getScrollOffsets(scrollableAncestors);\n this.rect = { ...rect\n };\n this.width = rect.width;\n this.height = rect.height;\n\n for (const [axis, keys, getScrollOffset] of properties) {\n for (const key of keys) {\n Object.defineProperty(this, key, {\n get: () => {\n const currentOffsets = getScrollOffset(scrollableAncestors);\n const scrollOffsetsDeltla = scrollOffsets[axis] - currentOffsets;\n return this.rect[key] + scrollOffsetsDeltla;\n },\n enumerable: true\n });\n }\n }\n\n Object.defineProperty(this, 'rect', {\n enumerable: false\n });\n }\n\n}\n\nclass Listeners {\n constructor(target) {\n this.target = void 0;\n this.listeners = [];\n\n this.removeAll = () => {\n this.listeners.forEach(listener => {\n var _this$target;\n\n return (_this$target = this.target) == null ? void 0 : _this$target.removeEventListener(...listener);\n });\n };\n\n this.target = target;\n }\n\n add(eventName, handler, options) {\n var _this$target2;\n\n (_this$target2 = this.target) == null ? void 0 : _this$target2.addEventListener(eventName, handler, options);\n this.listeners.push([eventName, handler, options]);\n }\n\n}\n\nfunction getEventListenerTarget(target) {\n // If the `event.target` element is removed from the document events will still be targeted\n // at it, and hence won't always bubble up to the window or document anymore.\n // If there is any risk of an element being removed while it is being dragged,\n // the best practice is to attach the event listeners directly to the target.\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget\n const {\n EventTarget\n } = getWindow(target);\n return target instanceof EventTarget ? target : getOwnerDocument(target);\n}\n\nfunction hasExceededDistance(delta, measurement) {\n const dx = Math.abs(delta.x);\n const dy = Math.abs(delta.y);\n\n if (typeof measurement === 'number') {\n return Math.sqrt(dx ** 2 + dy ** 2) > measurement;\n }\n\n if ('x' in measurement && 'y' in measurement) {\n return dx > measurement.x && dy > measurement.y;\n }\n\n if ('x' in measurement) {\n return dx > measurement.x;\n }\n\n if ('y' in measurement) {\n return dy > measurement.y;\n }\n\n return false;\n}\n\nvar EventName;\n\n(function (EventName) {\n EventName[\"Click\"] = \"click\";\n EventName[\"DragStart\"] = \"dragstart\";\n EventName[\"Keydown\"] = \"keydown\";\n EventName[\"ContextMenu\"] = \"contextmenu\";\n EventName[\"Resize\"] = \"resize\";\n EventName[\"SelectionChange\"] = \"selectionchange\";\n EventName[\"VisibilityChange\"] = \"visibilitychange\";\n})(EventName || (EventName = {}));\n\nfunction preventDefault(event) {\n event.preventDefault();\n}\nfunction stopPropagation(event) {\n event.stopPropagation();\n}\n\nvar KeyboardCode;\n\n(function (KeyboardCode) {\n KeyboardCode[\"Space\"] = \"Space\";\n KeyboardCode[\"Down\"] = \"ArrowDown\";\n KeyboardCode[\"Right\"] = \"ArrowRight\";\n KeyboardCode[\"Left\"] = \"ArrowLeft\";\n KeyboardCode[\"Up\"] = \"ArrowUp\";\n KeyboardCode[\"Esc\"] = \"Escape\";\n KeyboardCode[\"Enter\"] = \"Enter\";\n})(KeyboardCode || (KeyboardCode = {}));\n\nconst defaultKeyboardCodes = {\n start: [KeyboardCode.Space, KeyboardCode.Enter],\n cancel: [KeyboardCode.Esc],\n end: [KeyboardCode.Space, KeyboardCode.Enter]\n};\nconst defaultKeyboardCoordinateGetter = (event, _ref) => {\n let {\n currentCoordinates\n } = _ref;\n\n switch (event.code) {\n case KeyboardCode.Right:\n return { ...currentCoordinates,\n x: currentCoordinates.x + 25\n };\n\n case KeyboardCode.Left:\n return { ...currentCoordinates,\n x: currentCoordinates.x - 25\n };\n\n case KeyboardCode.Down:\n return { ...currentCoordinates,\n y: currentCoordinates.y + 25\n };\n\n case KeyboardCode.Up:\n return { ...currentCoordinates,\n y: currentCoordinates.y - 25\n };\n }\n\n return undefined;\n};\n\nclass KeyboardSensor {\n constructor(props) {\n this.props = void 0;\n this.autoScrollEnabled = false;\n this.referenceCoordinates = void 0;\n this.listeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n const {\n event: {\n target\n }\n } = props;\n this.props = props;\n this.listeners = new Listeners(getOwnerDocument(target));\n this.windowListeners = new Listeners(getWindow(target));\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.attach();\n }\n\n attach() {\n this.handleStart();\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n setTimeout(() => this.listeners.add(EventName.Keydown, this.handleKeyDown));\n }\n\n handleStart() {\n const {\n activeNode,\n onStart\n } = this.props;\n const node = activeNode.node.current;\n\n if (node) {\n scrollIntoViewIfNeeded(node);\n }\n\n onStart(defaultCoordinates);\n }\n\n handleKeyDown(event) {\n if (isKeyboardEvent(event)) {\n const {\n active,\n context,\n options\n } = this.props;\n const {\n keyboardCodes = defaultKeyboardCodes,\n coordinateGetter = defaultKeyboardCoordinateGetter,\n scrollBehavior = 'smooth'\n } = options;\n const {\n code\n } = event;\n\n if (keyboardCodes.end.includes(code)) {\n this.handleEnd(event);\n return;\n }\n\n if (keyboardCodes.cancel.includes(code)) {\n this.handleCancel(event);\n return;\n }\n\n const {\n collisionRect\n } = context.current;\n const currentCoordinates = collisionRect ? {\n x: collisionRect.left,\n y: collisionRect.top\n } : defaultCoordinates;\n\n if (!this.referenceCoordinates) {\n this.referenceCoordinates = currentCoordinates;\n }\n\n const newCoordinates = coordinateGetter(event, {\n active,\n context: context.current,\n currentCoordinates\n });\n\n if (newCoordinates) {\n const coordinatesDelta = subtract(newCoordinates, currentCoordinates);\n const scrollDelta = {\n x: 0,\n y: 0\n };\n const {\n scrollableAncestors\n } = context.current;\n\n for (const scrollContainer of scrollableAncestors) {\n const direction = event.code;\n const {\n isTop,\n isRight,\n isLeft,\n isBottom,\n maxScroll,\n minScroll\n } = getScrollPosition(scrollContainer);\n const scrollElementRect = getScrollElementRect(scrollContainer);\n const clampedCoordinates = {\n x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),\n y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))\n };\n const canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft;\n const canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop;\n\n if (canScrollX && clampedCoordinates.x !== newCoordinates.x) {\n const newScrollCoordinates = scrollContainer.scrollLeft + coordinatesDelta.x;\n const canScrollToNewCoordinates = direction === KeyboardCode.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode.Left && newScrollCoordinates >= minScroll.x;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.y) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n left: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.x = scrollContainer.scrollLeft - newScrollCoordinates;\n } else {\n scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;\n }\n\n if (scrollDelta.x) {\n scrollContainer.scrollBy({\n left: -scrollDelta.x,\n behavior: scrollBehavior\n });\n }\n\n break;\n } else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) {\n const newScrollCoordinates = scrollContainer.scrollTop + coordinatesDelta.y;\n const canScrollToNewCoordinates = direction === KeyboardCode.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode.Up && newScrollCoordinates >= minScroll.y;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.x) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n top: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.y = scrollContainer.scrollTop - newScrollCoordinates;\n } else {\n scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;\n }\n\n if (scrollDelta.y) {\n scrollContainer.scrollBy({\n top: -scrollDelta.y,\n behavior: scrollBehavior\n });\n }\n\n break;\n }\n }\n\n this.handleMove(event, add(subtract(newCoordinates, this.referenceCoordinates), scrollDelta));\n }\n }\n }\n\n handleMove(event, coordinates) {\n const {\n onMove\n } = this.props;\n event.preventDefault();\n onMove(coordinates);\n }\n\n handleEnd(event) {\n const {\n onEnd\n } = this.props;\n event.preventDefault();\n this.detach();\n onEnd();\n }\n\n handleCancel(event) {\n const {\n onCancel\n } = this.props;\n event.preventDefault();\n this.detach();\n onCancel();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll();\n }\n\n}\nKeyboardSensor.activators = [{\n eventName: 'onKeyDown',\n handler: (event, _ref, _ref2) => {\n let {\n keyboardCodes = defaultKeyboardCodes,\n onActivation\n } = _ref;\n let {\n active\n } = _ref2;\n const {\n code\n } = event.nativeEvent;\n\n if (keyboardCodes.start.includes(code)) {\n const activator = active.activatorNode.current;\n\n if (activator && event.target !== activator) {\n return false;\n }\n\n event.preventDefault();\n onActivation == null ? void 0 : onActivation({\n event: event.nativeEvent\n });\n return true;\n }\n\n return false;\n }\n}];\n\nfunction isDistanceConstraint(constraint) {\n return Boolean(constraint && 'distance' in constraint);\n}\n\nfunction isDelayConstraint(constraint) {\n return Boolean(constraint && 'delay' in constraint);\n}\n\nclass AbstractPointerSensor {\n constructor(props, events, listenerTarget) {\n var _getEventCoordinates;\n\n if (listenerTarget === void 0) {\n listenerTarget = getEventListenerTarget(props.event.target);\n }\n\n this.props = void 0;\n this.events = void 0;\n this.autoScrollEnabled = true;\n this.document = void 0;\n this.activated = false;\n this.initialCoordinates = void 0;\n this.timeoutId = null;\n this.listeners = void 0;\n this.documentListeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n this.events = events;\n const {\n event\n } = props;\n const {\n target\n } = event;\n this.props = props;\n this.events = events;\n this.document = getOwnerDocument(target);\n this.documentListeners = new Listeners(this.document);\n this.listeners = new Listeners(listenerTarget);\n this.windowListeners = new Listeners(getWindow(target));\n this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates;\n this.handleStart = this.handleStart.bind(this);\n this.handleMove = this.handleMove.bind(this);\n this.handleEnd = this.handleEnd.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.handleKeydown = this.handleKeydown.bind(this);\n this.removeTextSelection = this.removeTextSelection.bind(this);\n this.attach();\n }\n\n attach() {\n const {\n events,\n props: {\n options: {\n activationConstraint,\n bypassActivationConstraint\n }\n }\n } = this;\n this.listeners.add(events.move.name, this.handleMove, {\n passive: false\n });\n this.listeners.add(events.end.name, this.handleEnd);\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.DragStart, preventDefault);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n this.windowListeners.add(EventName.ContextMenu, preventDefault);\n this.documentListeners.add(EventName.Keydown, this.handleKeydown);\n\n if (activationConstraint) {\n if (bypassActivationConstraint != null && bypassActivationConstraint({\n event: this.props.event,\n activeNode: this.props.activeNode,\n options: this.props.options\n })) {\n return this.handleStart();\n }\n\n if (isDelayConstraint(activationConstraint)) {\n this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);\n return;\n }\n\n if (isDistanceConstraint(activationConstraint)) {\n return;\n }\n }\n\n this.handleStart();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll(); // Wait until the next event loop before removing document listeners\n // This is necessary because we listen for `click` and `selection` events on the document\n\n setTimeout(this.documentListeners.removeAll, 50);\n\n if (this.timeoutId !== null) {\n clearTimeout(this.timeoutId);\n this.timeoutId = null;\n }\n }\n\n handleStart() {\n const {\n initialCoordinates\n } = this;\n const {\n onStart\n } = this.props;\n\n if (initialCoordinates) {\n this.activated = true; // Stop propagation of click events once activation constraints are met\n\n this.documentListeners.add(EventName.Click, stopPropagation, {\n capture: true\n }); // Remove any text selection from the document\n\n this.removeTextSelection(); // Prevent further text selection while dragging\n\n this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection);\n onStart(initialCoordinates);\n }\n }\n\n handleMove(event) {\n var _getEventCoordinates2;\n\n const {\n activated,\n initialCoordinates,\n props\n } = this;\n const {\n onMove,\n options: {\n activationConstraint\n }\n } = props;\n\n if (!initialCoordinates) {\n return;\n }\n\n const coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates;\n const delta = subtract(initialCoordinates, coordinates); // Constraint validation\n\n if (!activated && activationConstraint) {\n if (isDistanceConstraint(activationConstraint)) {\n if (activationConstraint.tolerance != null && hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n\n if (hasExceededDistance(delta, activationConstraint.distance)) {\n return this.handleStart();\n }\n }\n\n if (isDelayConstraint(activationConstraint)) {\n if (hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n }\n\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n onMove(coordinates);\n }\n\n handleEnd() {\n const {\n onEnd\n } = this.props;\n this.detach();\n onEnd();\n }\n\n handleCancel() {\n const {\n onCancel\n } = this.props;\n this.detach();\n onCancel();\n }\n\n handleKeydown(event) {\n if (event.code === KeyboardCode.Esc) {\n this.handleCancel();\n }\n }\n\n removeTextSelection() {\n var _this$document$getSel;\n\n (_this$document$getSel = this.document.getSelection()) == null ? void 0 : _this$document$getSel.removeAllRanges();\n }\n\n}\n\nconst events = {\n move: {\n name: 'pointermove'\n },\n end: {\n name: 'pointerup'\n }\n};\nclass PointerSensor extends AbstractPointerSensor {\n constructor(props) {\n const {\n event\n } = props; // Pointer events stop firing if the target is unmounted while dragging\n // Therefore we attach listeners to the owner document instead\n\n const listenerTarget = getOwnerDocument(event.target);\n super(props, events, listenerTarget);\n }\n\n}\nPointerSensor.activators = [{\n eventName: 'onPointerDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (!event.isPrimary || event.button !== 0) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$1 = {\n move: {\n name: 'mousemove'\n },\n end: {\n name: 'mouseup'\n }\n};\nvar MouseButton;\n\n(function (MouseButton) {\n MouseButton[MouseButton[\"RightClick\"] = 2] = \"RightClick\";\n})(MouseButton || (MouseButton = {}));\n\nclass MouseSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$1, getOwnerDocument(props.event.target));\n }\n\n}\nMouseSensor.activators = [{\n eventName: 'onMouseDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (event.button === MouseButton.RightClick) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$2 = {\n move: {\n name: 'touchmove'\n },\n end: {\n name: 'touchend'\n }\n};\nclass TouchSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$2);\n }\n\n static setup() {\n // Adding a non-capture and non-passive `touchmove` listener in order\n // to force `event.preventDefault()` calls to work in dynamically added\n // touchmove event handlers. This is required for iOS Safari.\n window.addEventListener(events$2.move.name, noop, {\n capture: false,\n passive: false\n });\n return function teardown() {\n window.removeEventListener(events$2.move.name, noop);\n }; // We create a new handler because the teardown function of another sensor\n // could remove our event listener if we use a referentially equal listener.\n\n function noop() {}\n }\n\n}\nTouchSensor.activators = [{\n eventName: 'onTouchStart',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n const {\n touches\n } = event;\n\n if (touches.length > 1) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nvar AutoScrollActivator;\n\n(function (AutoScrollActivator) {\n AutoScrollActivator[AutoScrollActivator[\"Pointer\"] = 0] = \"Pointer\";\n AutoScrollActivator[AutoScrollActivator[\"DraggableRect\"] = 1] = \"DraggableRect\";\n})(AutoScrollActivator || (AutoScrollActivator = {}));\n\nvar TraversalOrder;\n\n(function (TraversalOrder) {\n TraversalOrder[TraversalOrder[\"TreeOrder\"] = 0] = \"TreeOrder\";\n TraversalOrder[TraversalOrder[\"ReversedTreeOrder\"] = 1] = \"ReversedTreeOrder\";\n})(TraversalOrder || (TraversalOrder = {}));\n\nfunction useAutoScroller(_ref) {\n let {\n acceleration,\n activator = AutoScrollActivator.Pointer,\n canScroll,\n draggingRect,\n enabled,\n interval = 5,\n order = TraversalOrder.TreeOrder,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects,\n delta,\n threshold\n } = _ref;\n const scrollIntent = useScrollIntent({\n delta,\n disabled: !enabled\n });\n const [setAutoScrollInterval, clearAutoScrollInterval] = useInterval();\n const scrollSpeed = useRef({\n x: 0,\n y: 0\n });\n const scrollDirection = useRef({\n x: 0,\n y: 0\n });\n const rect = useMemo(() => {\n switch (activator) {\n case AutoScrollActivator.Pointer:\n return pointerCoordinates ? {\n top: pointerCoordinates.y,\n bottom: pointerCoordinates.y,\n left: pointerCoordinates.x,\n right: pointerCoordinates.x\n } : null;\n\n case AutoScrollActivator.DraggableRect:\n return draggingRect;\n }\n }, [activator, draggingRect, pointerCoordinates]);\n const scrollContainerRef = useRef(null);\n const autoScroll = useCallback(() => {\n const scrollContainer = scrollContainerRef.current;\n\n if (!scrollContainer) {\n return;\n }\n\n const scrollLeft = scrollSpeed.current.x * scrollDirection.current.x;\n const scrollTop = scrollSpeed.current.y * scrollDirection.current.y;\n scrollContainer.scrollBy(scrollLeft, scrollTop);\n }, []);\n const sortedScrollableAncestors = useMemo(() => order === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order, scrollableAncestors]);\n useEffect(() => {\n if (!enabled || !scrollableAncestors.length || !rect) {\n clearAutoScrollInterval();\n return;\n }\n\n for (const scrollContainer of sortedScrollableAncestors) {\n if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) {\n continue;\n }\n\n const index = scrollableAncestors.indexOf(scrollContainer);\n const scrollContainerRect = scrollableAncestorRects[index];\n\n if (!scrollContainerRect) {\n continue;\n }\n\n const {\n direction,\n speed\n } = getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, rect, acceleration, threshold);\n\n for (const axis of ['x', 'y']) {\n if (!scrollIntent[axis][direction[axis]]) {\n speed[axis] = 0;\n direction[axis] = 0;\n }\n }\n\n if (speed.x > 0 || speed.y > 0) {\n clearAutoScrollInterval();\n scrollContainerRef.current = scrollContainer;\n setAutoScrollInterval(autoScroll, interval);\n scrollSpeed.current = speed;\n scrollDirection.current = direction;\n return;\n }\n }\n\n scrollSpeed.current = {\n x: 0,\n y: 0\n };\n scrollDirection.current = {\n x: 0,\n y: 0\n };\n clearAutoScrollInterval();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [acceleration, autoScroll, canScroll, clearAutoScrollInterval, enabled, interval, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(rect), // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(scrollIntent), setAutoScrollInterval, scrollableAncestors, sortedScrollableAncestors, scrollableAncestorRects, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold)]);\n}\nconst defaultScrollIntent = {\n x: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n },\n y: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n }\n};\n\nfunction useScrollIntent(_ref2) {\n let {\n delta,\n disabled\n } = _ref2;\n const previousDelta = usePrevious(delta);\n return useLazyMemo(previousIntent => {\n if (disabled || !previousDelta || !previousIntent) {\n // Reset scroll intent tracking when auto-scrolling is disabled\n return defaultScrollIntent;\n }\n\n const direction = {\n x: Math.sign(delta.x - previousDelta.x),\n y: Math.sign(delta.y - previousDelta.y)\n }; // Keep track of the user intent to scroll in each direction for both axis\n\n return {\n x: {\n [Direction.Backward]: previousIntent.x[Direction.Backward] || direction.x === -1,\n [Direction.Forward]: previousIntent.x[Direction.Forward] || direction.x === 1\n },\n y: {\n [Direction.Backward]: previousIntent.y[Direction.Backward] || direction.y === -1,\n [Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1\n }\n };\n }, [disabled, delta, previousDelta]);\n}\n\nfunction useCachedNode(draggableNodes, id) {\n const draggableNode = id !== null ? draggableNodes.get(id) : undefined;\n const node = draggableNode ? draggableNode.node.current : null;\n return useLazyMemo(cachedNode => {\n var _ref;\n\n if (id === null) {\n return null;\n } // In some cases, the draggable node can unmount while dragging\n // This is the case for virtualized lists. In those situations,\n // we fall back to the last known value for that node.\n\n\n return (_ref = node != null ? node : cachedNode) != null ? _ref : null;\n }, [node, id]);\n}\n\nfunction useCombineActivators(sensors, getSyntheticHandler) {\n return useMemo(() => sensors.reduce((accumulator, sensor) => {\n const {\n sensor: Sensor\n } = sensor;\n const sensorActivators = Sensor.activators.map(activator => ({\n eventName: activator.eventName,\n handler: getSyntheticHandler(activator.handler, sensor)\n }));\n return [...accumulator, ...sensorActivators];\n }, []), [sensors, getSyntheticHandler]);\n}\n\nvar MeasuringStrategy;\n\n(function (MeasuringStrategy) {\n MeasuringStrategy[MeasuringStrategy[\"Always\"] = 0] = \"Always\";\n MeasuringStrategy[MeasuringStrategy[\"BeforeDragging\"] = 1] = \"BeforeDragging\";\n MeasuringStrategy[MeasuringStrategy[\"WhileDragging\"] = 2] = \"WhileDragging\";\n})(MeasuringStrategy || (MeasuringStrategy = {}));\n\nvar MeasuringFrequency;\n\n(function (MeasuringFrequency) {\n MeasuringFrequency[\"Optimized\"] = \"optimized\";\n})(MeasuringFrequency || (MeasuringFrequency = {}));\n\nconst defaultValue = /*#__PURE__*/new Map();\nfunction useDroppableMeasuring(containers, _ref) {\n let {\n dragging,\n dependencies,\n config\n } = _ref;\n const [queue, setQueue] = useState(null);\n const {\n frequency,\n measure,\n strategy\n } = config;\n const containersRef = useRef(containers);\n const disabled = isDisabled();\n const disabledRef = useLatestValue(disabled);\n const measureDroppableContainers = useCallback(function (ids) {\n if (ids === void 0) {\n ids = [];\n }\n\n if (disabledRef.current) {\n return;\n }\n\n setQueue(value => {\n if (value === null) {\n return ids;\n }\n\n return value.concat(ids.filter(id => !value.includes(id)));\n });\n }, [disabledRef]);\n const timeoutId = useRef(null);\n const droppableRects = useLazyMemo(previousValue => {\n if (disabled && !dragging) {\n return defaultValue;\n }\n\n if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || queue != null) {\n const map = new Map();\n\n for (let container of containers) {\n if (!container) {\n continue;\n }\n\n if (queue && queue.length > 0 && !queue.includes(container.id) && container.rect.current) {\n // This container does not need to be re-measured\n map.set(container.id, container.rect.current);\n continue;\n }\n\n const node = container.node.current;\n const rect = node ? new Rect(measure(node), node) : null;\n container.rect.current = rect;\n\n if (rect) {\n map.set(container.id, rect);\n }\n }\n\n return map;\n }\n\n return previousValue;\n }, [containers, queue, dragging, disabled, measure]);\n useEffect(() => {\n containersRef.current = containers;\n }, [containers]);\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n measureDroppableContainers();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [dragging, disabled]);\n useEffect(() => {\n if (queue && queue.length > 0) {\n setQueue(null);\n }\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [JSON.stringify(queue)]);\n useEffect(() => {\n if (disabled || typeof frequency !== 'number' || timeoutId.current !== null) {\n return;\n }\n\n timeoutId.current = setTimeout(() => {\n measureDroppableContainers();\n timeoutId.current = null;\n }, frequency);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [frequency, disabled, measureDroppableContainers, ...dependencies]);\n return {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled: queue != null\n };\n\n function isDisabled() {\n switch (strategy) {\n case MeasuringStrategy.Always:\n return false;\n\n case MeasuringStrategy.BeforeDragging:\n return dragging;\n\n default:\n return !dragging;\n }\n }\n}\n\nfunction useInitialValue(value, computeFn) {\n return useLazyMemo(previousValue => {\n if (!value) {\n return null;\n }\n\n if (previousValue) {\n return previousValue;\n }\n\n return typeof computeFn === 'function' ? computeFn(value) : value;\n }, [computeFn, value]);\n}\n\nfunction useInitialRect(node, measure) {\n return useInitialValue(node, measure);\n}\n\n/**\r\n * Returns a new MutationObserver instance.\r\n * If `MutationObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useMutationObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleMutations = useEvent(callback);\n const mutationObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.MutationObserver === 'undefined') {\n return undefined;\n }\n\n const {\n MutationObserver\n } = window;\n return new MutationObserver(handleMutations);\n }, [handleMutations, disabled]);\n useEffect(() => {\n return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }, [mutationObserver]);\n return mutationObserver;\n}\n\n/**\r\n * Returns a new ResizeObserver instance bound to the `onResize` callback.\r\n * If `ResizeObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useResizeObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleResize = useEvent(callback);\n const resizeObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.ResizeObserver === 'undefined') {\n return undefined;\n }\n\n const {\n ResizeObserver\n } = window;\n return new ResizeObserver(handleResize);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [disabled]);\n useEffect(() => {\n return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();\n }, [resizeObserver]);\n return resizeObserver;\n}\n\nfunction defaultMeasure(element) {\n return new Rect(getClientRect(element), element);\n}\n\nfunction useRect(element, measure, fallbackRect) {\n if (measure === void 0) {\n measure = defaultMeasure;\n }\n\n const [rect, measureRect] = useReducer(reducer, null);\n const mutationObserver = useMutationObserver({\n callback(records) {\n if (!element) {\n return;\n }\n\n for (const record of records) {\n const {\n type,\n target\n } = record;\n\n if (type === 'childList' && target instanceof HTMLElement && target.contains(element)) {\n measureRect();\n break;\n }\n }\n }\n\n });\n const resizeObserver = useResizeObserver({\n callback: measureRect\n });\n useIsomorphicLayoutEffect(() => {\n measureRect();\n\n if (element) {\n resizeObserver == null ? void 0 : resizeObserver.observe(element);\n mutationObserver == null ? void 0 : mutationObserver.observe(document.body, {\n childList: true,\n subtree: true\n });\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }\n }, [element]);\n return rect;\n\n function reducer(currentRect) {\n if (!element) {\n return null;\n }\n\n if (element.isConnected === false) {\n var _ref;\n\n // Fall back to last rect we measured if the element is\n // no longer connected to the DOM.\n return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;\n }\n\n const newRect = measure(element);\n\n if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {\n return currentRect;\n }\n\n return newRect;\n }\n}\n\nfunction useRectDelta(rect) {\n const initialRect = useInitialValue(rect);\n return getRectDelta(rect, initialRect);\n}\n\nconst defaultValue$1 = [];\nfunction useScrollableAncestors(node) {\n const previousNode = useRef(node);\n const ancestors = useLazyMemo(previousValue => {\n if (!node) {\n return defaultValue$1;\n }\n\n if (previousValue && previousValue !== defaultValue$1 && node && previousNode.current && node.parentNode === previousNode.current.parentNode) {\n return previousValue;\n }\n\n return getScrollableAncestors(node);\n }, [node]);\n useEffect(() => {\n previousNode.current = node;\n }, [node]);\n return ancestors;\n}\n\nfunction useScrollOffsets(elements) {\n const [scrollCoordinates, setScrollCoordinates] = useState(null);\n const prevElements = useRef(elements); // To-do: Throttle the handleScroll callback\n\n const handleScroll = useCallback(event => {\n const scrollingElement = getScrollableElement(event.target);\n\n if (!scrollingElement) {\n return;\n }\n\n setScrollCoordinates(scrollCoordinates => {\n if (!scrollCoordinates) {\n return null;\n }\n\n scrollCoordinates.set(scrollingElement, getScrollCoordinates(scrollingElement));\n return new Map(scrollCoordinates);\n });\n }, []);\n useEffect(() => {\n const previousElements = prevElements.current;\n\n if (elements !== previousElements) {\n cleanup(previousElements);\n const entries = elements.map(element => {\n const scrollableElement = getScrollableElement(element);\n\n if (scrollableElement) {\n scrollableElement.addEventListener('scroll', handleScroll, {\n passive: true\n });\n return [scrollableElement, getScrollCoordinates(scrollableElement)];\n }\n\n return null;\n }).filter(entry => entry != null);\n setScrollCoordinates(entries.length ? new Map(entries) : null);\n prevElements.current = elements;\n }\n\n return () => {\n cleanup(elements);\n cleanup(previousElements);\n };\n\n function cleanup(elements) {\n elements.forEach(element => {\n const scrollableElement = getScrollableElement(element);\n scrollableElement == null ? void 0 : scrollableElement.removeEventListener('scroll', handleScroll);\n });\n }\n }, [handleScroll, elements]);\n return useMemo(() => {\n if (elements.length) {\n return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => add(acc, coordinates), defaultCoordinates) : getScrollOffsets(elements);\n }\n\n return defaultCoordinates;\n }, [elements, scrollCoordinates]);\n}\n\nfunction useScrollOffsetsDelta(scrollOffsets, dependencies) {\n if (dependencies === void 0) {\n dependencies = [];\n }\n\n const initialScrollOffsets = useRef(null);\n useEffect(() => {\n initialScrollOffsets.current = null;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n dependencies);\n useEffect(() => {\n const hasScrollOffsets = scrollOffsets !== defaultCoordinates;\n\n if (hasScrollOffsets && !initialScrollOffsets.current) {\n initialScrollOffsets.current = scrollOffsets;\n }\n\n if (!hasScrollOffsets && initialScrollOffsets.current) {\n initialScrollOffsets.current = null;\n }\n }, [scrollOffsets]);\n return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates;\n}\n\nfunction useSensorSetup(sensors) {\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n const teardownFns = sensors.map(_ref => {\n let {\n sensor\n } = _ref;\n return sensor.setup == null ? void 0 : sensor.setup();\n });\n return () => {\n for (const teardown of teardownFns) {\n teardown == null ? void 0 : teardown();\n }\n };\n }, // TO-DO: Sensors length could theoretically change which would not be a valid dependency\n // eslint-disable-next-line react-hooks/exhaustive-deps\n sensors.map(_ref2 => {\n let {\n sensor\n } = _ref2;\n return sensor;\n }));\n}\n\nfunction useSyntheticListeners(listeners, id) {\n return useMemo(() => {\n return listeners.reduce((acc, _ref) => {\n let {\n eventName,\n handler\n } = _ref;\n\n acc[eventName] = event => {\n handler(event, id);\n };\n\n return acc;\n }, {});\n }, [listeners, id]);\n}\n\nfunction useWindowRect(element) {\n return useMemo(() => element ? getWindowClientRect(element) : null, [element]);\n}\n\nconst defaultValue$2 = [];\nfunction useRects(elements, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n const [firstElement] = elements;\n const windowRect = useWindowRect(firstElement ? getWindow(firstElement) : null);\n const [rects, measureRects] = useReducer(reducer, defaultValue$2);\n const resizeObserver = useResizeObserver({\n callback: measureRects\n });\n\n if (elements.length > 0 && rects === defaultValue$2) {\n measureRects();\n }\n\n useIsomorphicLayoutEffect(() => {\n if (elements.length) {\n elements.forEach(element => resizeObserver == null ? void 0 : resizeObserver.observe(element));\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n measureRects();\n }\n }, [elements]);\n return rects;\n\n function reducer() {\n if (!elements.length) {\n return defaultValue$2;\n }\n\n return elements.map(element => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));\n }\n}\n\nfunction getMeasurableNode(node) {\n if (!node) {\n return null;\n }\n\n if (node.children.length > 1) {\n return node;\n }\n\n const firstChild = node.children[0];\n return isHTMLElement(firstChild) ? firstChild : node;\n}\n\nfunction useDragOverlayMeasuring(_ref) {\n let {\n measure\n } = _ref;\n const [rect, setRect] = useState(null);\n const handleResize = useCallback(entries => {\n for (const {\n target\n } of entries) {\n if (isHTMLElement(target)) {\n setRect(rect => {\n const newRect = measure(target);\n return rect ? { ...rect,\n width: newRect.width,\n height: newRect.height\n } : newRect;\n });\n break;\n }\n }\n }, [measure]);\n const resizeObserver = useResizeObserver({\n callback: handleResize\n });\n const handleNodeChange = useCallback(element => {\n const node = getMeasurableNode(element);\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n\n if (node) {\n resizeObserver == null ? void 0 : resizeObserver.observe(node);\n }\n\n setRect(node ? measure(node) : null);\n }, [measure, resizeObserver]);\n const [nodeRef, setRef] = useNodeRef(handleNodeChange);\n return useMemo(() => ({\n nodeRef,\n rect,\n setRef\n }), [rect, nodeRef, setRef]);\n}\n\nconst defaultSensors = [{\n sensor: PointerSensor,\n options: {}\n}, {\n sensor: KeyboardSensor,\n options: {}\n}];\nconst defaultData = {\n current: {}\n};\nconst defaultMeasuringConfiguration = {\n draggable: {\n measure: getTransformAgnosticClientRect\n },\n droppable: {\n measure: getTransformAgnosticClientRect,\n strategy: MeasuringStrategy.WhileDragging,\n frequency: MeasuringFrequency.Optimized\n },\n dragOverlay: {\n measure: getClientRect\n }\n};\n\nclass DroppableContainersMap extends Map {\n get(id) {\n var _super$get;\n\n return id != null ? (_super$get = super.get(id)) != null ? _super$get : undefined : undefined;\n }\n\n toArray() {\n return Array.from(this.values());\n }\n\n getEnabled() {\n return this.toArray().filter(_ref => {\n let {\n disabled\n } = _ref;\n return !disabled;\n });\n }\n\n getNodeFor(id) {\n var _this$get$node$curren, _this$get;\n\n return (_this$get$node$curren = (_this$get = this.get(id)) == null ? void 0 : _this$get.node.current) != null ? _this$get$node$curren : undefined;\n }\n\n}\n\nconst defaultPublicContext = {\n activatorEvent: null,\n active: null,\n activeNode: null,\n activeNodeRect: null,\n collisions: null,\n containerNodeRect: null,\n draggableNodes: /*#__PURE__*/new Map(),\n droppableRects: /*#__PURE__*/new Map(),\n droppableContainers: /*#__PURE__*/new DroppableContainersMap(),\n over: null,\n dragOverlay: {\n nodeRef: {\n current: null\n },\n rect: null,\n setRef: noop\n },\n scrollableAncestors: [],\n scrollableAncestorRects: [],\n measuringConfiguration: defaultMeasuringConfiguration,\n measureDroppableContainers: noop,\n windowRect: null,\n measuringScheduled: false\n};\nconst defaultInternalContext = {\n activatorEvent: null,\n activators: [],\n active: null,\n activeNodeRect: null,\n ariaDescribedById: {\n draggable: ''\n },\n dispatch: noop,\n draggableNodes: /*#__PURE__*/new Map(),\n over: null,\n measureDroppableContainers: noop\n};\nconst InternalContext = /*#__PURE__*/createContext(defaultInternalContext);\nconst PublicContext = /*#__PURE__*/createContext(defaultPublicContext);\n\nfunction getInitialState() {\n return {\n draggable: {\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n nodes: new Map(),\n translate: {\n x: 0,\n y: 0\n }\n },\n droppable: {\n containers: new DroppableContainersMap()\n }\n };\n}\nfunction reducer(state, action) {\n switch (action.type) {\n case Action.DragStart:\n return { ...state,\n draggable: { ...state.draggable,\n initialCoordinates: action.initialCoordinates,\n active: action.active\n }\n };\n\n case Action.DragMove:\n if (!state.draggable.active) {\n return state;\n }\n\n return { ...state,\n draggable: { ...state.draggable,\n translate: {\n x: action.coordinates.x - state.draggable.initialCoordinates.x,\n y: action.coordinates.y - state.draggable.initialCoordinates.y\n }\n }\n };\n\n case Action.DragEnd:\n case Action.DragCancel:\n return { ...state,\n draggable: { ...state.draggable,\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n translate: {\n x: 0,\n y: 0\n }\n }\n };\n\n case Action.RegisterDroppable:\n {\n const {\n element\n } = action;\n const {\n id\n } = element;\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, element);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.SetDroppableDisabled:\n {\n const {\n id,\n key,\n disabled\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, { ...element,\n disabled\n });\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.UnregisterDroppable:\n {\n const {\n id,\n key\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.delete(id);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nfunction RestoreFocus(_ref) {\n let {\n disabled\n } = _ref;\n const {\n active,\n activatorEvent,\n draggableNodes\n } = useContext(InternalContext);\n const previousActivatorEvent = usePrevious(activatorEvent);\n const previousActiveId = usePrevious(active == null ? void 0 : active.id); // Restore keyboard focus on the activator node\n\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n if (!activatorEvent && previousActivatorEvent && previousActiveId != null) {\n if (!isKeyboardEvent(previousActivatorEvent)) {\n return;\n }\n\n if (document.activeElement === previousActivatorEvent.target) {\n // No need to restore focus\n return;\n }\n\n const draggableNode = draggableNodes.get(previousActiveId);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n activatorNode,\n node\n } = draggableNode;\n\n if (!activatorNode.current && !node.current) {\n return;\n }\n\n requestAnimationFrame(() => {\n for (const element of [activatorNode.current, node.current]) {\n if (!element) {\n continue;\n }\n\n const focusableNode = findFirstFocusableNode(element);\n\n if (focusableNode) {\n focusableNode.focus();\n break;\n }\n }\n });\n }\n }, [activatorEvent, disabled, draggableNodes, previousActiveId, previousActivatorEvent]);\n return null;\n}\n\nfunction applyModifiers(modifiers, _ref) {\n let {\n transform,\n ...args\n } = _ref;\n return modifiers != null && modifiers.length ? modifiers.reduce((accumulator, modifier) => {\n return modifier({\n transform: accumulator,\n ...args\n });\n }, transform) : transform;\n}\n\nfunction useMeasuringConfiguration(config) {\n return useMemo(() => ({\n draggable: { ...defaultMeasuringConfiguration.draggable,\n ...(config == null ? void 0 : config.draggable)\n },\n droppable: { ...defaultMeasuringConfiguration.droppable,\n ...(config == null ? void 0 : config.droppable)\n },\n dragOverlay: { ...defaultMeasuringConfiguration.dragOverlay,\n ...(config == null ? void 0 : config.dragOverlay)\n }\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [config == null ? void 0 : config.draggable, config == null ? void 0 : config.droppable, config == null ? void 0 : config.dragOverlay]);\n}\n\nfunction useLayoutShiftScrollCompensation(_ref) {\n let {\n activeNode,\n measure,\n initialRect,\n config = true\n } = _ref;\n const initialized = useRef(false);\n const {\n x,\n y\n } = typeof config === 'boolean' ? {\n x: config,\n y: config\n } : config;\n useIsomorphicLayoutEffect(() => {\n const disabled = !x && !y;\n\n if (disabled || !activeNode) {\n initialized.current = false;\n return;\n }\n\n if (initialized.current || !initialRect) {\n // Return early if layout shift scroll compensation was already attempted\n // or if there is no initialRect to compare to.\n return;\n } // Get the most up to date node ref for the active draggable\n\n\n const node = activeNode == null ? void 0 : activeNode.node.current;\n\n if (!node || node.isConnected === false) {\n // Return early if there is no attached node ref or if the node is\n // disconnected from the document.\n return;\n }\n\n const rect = measure(node);\n const rectDelta = getRectDelta(rect, initialRect);\n\n if (!x) {\n rectDelta.x = 0;\n }\n\n if (!y) {\n rectDelta.y = 0;\n } // Only perform layout shift scroll compensation once\n\n\n initialized.current = true;\n\n if (Math.abs(rectDelta.x) > 0 || Math.abs(rectDelta.y) > 0) {\n const firstScrollableAncestor = getFirstScrollableAncestor(node);\n\n if (firstScrollableAncestor) {\n firstScrollableAncestor.scrollBy({\n top: rectDelta.y,\n left: rectDelta.x\n });\n }\n }\n }, [activeNode, x, y, initialRect, measure]);\n}\n\nconst ActiveDraggableContext = /*#__PURE__*/createContext({ ...defaultCoordinates,\n scaleX: 1,\n scaleY: 1\n});\nvar Status;\n\n(function (Status) {\n Status[Status[\"Uninitialized\"] = 0] = \"Uninitialized\";\n Status[Status[\"Initializing\"] = 1] = \"Initializing\";\n Status[Status[\"Initialized\"] = 2] = \"Initialized\";\n})(Status || (Status = {}));\n\nconst DndContext = /*#__PURE__*/memo(function DndContext(_ref) {\n var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;\n\n let {\n id,\n accessibility,\n autoScroll = true,\n children,\n sensors = defaultSensors,\n collisionDetection = rectIntersection,\n measuring,\n modifiers,\n ...props\n } = _ref;\n const store = useReducer(reducer, undefined, getInitialState);\n const [state, dispatch] = store;\n const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();\n const [status, setStatus] = useState(Status.Uninitialized);\n const isInitialized = status === Status.Initialized;\n const {\n draggable: {\n active: activeId,\n nodes: draggableNodes,\n translate\n },\n droppable: {\n containers: droppableContainers\n }\n } = state;\n const node = activeId ? draggableNodes.get(activeId) : null;\n const activeRects = useRef({\n initial: null,\n translated: null\n });\n const active = useMemo(() => {\n var _node$data;\n\n return activeId != null ? {\n id: activeId,\n // It's possible for the active node to unmount while dragging\n data: (_node$data = node == null ? void 0 : node.data) != null ? _node$data : defaultData,\n rect: activeRects\n } : null;\n }, [activeId, node]);\n const activeRef = useRef(null);\n const [activeSensor, setActiveSensor] = useState(null);\n const [activatorEvent, setActivatorEvent] = useState(null);\n const latestProps = useLatestValue(props, Object.values(props));\n const draggableDescribedById = useUniqueId(\"DndDescribedBy\", id);\n const enabledDroppableContainers = useMemo(() => droppableContainers.getEnabled(), [droppableContainers]);\n const measuringConfiguration = useMeasuringConfiguration(measuring);\n const {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled\n } = useDroppableMeasuring(enabledDroppableContainers, {\n dragging: isInitialized,\n dependencies: [translate.x, translate.y],\n config: measuringConfiguration.droppable\n });\n const activeNode = useCachedNode(draggableNodes, activeId);\n const activationCoordinates = useMemo(() => activatorEvent ? getEventCoordinates(activatorEvent) : null, [activatorEvent]);\n const autoScrollOptions = getAutoScrollerOptions();\n const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure);\n useLayoutShiftScrollCompensation({\n activeNode: activeId ? draggableNodes.get(activeId) : null,\n config: autoScrollOptions.layoutShiftCompensation,\n initialRect: initialActiveNodeRect,\n measure: measuringConfiguration.draggable.measure\n });\n const activeNodeRect = useRect(activeNode, measuringConfiguration.draggable.measure, initialActiveNodeRect);\n const containerNodeRect = useRect(activeNode ? activeNode.parentElement : null);\n const sensorContext = useRef({\n activatorEvent: null,\n active: null,\n activeNode,\n collisionRect: null,\n collisions: null,\n droppableRects,\n draggableNodes,\n draggingNode: null,\n draggingNodeRect: null,\n droppableContainers,\n over: null,\n scrollableAncestors: [],\n scrollAdjustedTranslate: null\n });\n const overNode = droppableContainers.getNodeFor((_sensorContext$curren = sensorContext.current.over) == null ? void 0 : _sensorContext$curren.id);\n const dragOverlay = useDragOverlayMeasuring({\n measure: measuringConfiguration.dragOverlay.measure\n }); // Use the rect of the drag overlay if it is mounted\n\n const draggingNode = (_dragOverlay$nodeRef$ = dragOverlay.nodeRef.current) != null ? _dragOverlay$nodeRef$ : activeNode;\n const draggingNodeRect = isInitialized ? (_dragOverlay$rect = dragOverlay.rect) != null ? _dragOverlay$rect : activeNodeRect : null;\n const usesDragOverlay = Boolean(dragOverlay.nodeRef.current && dragOverlay.rect); // The delta between the previous and new position of the draggable node\n // is only relevant when there is no drag overlay\n\n const nodeRectDelta = useRectDelta(usesDragOverlay ? null : activeNodeRect); // Get the window rect of the dragging node\n\n const windowRect = useWindowRect(draggingNode ? getWindow(draggingNode) : null); // Get scrollable ancestors of the dragging node\n\n const scrollableAncestors = useScrollableAncestors(isInitialized ? overNode != null ? overNode : activeNode : null);\n const scrollableAncestorRects = useRects(scrollableAncestors); // Apply modifiers\n\n const modifiedTranslate = applyModifiers(modifiers, {\n transform: {\n x: translate.x - nodeRectDelta.x,\n y: translate.y - nodeRectDelta.y,\n scaleX: 1,\n scaleY: 1\n },\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect,\n over: sensorContext.current.over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n });\n const pointerCoordinates = activationCoordinates ? add(activationCoordinates, translate) : null;\n const scrollOffsets = useScrollOffsets(scrollableAncestors); // Represents the scroll delta since dragging was initiated\n\n const scrollAdjustment = useScrollOffsetsDelta(scrollOffsets); // Represents the scroll delta since the last time the active node rect was measured\n\n const activeNodeScrollDelta = useScrollOffsetsDelta(scrollOffsets, [activeNodeRect]);\n const scrollAdjustedTranslate = add(modifiedTranslate, scrollAdjustment);\n const collisionRect = draggingNodeRect ? getAdjustedRect(draggingNodeRect, modifiedTranslate) : null;\n const collisions = active && collisionRect ? collisionDetection({\n active,\n collisionRect,\n droppableRects,\n droppableContainers: enabledDroppableContainers,\n pointerCoordinates\n }) : null;\n const overId = getFirstCollision(collisions, 'id');\n const [over, setOver] = useState(null); // When there is no drag overlay used, we need to account for the\n // window scroll delta\n\n const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);\n const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);\n const instantiateSensor = useCallback((event, _ref2) => {\n let {\n sensor: Sensor,\n options\n } = _ref2;\n\n if (activeRef.current == null) {\n return;\n }\n\n const activeNode = draggableNodes.get(activeRef.current);\n\n if (!activeNode) {\n return;\n }\n\n const activatorEvent = event.nativeEvent;\n const sensorInstance = new Sensor({\n active: activeRef.current,\n activeNode,\n event: activatorEvent,\n options,\n // Sensors need to be instantiated with refs for arguments that change over time\n // otherwise they are frozen in time with the stale arguments\n context: sensorContext,\n\n onStart(initialCoordinates) {\n const id = activeRef.current;\n\n if (id == null) {\n return;\n }\n\n const draggableNode = draggableNodes.get(id);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n onDragStart\n } = latestProps.current;\n const event = {\n active: {\n id,\n data: draggableNode.data,\n rect: activeRects\n }\n };\n unstable_batchedUpdates(() => {\n onDragStart == null ? void 0 : onDragStart(event);\n setStatus(Status.Initializing);\n dispatch({\n type: Action.DragStart,\n initialCoordinates,\n active: id\n });\n dispatchMonitorEvent({\n type: 'onDragStart',\n event\n });\n });\n },\n\n onMove(coordinates) {\n dispatch({\n type: Action.DragMove,\n coordinates\n });\n },\n\n onEnd: createHandler(Action.DragEnd),\n onCancel: createHandler(Action.DragCancel)\n });\n unstable_batchedUpdates(() => {\n setActiveSensor(sensorInstance);\n setActivatorEvent(event.nativeEvent);\n });\n\n function createHandler(type) {\n return async function handler() {\n const {\n active,\n collisions,\n over,\n scrollAdjustedTranslate\n } = sensorContext.current;\n let event = null;\n\n if (active && scrollAdjustedTranslate) {\n const {\n cancelDrop\n } = latestProps.current;\n event = {\n activatorEvent,\n active: active,\n collisions,\n delta: scrollAdjustedTranslate,\n over\n };\n\n if (type === Action.DragEnd && typeof cancelDrop === 'function') {\n const shouldCancel = await Promise.resolve(cancelDrop(event));\n\n if (shouldCancel) {\n type = Action.DragCancel;\n }\n }\n }\n\n activeRef.current = null;\n unstable_batchedUpdates(() => {\n dispatch({\n type\n });\n setStatus(Status.Uninitialized);\n setOver(null);\n setActiveSensor(null);\n setActivatorEvent(null);\n const eventName = type === Action.DragEnd ? 'onDragEnd' : 'onDragCancel';\n\n if (event) {\n const handler = latestProps.current[eventName];\n handler == null ? void 0 : handler(event);\n dispatchMonitorEvent({\n type: eventName,\n event\n });\n }\n });\n };\n }\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes]);\n const bindActivatorToSensorInstantiator = useCallback((handler, sensor) => {\n return (event, active) => {\n const nativeEvent = event.nativeEvent;\n const activeDraggableNode = draggableNodes.get(active);\n\n if ( // Another sensor is already instantiating\n activeRef.current !== null || // No active draggable\n !activeDraggableNode || // Event has already been captured\n nativeEvent.dndKit || nativeEvent.defaultPrevented) {\n return;\n }\n\n const activationContext = {\n active: activeDraggableNode\n };\n const shouldActivate = handler(event, sensor.options, activationContext);\n\n if (shouldActivate === true) {\n nativeEvent.dndKit = {\n capturedBy: sensor.sensor\n };\n activeRef.current = active;\n instantiateSensor(event, sensor);\n }\n };\n }, [draggableNodes, instantiateSensor]);\n const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);\n useSensorSetup(sensors);\n useIsomorphicLayoutEffect(() => {\n if (activeNodeRect && status === Status.Initializing) {\n setStatus(Status.Initialized);\n }\n }, [activeNodeRect, status]);\n useEffect(() => {\n const {\n onDragMove\n } = latestProps.current;\n const {\n active,\n activatorEvent,\n collisions,\n over\n } = sensorContext.current;\n\n if (!active || !activatorEvent) {\n return;\n }\n\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n onDragMove == null ? void 0 : onDragMove(event);\n dispatchMonitorEvent({\n type: 'onDragMove',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]);\n useEffect(() => {\n const {\n active,\n activatorEvent,\n collisions,\n droppableContainers,\n scrollAdjustedTranslate\n } = sensorContext.current;\n\n if (!active || activeRef.current == null || !activatorEvent || !scrollAdjustedTranslate) {\n return;\n }\n\n const {\n onDragOver\n } = latestProps.current;\n const overContainer = droppableContainers.get(overId);\n const over = overContainer && overContainer.rect.current ? {\n id: overContainer.id,\n rect: overContainer.rect.current,\n data: overContainer.data,\n disabled: overContainer.disabled\n } : null;\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n setOver(over);\n onDragOver == null ? void 0 : onDragOver(event);\n dispatchMonitorEvent({\n type: 'onDragOver',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [overId]);\n useIsomorphicLayoutEffect(() => {\n sensorContext.current = {\n activatorEvent,\n active,\n activeNode,\n collisionRect,\n collisions,\n droppableRects,\n draggableNodes,\n draggingNode,\n draggingNodeRect,\n droppableContainers,\n over,\n scrollableAncestors,\n scrollAdjustedTranslate\n };\n activeRects.current = {\n initial: draggingNodeRect,\n translated: collisionRect\n };\n }, [active, activeNode, collisions, collisionRect, draggableNodes, draggingNode, draggingNodeRect, droppableRects, droppableContainers, over, scrollableAncestors, scrollAdjustedTranslate]);\n useAutoScroller({ ...autoScrollOptions,\n delta: translate,\n draggingRect: collisionRect,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects\n });\n const publicContext = useMemo(() => {\n const context = {\n active,\n activeNode,\n activeNodeRect,\n activatorEvent,\n collisions,\n containerNodeRect,\n dragOverlay,\n draggableNodes,\n droppableContainers,\n droppableRects,\n over,\n measureDroppableContainers,\n scrollableAncestors,\n scrollableAncestorRects,\n measuringConfiguration,\n measuringScheduled,\n windowRect\n };\n return context;\n }, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringConfiguration, measuringScheduled, windowRect]);\n const internalContext = useMemo(() => {\n const context = {\n activatorEvent,\n activators,\n active,\n activeNodeRect,\n ariaDescribedById: {\n draggable: draggableDescribedById\n },\n dispatch,\n draggableNodes,\n over,\n measureDroppableContainers\n };\n return context;\n }, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]);\n return React.createElement(DndMonitorContext.Provider, {\n value: registerMonitorListener\n }, React.createElement(InternalContext.Provider, {\n value: internalContext\n }, React.createElement(PublicContext.Provider, {\n value: publicContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: transform\n }, children)), React.createElement(RestoreFocus, {\n disabled: (accessibility == null ? void 0 : accessibility.restoreFocus) === false\n })), React.createElement(Accessibility, { ...accessibility,\n hiddenTextDescribedById: draggableDescribedById\n }));\n\n function getAutoScrollerOptions() {\n const activeSensorDisablesAutoscroll = (activeSensor == null ? void 0 : activeSensor.autoScrollEnabled) === false;\n const autoScrollGloballyDisabled = typeof autoScroll === 'object' ? autoScroll.enabled === false : autoScroll === false;\n const enabled = isInitialized && !activeSensorDisablesAutoscroll && !autoScrollGloballyDisabled;\n\n if (typeof autoScroll === 'object') {\n return { ...autoScroll,\n enabled\n };\n }\n\n return {\n enabled\n };\n }\n});\n\nconst NullContext = /*#__PURE__*/createContext(null);\nconst defaultRole = 'button';\nconst ID_PREFIX = 'Droppable';\nfunction useDraggable(_ref) {\n let {\n id,\n data,\n disabled = false,\n attributes\n } = _ref;\n const key = useUniqueId(ID_PREFIX);\n const {\n activators,\n activatorEvent,\n active,\n activeNodeRect,\n ariaDescribedById,\n draggableNodes,\n over\n } = useContext(InternalContext);\n const {\n role = defaultRole,\n roleDescription = 'draggable',\n tabIndex = 0\n } = attributes != null ? attributes : {};\n const isDragging = (active == null ? void 0 : active.id) === id;\n const transform = useContext(isDragging ? ActiveDraggableContext : NullContext);\n const [node, setNodeRef] = useNodeRef();\n const [activatorNode, setActivatorNodeRef] = useNodeRef();\n const listeners = useSyntheticListeners(activators, id);\n const dataRef = useLatestValue(data);\n useIsomorphicLayoutEffect(() => {\n draggableNodes.set(id, {\n id,\n key,\n node,\n activatorNode,\n data: dataRef\n });\n return () => {\n const node = draggableNodes.get(id);\n\n if (node && node.key === key) {\n draggableNodes.delete(id);\n }\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes, id]);\n const memoizedAttributes = useMemo(() => ({\n role,\n tabIndex,\n 'aria-disabled': disabled,\n 'aria-pressed': isDragging && role === defaultRole ? true : undefined,\n 'aria-roledescription': roleDescription,\n 'aria-describedby': ariaDescribedById.draggable\n }), [disabled, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);\n return {\n active,\n activatorEvent,\n activeNodeRect,\n attributes: memoizedAttributes,\n isDragging,\n listeners: disabled ? undefined : listeners,\n node,\n over,\n setNodeRef,\n setActivatorNodeRef,\n transform\n };\n}\n\nfunction useDndContext() {\n return useContext(PublicContext);\n}\n\nconst ID_PREFIX$1 = 'Droppable';\nconst defaultResizeObserverConfig = {\n timeout: 25\n};\nfunction useDroppable(_ref) {\n let {\n data,\n disabled = false,\n id,\n resizeObserverConfig\n } = _ref;\n const key = useUniqueId(ID_PREFIX$1);\n const {\n active,\n dispatch,\n over,\n measureDroppableContainers\n } = useContext(InternalContext);\n const previous = useRef({\n disabled\n });\n const resizeObserverConnected = useRef(false);\n const rect = useRef(null);\n const callbackId = useRef(null);\n const {\n disabled: resizeObserverDisabled,\n updateMeasurementsFor,\n timeout: resizeObserverTimeout\n } = { ...defaultResizeObserverConfig,\n ...resizeObserverConfig\n };\n const ids = useLatestValue(updateMeasurementsFor != null ? updateMeasurementsFor : id);\n const handleResize = useCallback(() => {\n if (!resizeObserverConnected.current) {\n // ResizeObserver invokes the `handleResize` callback as soon as `observe` is called,\n // assuming the element is rendered and displayed.\n resizeObserverConnected.current = true;\n return;\n }\n\n if (callbackId.current != null) {\n clearTimeout(callbackId.current);\n }\n\n callbackId.current = setTimeout(() => {\n measureDroppableContainers(Array.isArray(ids.current) ? ids.current : [ids.current]);\n callbackId.current = null;\n }, resizeObserverTimeout);\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [resizeObserverTimeout]);\n const resizeObserver = useResizeObserver({\n callback: handleResize,\n disabled: resizeObserverDisabled || !active\n });\n const handleNodeChange = useCallback((newElement, previousElement) => {\n if (!resizeObserver) {\n return;\n }\n\n if (previousElement) {\n resizeObserver.unobserve(previousElement);\n resizeObserverConnected.current = false;\n }\n\n if (newElement) {\n resizeObserver.observe(newElement);\n }\n }, [resizeObserver]);\n const [nodeRef, setNodeRef] = useNodeRef(handleNodeChange);\n const dataRef = useLatestValue(data);\n useEffect(() => {\n if (!resizeObserver || !nodeRef.current) {\n return;\n }\n\n resizeObserver.disconnect();\n resizeObserverConnected.current = false;\n resizeObserver.observe(nodeRef.current);\n }, [nodeRef, resizeObserver]);\n useIsomorphicLayoutEffect(() => {\n dispatch({\n type: Action.RegisterDroppable,\n element: {\n id,\n key,\n disabled,\n node: nodeRef,\n rect,\n data: dataRef\n }\n });\n return () => dispatch({\n type: Action.UnregisterDroppable,\n key,\n id\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [id]);\n useEffect(() => {\n if (disabled !== previous.current.disabled) {\n dispatch({\n type: Action.SetDroppableDisabled,\n id,\n key,\n disabled\n });\n previous.current.disabled = disabled;\n }\n }, [id, key, disabled, dispatch]);\n return {\n active,\n rect,\n isOver: (over == null ? void 0 : over.id) === id,\n node: nodeRef,\n over,\n setNodeRef\n };\n}\n\nfunction AnimationManager(_ref) {\n let {\n animation,\n children\n } = _ref;\n const [clonedChildren, setClonedChildren] = useState(null);\n const [element, setElement] = useState(null);\n const previousChildren = usePrevious(children);\n\n if (!children && !clonedChildren && previousChildren) {\n setClonedChildren(previousChildren);\n }\n\n useIsomorphicLayoutEffect(() => {\n if (!element) {\n return;\n }\n\n const key = clonedChildren == null ? void 0 : clonedChildren.key;\n const id = clonedChildren == null ? void 0 : clonedChildren.props.id;\n\n if (key == null || id == null) {\n setClonedChildren(null);\n return;\n }\n\n Promise.resolve(animation(id, element)).then(() => {\n setClonedChildren(null);\n });\n }, [animation, clonedChildren, element]);\n return React.createElement(React.Fragment, null, children, clonedChildren ? cloneElement(clonedChildren, {\n ref: setElement\n }) : null);\n}\n\nconst defaultTransform = {\n x: 0,\n y: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction NullifiedContextProvider(_ref) {\n let {\n children\n } = _ref;\n return React.createElement(InternalContext.Provider, {\n value: defaultInternalContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: defaultTransform\n }, children));\n}\n\nconst baseStyles = {\n position: 'fixed',\n touchAction: 'none'\n};\n\nconst defaultTransition = activatorEvent => {\n const isKeyboardActivator = isKeyboardEvent(activatorEvent);\n return isKeyboardActivator ? 'transform 250ms ease' : undefined;\n};\n\nconst PositionedOverlay = /*#__PURE__*/forwardRef((_ref, ref) => {\n let {\n as,\n activatorEvent,\n adjustScale,\n children,\n className,\n rect,\n style,\n transform,\n transition = defaultTransition\n } = _ref;\n\n if (!rect) {\n return null;\n }\n\n const scaleAdjustedTransform = adjustScale ? transform : { ...transform,\n scaleX: 1,\n scaleY: 1\n };\n const styles = { ...baseStyles,\n width: rect.width,\n height: rect.height,\n top: rect.top,\n left: rect.left,\n transform: CSS.Transform.toString(scaleAdjustedTransform),\n transformOrigin: adjustScale && activatorEvent ? getRelativeTransformOrigin(activatorEvent, rect) : undefined,\n transition: typeof transition === 'function' ? transition(activatorEvent) : transition,\n ...style\n };\n return React.createElement(as, {\n className,\n style: styles,\n ref\n }, children);\n});\n\nconst defaultDropAnimationSideEffects = options => _ref => {\n let {\n active,\n dragOverlay\n } = _ref;\n const originalStyles = {};\n const {\n styles,\n className\n } = options;\n\n if (styles != null && styles.active) {\n for (const [key, value] of Object.entries(styles.active)) {\n if (value === undefined) {\n continue;\n }\n\n originalStyles[key] = active.node.style.getPropertyValue(key);\n active.node.style.setProperty(key, value);\n }\n }\n\n if (styles != null && styles.dragOverlay) {\n for (const [key, value] of Object.entries(styles.dragOverlay)) {\n if (value === undefined) {\n continue;\n }\n\n dragOverlay.node.style.setProperty(key, value);\n }\n }\n\n if (className != null && className.active) {\n active.node.classList.add(className.active);\n }\n\n if (className != null && className.dragOverlay) {\n dragOverlay.node.classList.add(className.dragOverlay);\n }\n\n return function cleanup() {\n for (const [key, value] of Object.entries(originalStyles)) {\n active.node.style.setProperty(key, value);\n }\n\n if (className != null && className.active) {\n active.node.classList.remove(className.active);\n }\n };\n};\n\nconst defaultKeyframeResolver = _ref2 => {\n let {\n transform: {\n initial,\n final\n }\n } = _ref2;\n return [{\n transform: CSS.Transform.toString(initial)\n }, {\n transform: CSS.Transform.toString(final)\n }];\n};\n\nconst defaultDropAnimationConfiguration = {\n duration: 250,\n easing: 'ease',\n keyframes: defaultKeyframeResolver,\n sideEffects: /*#__PURE__*/defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: '0'\n }\n }\n })\n};\nfunction useDropAnimation(_ref3) {\n let {\n config,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n } = _ref3;\n return useEvent((id, node) => {\n if (config === null) {\n return;\n }\n\n const activeDraggable = draggableNodes.get(id);\n\n if (!activeDraggable) {\n return;\n }\n\n const activeNode = activeDraggable.node.current;\n\n if (!activeNode) {\n return;\n }\n\n const measurableNode = getMeasurableNode(node);\n\n if (!measurableNode) {\n return;\n }\n\n const {\n transform\n } = getWindow(node).getComputedStyle(node);\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return;\n }\n\n const animation = typeof config === 'function' ? config : createDefaultDropAnimation(config);\n scrollIntoViewIfNeeded(activeNode, measuringConfiguration.draggable.measure);\n return animation({\n active: {\n id,\n data: activeDraggable.data,\n node: activeNode,\n rect: measuringConfiguration.draggable.measure(activeNode)\n },\n draggableNodes,\n dragOverlay: {\n node,\n rect: measuringConfiguration.dragOverlay.measure(measurableNode)\n },\n droppableContainers,\n measuringConfiguration,\n transform: parsedTransform\n });\n });\n}\n\nfunction createDefaultDropAnimation(options) {\n const {\n duration,\n easing,\n sideEffects,\n keyframes\n } = { ...defaultDropAnimationConfiguration,\n ...options\n };\n return _ref4 => {\n let {\n active,\n dragOverlay,\n transform,\n ...rest\n } = _ref4;\n\n if (!duration) {\n // Do not animate if animation duration is zero.\n return;\n }\n\n const delta = {\n x: dragOverlay.rect.left - active.rect.left,\n y: dragOverlay.rect.top - active.rect.top\n };\n const scale = {\n scaleX: transform.scaleX !== 1 ? active.rect.width * transform.scaleX / dragOverlay.rect.width : 1,\n scaleY: transform.scaleY !== 1 ? active.rect.height * transform.scaleY / dragOverlay.rect.height : 1\n };\n const finalTransform = {\n x: transform.x - delta.x,\n y: transform.y - delta.y,\n ...scale\n };\n const animationKeyframes = keyframes({ ...rest,\n active,\n dragOverlay,\n transform: {\n initial: transform,\n final: finalTransform\n }\n });\n const [firstKeyframe] = animationKeyframes;\n const lastKeyframe = animationKeyframes[animationKeyframes.length - 1];\n\n if (JSON.stringify(firstKeyframe) === JSON.stringify(lastKeyframe)) {\n // The start and end keyframes are the same, infer that there is no animation needed.\n return;\n }\n\n const cleanup = sideEffects == null ? void 0 : sideEffects({\n active,\n dragOverlay,\n ...rest\n });\n const animation = dragOverlay.node.animate(animationKeyframes, {\n duration,\n easing,\n fill: 'forwards'\n });\n return new Promise(resolve => {\n animation.onfinish = () => {\n cleanup == null ? void 0 : cleanup();\n resolve();\n };\n });\n };\n}\n\nlet key = 0;\nfunction useKey(id) {\n return useMemo(() => {\n if (id == null) {\n return;\n }\n\n key++;\n return key;\n }, [id]);\n}\n\nconst DragOverlay = /*#__PURE__*/React.memo(_ref => {\n let {\n adjustScale = false,\n children,\n dropAnimation: dropAnimationConfig,\n style,\n transition,\n modifiers,\n wrapperElement = 'div',\n className,\n zIndex = 999\n } = _ref;\n const {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggableNodes,\n droppableContainers,\n dragOverlay,\n over,\n measuringConfiguration,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n } = useDndContext();\n const transform = useContext(ActiveDraggableContext);\n const key = useKey(active == null ? void 0 : active.id);\n const modifiedTransform = applyModifiers(modifiers, {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect: dragOverlay.rect,\n over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n transform,\n windowRect\n });\n const initialRect = useInitialValue(activeNodeRect);\n const dropAnimation = useDropAnimation({\n config: dropAnimationConfig,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n }); // We need to wait for the active node to be measured before connecting the drag overlay ref\n // otherwise collisions can be computed against a mispositioned drag overlay\n\n const ref = initialRect ? dragOverlay.setRef : undefined;\n return React.createElement(NullifiedContextProvider, null, React.createElement(AnimationManager, {\n animation: dropAnimation\n }, active && key ? React.createElement(PositionedOverlay, {\n key: key,\n id: active.id,\n ref: ref,\n as: wrapperElement,\n activatorEvent: activatorEvent,\n adjustScale: adjustScale,\n className: className,\n transition: transition,\n rect: initialRect,\n style: {\n zIndex,\n ...style\n },\n transform: modifiedTransform\n }, children) : null));\n});\n\nexport { AutoScrollActivator, DndContext, DragOverlay, KeyboardCode, KeyboardSensor, MeasuringFrequency, MeasuringStrategy, MouseSensor, PointerSensor, TouchSensor, TraversalOrder, applyModifiers, closestCenter, closestCorners, defaultAnnouncements, defaultCoordinates, defaultDropAnimationConfiguration as defaultDropAnimation, defaultDropAnimationSideEffects, defaultScreenReaderInstructions, getClientRect, getFirstCollision, getScrollableAncestors, pointerWithin, rectIntersection, useDndContext, useDndMonitor, useDraggable, useDroppable, useSensor, useSensors };\n//# sourceMappingURL=core.esm.js.map\n","import React, { useState, useCallback } from 'react';\n\nconst hiddenStyles = {\n display: 'none'\n};\nfunction HiddenText(_ref) {\n let {\n id,\n value\n } = _ref;\n return React.createElement(\"div\", {\n id: id,\n style: hiddenStyles\n }, value);\n}\n\nfunction LiveRegion(_ref) {\n let {\n id,\n announcement,\n ariaLiveType = \"assertive\"\n } = _ref;\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden = {\n position: 'fixed',\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap'\n };\n return React.createElement(\"div\", {\n id: id,\n style: visuallyHidden,\n role: \"status\",\n \"aria-live\": ariaLiveType,\n \"aria-atomic\": true\n }, announcement);\n}\n\nfunction useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback(value => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n return {\n announce,\n announcement\n };\n}\n\nexport { HiddenText, LiveRegion, useAnnouncement };\n//# sourceMappingURL=accessibility.esm.js.map\n","import React, { createContext, useContext, useEffect, useState, useCallback, useMemo, useRef, useReducer, memo, cloneElement, forwardRef } from 'react';\nimport { createPortal, unstable_batchedUpdates } from 'react-dom';\nimport { useUniqueId, getEventCoordinates, getWindow, isDocument, isHTMLElement, isSVGElement, canUseDOM, isWindow, isNode, getOwnerDocument, add, isKeyboardEvent, subtract, useLazyMemo, useInterval, usePrevious, useLatestValue, useEvent, useIsomorphicLayoutEffect, useNodeRef, findFirstFocusableNode, CSS } from '@dnd-kit/utilities';\nimport { useAnnouncement, HiddenText, LiveRegion } from '@dnd-kit/accessibility';\n\nconst DndMonitorContext = /*#__PURE__*/createContext(null);\n\nfunction useDndMonitor(listener) {\n const registerListener = useContext(DndMonitorContext);\n useEffect(() => {\n if (!registerListener) {\n throw new Error('useDndMonitor must be used within a children of ');\n }\n\n const unsubscribe = registerListener(listener);\n return unsubscribe;\n }, [listener, registerListener]);\n}\n\nfunction useDndMonitorProvider() {\n const [listeners] = useState(() => new Set());\n const registerListener = useCallback(listener => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n }, [listeners]);\n const dispatch = useCallback(_ref => {\n let {\n type,\n event\n } = _ref;\n listeners.forEach(listener => {\n var _listener$type;\n\n return (_listener$type = listener[type]) == null ? void 0 : _listener$type.call(listener, event);\n });\n }, [listeners]);\n return [dispatch, registerListener];\n}\n\nconst defaultScreenReaderInstructions = {\n draggable: \"\\n To pick up a draggable item, press the space bar.\\n While dragging, use the arrow keys to move the item.\\n Press space again to drop the item in its new position, or press escape to cancel.\\n \"\n};\nconst defaultAnnouncements = {\n onDragStart(_ref) {\n let {\n active\n } = _ref;\n return \"Picked up draggable item \" + active.id + \".\";\n },\n\n onDragOver(_ref2) {\n let {\n active,\n over\n } = _ref2;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was moved over droppable area \" + over.id + \".\";\n }\n\n return \"Draggable item \" + active.id + \" is no longer over a droppable area.\";\n },\n\n onDragEnd(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was dropped over droppable area \" + over.id;\n }\n\n return \"Draggable item \" + active.id + \" was dropped.\";\n },\n\n onDragCancel(_ref4) {\n let {\n active\n } = _ref4;\n return \"Dragging was cancelled. Draggable item \" + active.id + \" was dropped.\";\n }\n\n};\n\nfunction Accessibility(_ref) {\n let {\n announcements = defaultAnnouncements,\n container,\n hiddenTextDescribedById,\n screenReaderInstructions = defaultScreenReaderInstructions\n } = _ref;\n const {\n announce,\n announcement\n } = useAnnouncement();\n const liveRegionId = useUniqueId(\"DndLiveRegion\");\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n useDndMonitor(useMemo(() => ({\n onDragStart(_ref2) {\n let {\n active\n } = _ref2;\n announce(announcements.onDragStart({\n active\n }));\n },\n\n onDragMove(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (announcements.onDragMove) {\n announce(announcements.onDragMove({\n active,\n over\n }));\n }\n },\n\n onDragOver(_ref4) {\n let {\n active,\n over\n } = _ref4;\n announce(announcements.onDragOver({\n active,\n over\n }));\n },\n\n onDragEnd(_ref5) {\n let {\n active,\n over\n } = _ref5;\n announce(announcements.onDragEnd({\n active,\n over\n }));\n },\n\n onDragCancel(_ref6) {\n let {\n active,\n over\n } = _ref6;\n announce(announcements.onDragCancel({\n active,\n over\n }));\n }\n\n }), [announce, announcements]));\n\n if (!mounted) {\n return null;\n }\n\n const markup = React.createElement(React.Fragment, null, React.createElement(HiddenText, {\n id: hiddenTextDescribedById,\n value: screenReaderInstructions.draggable\n }), React.createElement(LiveRegion, {\n id: liveRegionId,\n announcement: announcement\n }));\n return container ? createPortal(markup, container) : markup;\n}\n\nvar Action;\n\n(function (Action) {\n Action[\"DragStart\"] = \"dragStart\";\n Action[\"DragMove\"] = \"dragMove\";\n Action[\"DragEnd\"] = \"dragEnd\";\n Action[\"DragCancel\"] = \"dragCancel\";\n Action[\"DragOver\"] = \"dragOver\";\n Action[\"RegisterDroppable\"] = \"registerDroppable\";\n Action[\"SetDroppableDisabled\"] = \"setDroppableDisabled\";\n Action[\"UnregisterDroppable\"] = \"unregisterDroppable\";\n})(Action || (Action = {}));\n\nfunction noop() {}\n\nfunction useSensor(sensor, options) {\n return useMemo(() => ({\n sensor,\n options: options != null ? options : {}\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [sensor, options]);\n}\n\nfunction useSensors() {\n for (var _len = arguments.length, sensors = new Array(_len), _key = 0; _key < _len; _key++) {\n sensors[_key] = arguments[_key];\n }\n\n return useMemo(() => [...sensors].filter(sensor => sensor != null), // eslint-disable-next-line react-hooks/exhaustive-deps\n [...sensors]);\n}\n\nconst defaultCoordinates = /*#__PURE__*/Object.freeze({\n x: 0,\n y: 0\n});\n\n/**\r\n * Returns the distance between two points\r\n */\nfunction distanceBetween(p1, p2) {\n return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n}\n\nfunction getRelativeTransformOrigin(event, rect) {\n const eventCoordinates = getEventCoordinates(event);\n\n if (!eventCoordinates) {\n return '0 0';\n }\n\n const transformOrigin = {\n x: (eventCoordinates.x - rect.left) / rect.width * 100,\n y: (eventCoordinates.y - rect.top) / rect.height * 100\n };\n return transformOrigin.x + \"% \" + transformOrigin.y + \"%\";\n}\n\n/**\r\n * Sort collisions from smallest to greatest value\r\n */\nfunction sortCollisionsAsc(_ref, _ref2) {\n let {\n data: {\n value: a\n }\n } = _ref;\n let {\n data: {\n value: b\n }\n } = _ref2;\n return a - b;\n}\n/**\r\n * Sort collisions from greatest to smallest value\r\n */\n\nfunction sortCollisionsDesc(_ref3, _ref4) {\n let {\n data: {\n value: a\n }\n } = _ref3;\n let {\n data: {\n value: b\n }\n } = _ref4;\n return b - a;\n}\n/**\r\n * Returns the coordinates of the corners of a given rectangle:\r\n * [TopLeft {x, y}, TopRight {x, y}, BottomLeft {x, y}, BottomRight {x, y}]\r\n */\n\nfunction cornersOfRectangle(_ref5) {\n let {\n left,\n top,\n height,\n width\n } = _ref5;\n return [{\n x: left,\n y: top\n }, {\n x: left + width,\n y: top\n }, {\n x: left,\n y: top + height\n }, {\n x: left + width,\n y: top + height\n }];\n}\nfunction getFirstCollision(collisions, property) {\n if (!collisions || collisions.length === 0) {\n return null;\n }\n\n const [firstCollision] = collisions;\n return property ? firstCollision[property] : firstCollision;\n}\n\n/**\r\n * Returns the coordinates of the center of a given ClientRect\r\n */\n\nfunction centerOfRectangle(rect, left, top) {\n if (left === void 0) {\n left = rect.left;\n }\n\n if (top === void 0) {\n top = rect.top;\n }\n\n return {\n x: left + rect.width * 0.5,\n y: top + rect.height * 0.5\n };\n}\n/**\r\n * Returns the closest rectangles from an array of rectangles to the center of a given\r\n * rectangle.\r\n */\n\n\nconst closestCenter = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const centerRect = centerOfRectangle(collisionRect, collisionRect.left, collisionRect.top);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const distBetween = distanceBetween(centerOfRectangle(rect), centerRect);\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: distBetween\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the closest rectangles from an array of rectangles to the corners of\r\n * another rectangle.\r\n */\n\nconst closestCorners = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const corners = cornersOfRectangle(collisionRect);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const rectCorners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner, index) => {\n return accumulator + distanceBetween(rectCorners[index], corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the intersecting rectangle area between two rectangles\r\n */\n\nfunction getIntersectionRatio(entry, target) {\n const top = Math.max(target.top, entry.top);\n const left = Math.max(target.left, entry.left);\n const right = Math.min(target.left + target.width, entry.left + entry.width);\n const bottom = Math.min(target.top + target.height, entry.top + entry.height);\n const width = right - left;\n const height = bottom - top;\n\n if (left < right && top < bottom) {\n const targetArea = target.width * target.height;\n const entryArea = entry.width * entry.height;\n const intersectionArea = width * height;\n const intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea);\n return Number(intersectionRatio.toFixed(4));\n } // Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)\n\n\n return 0;\n}\n/**\r\n * Returns the rectangles that has the greatest intersection area with a given\r\n * rectangle in an array of rectangles.\r\n */\n\nconst rectIntersection = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const intersectionRatio = getIntersectionRatio(rect, collisionRect);\n\n if (intersectionRatio > 0) {\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: intersectionRatio\n }\n });\n }\n }\n }\n\n return collisions.sort(sortCollisionsDesc);\n};\n\n/**\r\n * Check if a given point is contained within a bounding rectangle\r\n */\n\nfunction isPointWithinRect(point, rect) {\n const {\n top,\n left,\n bottom,\n right\n } = rect;\n return top <= point.y && point.y <= bottom && left <= point.x && point.x <= right;\n}\n/**\r\n * Returns the rectangles that the pointer is hovering over\r\n */\n\n\nconst pointerWithin = _ref => {\n let {\n droppableContainers,\n droppableRects,\n pointerCoordinates\n } = _ref;\n\n if (!pointerCoordinates) {\n return [];\n }\n\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect && isPointWithinRect(pointerCoordinates, rect)) {\n /* There may be more than a single rectangle intersecting\r\n * with the pointer coordinates. In order to sort the\r\n * colliding rectangles, we measure the distance between\r\n * the pointer and the corners of the intersecting rectangle\r\n */\n const corners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner) => {\n return accumulator + distanceBetween(pointerCoordinates, corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\nfunction adjustScale(transform, rect1, rect2) {\n return { ...transform,\n scaleX: rect1 && rect2 ? rect1.width / rect2.width : 1,\n scaleY: rect1 && rect2 ? rect1.height / rect2.height : 1\n };\n}\n\nfunction getRectDelta(rect1, rect2) {\n return rect1 && rect2 ? {\n x: rect1.left - rect2.left,\n y: rect1.top - rect2.top\n } : defaultCoordinates;\n}\n\nfunction createRectAdjustmentFn(modifier) {\n return function adjustClientRect(rect) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((acc, adjustment) => ({ ...acc,\n top: acc.top + modifier * adjustment.y,\n bottom: acc.bottom + modifier * adjustment.y,\n left: acc.left + modifier * adjustment.x,\n right: acc.right + modifier * adjustment.x\n }), { ...rect\n });\n };\n}\nconst getAdjustedRect = /*#__PURE__*/createRectAdjustmentFn(1);\n\nfunction parseTransform(transform) {\n if (transform.startsWith('matrix3d(')) {\n const transformArray = transform.slice(9, -1).split(/, /);\n return {\n x: +transformArray[12],\n y: +transformArray[13],\n scaleX: +transformArray[0],\n scaleY: +transformArray[5]\n };\n } else if (transform.startsWith('matrix(')) {\n const transformArray = transform.slice(7, -1).split(/, /);\n return {\n x: +transformArray[4],\n y: +transformArray[5],\n scaleX: +transformArray[0],\n scaleY: +transformArray[3]\n };\n }\n\n return null;\n}\n\nfunction inverseTransform(rect, transform, transformOrigin) {\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return rect;\n }\n\n const {\n scaleX,\n scaleY,\n x: translateX,\n y: translateY\n } = parsedTransform;\n const x = rect.left - translateX - (1 - scaleX) * parseFloat(transformOrigin);\n const y = rect.top - translateY - (1 - scaleY) * parseFloat(transformOrigin.slice(transformOrigin.indexOf(' ') + 1));\n const w = scaleX ? rect.width / scaleX : rect.width;\n const h = scaleY ? rect.height / scaleY : rect.height;\n return {\n width: w,\n height: h,\n top: y,\n right: x + w,\n bottom: y + h,\n left: x\n };\n}\n\nconst defaultOptions = {\n ignoreTransform: false\n};\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n */\n\nfunction getClientRect(element, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n let rect = element.getBoundingClientRect();\n\n if (options.ignoreTransform) {\n const {\n transform,\n transformOrigin\n } = getWindow(element).getComputedStyle(element);\n\n if (transform) {\n rect = inverseTransform(rect, transform, transformOrigin);\n }\n }\n\n const {\n top,\n left,\n width,\n height,\n bottom,\n right\n } = rect;\n return {\n top,\n left,\n width,\n height,\n bottom,\n right\n };\n}\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n *\r\n * @remarks\r\n * The ClientRect returned by this method does not take into account transforms\r\n * applied to the element it measures.\r\n *\r\n */\n\nfunction getTransformAgnosticClientRect(element) {\n return getClientRect(element, {\n ignoreTransform: true\n });\n}\n\nfunction getWindowClientRect(element) {\n const width = element.innerWidth;\n const height = element.innerHeight;\n return {\n top: 0,\n left: 0,\n right: width,\n bottom: height,\n width,\n height\n };\n}\n\nfunction isFixed(node, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(node).getComputedStyle(node);\n }\n\n return computedStyle.position === 'fixed';\n}\n\nfunction isScrollable(element, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(element).getComputedStyle(element);\n }\n\n const overflowRegex = /(auto|scroll|overlay)/;\n const properties = ['overflow', 'overflowX', 'overflowY'];\n return properties.some(property => {\n const value = computedStyle[property];\n return typeof value === 'string' ? overflowRegex.test(value) : false;\n });\n}\n\nfunction getScrollableAncestors(element, limit) {\n const scrollParents = [];\n\n function findScrollableAncestors(node) {\n if (limit != null && scrollParents.length >= limit) {\n return scrollParents;\n }\n\n if (!node) {\n return scrollParents;\n }\n\n if (isDocument(node) && node.scrollingElement != null && !scrollParents.includes(node.scrollingElement)) {\n scrollParents.push(node.scrollingElement);\n return scrollParents;\n }\n\n if (!isHTMLElement(node) || isSVGElement(node)) {\n return scrollParents;\n }\n\n if (scrollParents.includes(node)) {\n return scrollParents;\n }\n\n const computedStyle = getWindow(element).getComputedStyle(node);\n\n if (node !== element) {\n if (isScrollable(node, computedStyle)) {\n scrollParents.push(node);\n }\n }\n\n if (isFixed(node, computedStyle)) {\n return scrollParents;\n }\n\n return findScrollableAncestors(node.parentNode);\n }\n\n if (!element) {\n return scrollParents;\n }\n\n return findScrollableAncestors(element);\n}\nfunction getFirstScrollableAncestor(node) {\n const [firstScrollableAncestor] = getScrollableAncestors(node, 1);\n return firstScrollableAncestor != null ? firstScrollableAncestor : null;\n}\n\nfunction getScrollableElement(element) {\n if (!canUseDOM || !element) {\n return null;\n }\n\n if (isWindow(element)) {\n return element;\n }\n\n if (!isNode(element)) {\n return null;\n }\n\n if (isDocument(element) || element === getOwnerDocument(element).scrollingElement) {\n return window;\n }\n\n if (isHTMLElement(element)) {\n return element;\n }\n\n return null;\n}\n\nfunction getScrollXCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollX;\n }\n\n return element.scrollLeft;\n}\nfunction getScrollYCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollY;\n }\n\n return element.scrollTop;\n}\nfunction getScrollCoordinates(element) {\n return {\n x: getScrollXCoordinate(element),\n y: getScrollYCoordinate(element)\n };\n}\n\nvar Direction;\n\n(function (Direction) {\n Direction[Direction[\"Forward\"] = 1] = \"Forward\";\n Direction[Direction[\"Backward\"] = -1] = \"Backward\";\n})(Direction || (Direction = {}));\n\nfunction isDocumentScrollingElement(element) {\n if (!canUseDOM || !element) {\n return false;\n }\n\n return element === document.scrollingElement;\n}\n\nfunction getScrollPosition(scrollingContainer) {\n const minScroll = {\n x: 0,\n y: 0\n };\n const dimensions = isDocumentScrollingElement(scrollingContainer) ? {\n height: window.innerHeight,\n width: window.innerWidth\n } : {\n height: scrollingContainer.clientHeight,\n width: scrollingContainer.clientWidth\n };\n const maxScroll = {\n x: scrollingContainer.scrollWidth - dimensions.width,\n y: scrollingContainer.scrollHeight - dimensions.height\n };\n const isTop = scrollingContainer.scrollTop <= minScroll.y;\n const isLeft = scrollingContainer.scrollLeft <= minScroll.x;\n const isBottom = scrollingContainer.scrollTop >= maxScroll.y;\n const isRight = scrollingContainer.scrollLeft >= maxScroll.x;\n return {\n isTop,\n isLeft,\n isBottom,\n isRight,\n maxScroll,\n minScroll\n };\n}\n\nconst defaultThreshold = {\n x: 0.2,\n y: 0.2\n};\nfunction getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref, acceleration, thresholdPercentage) {\n let {\n top,\n left,\n right,\n bottom\n } = _ref;\n\n if (acceleration === void 0) {\n acceleration = 10;\n }\n\n if (thresholdPercentage === void 0) {\n thresholdPercentage = defaultThreshold;\n }\n\n const {\n isTop,\n isBottom,\n isLeft,\n isRight\n } = getScrollPosition(scrollContainer);\n const direction = {\n x: 0,\n y: 0\n };\n const speed = {\n x: 0,\n y: 0\n };\n const threshold = {\n height: scrollContainerRect.height * thresholdPercentage.y,\n width: scrollContainerRect.width * thresholdPercentage.x\n };\n\n if (!isTop && top <= scrollContainerRect.top + threshold.height) {\n // Scroll Up\n direction.y = Direction.Backward;\n speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold.height - top) / threshold.height);\n } else if (!isBottom && bottom >= scrollContainerRect.bottom - threshold.height) {\n // Scroll Down\n direction.y = Direction.Forward;\n speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold.height - bottom) / threshold.height);\n }\n\n if (!isRight && right >= scrollContainerRect.right - threshold.width) {\n // Scroll Right\n direction.x = Direction.Forward;\n speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold.width - right) / threshold.width);\n } else if (!isLeft && left <= scrollContainerRect.left + threshold.width) {\n // Scroll Left\n direction.x = Direction.Backward;\n speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold.width - left) / threshold.width);\n }\n\n return {\n direction,\n speed\n };\n}\n\nfunction getScrollElementRect(element) {\n if (element === document.scrollingElement) {\n const {\n innerWidth,\n innerHeight\n } = window;\n return {\n top: 0,\n left: 0,\n right: innerWidth,\n bottom: innerHeight,\n width: innerWidth,\n height: innerHeight\n };\n }\n\n const {\n top,\n left,\n right,\n bottom\n } = element.getBoundingClientRect();\n return {\n top,\n left,\n right,\n bottom,\n width: element.clientWidth,\n height: element.clientHeight\n };\n}\n\nfunction getScrollOffsets(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return add(acc, getScrollCoordinates(node));\n }, defaultCoordinates);\n}\nfunction getScrollXOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollXCoordinate(node);\n }, 0);\n}\nfunction getScrollYOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollYCoordinate(node);\n }, 0);\n}\n\nfunction scrollIntoViewIfNeeded(element, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n if (!element) {\n return;\n }\n\n const {\n top,\n left,\n bottom,\n right\n } = measure(element);\n const firstScrollableAncestor = getFirstScrollableAncestor(element);\n\n if (!firstScrollableAncestor) {\n return;\n }\n\n if (bottom <= 0 || right <= 0 || top >= window.innerHeight || left >= window.innerWidth) {\n element.scrollIntoView({\n block: 'center',\n inline: 'center'\n });\n }\n}\n\nconst properties = [['x', ['left', 'right'], getScrollXOffset], ['y', ['top', 'bottom'], getScrollYOffset]];\nclass Rect {\n constructor(rect, element) {\n this.rect = void 0;\n this.width = void 0;\n this.height = void 0;\n this.top = void 0;\n this.bottom = void 0;\n this.right = void 0;\n this.left = void 0;\n const scrollableAncestors = getScrollableAncestors(element);\n const scrollOffsets = getScrollOffsets(scrollableAncestors);\n this.rect = { ...rect\n };\n this.width = rect.width;\n this.height = rect.height;\n\n for (const [axis, keys, getScrollOffset] of properties) {\n for (const key of keys) {\n Object.defineProperty(this, key, {\n get: () => {\n const currentOffsets = getScrollOffset(scrollableAncestors);\n const scrollOffsetsDeltla = scrollOffsets[axis] - currentOffsets;\n return this.rect[key] + scrollOffsetsDeltla;\n },\n enumerable: true\n });\n }\n }\n\n Object.defineProperty(this, 'rect', {\n enumerable: false\n });\n }\n\n}\n\nclass Listeners {\n constructor(target) {\n this.target = void 0;\n this.listeners = [];\n\n this.removeAll = () => {\n this.listeners.forEach(listener => {\n var _this$target;\n\n return (_this$target = this.target) == null ? void 0 : _this$target.removeEventListener(...listener);\n });\n };\n\n this.target = target;\n }\n\n add(eventName, handler, options) {\n var _this$target2;\n\n (_this$target2 = this.target) == null ? void 0 : _this$target2.addEventListener(eventName, handler, options);\n this.listeners.push([eventName, handler, options]);\n }\n\n}\n\nfunction getEventListenerTarget(target) {\n // If the `event.target` element is removed from the document events will still be targeted\n // at it, and hence won't always bubble up to the window or document anymore.\n // If there is any risk of an element being removed while it is being dragged,\n // the best practice is to attach the event listeners directly to the target.\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget\n const {\n EventTarget\n } = getWindow(target);\n return target instanceof EventTarget ? target : getOwnerDocument(target);\n}\n\nfunction hasExceededDistance(delta, measurement) {\n const dx = Math.abs(delta.x);\n const dy = Math.abs(delta.y);\n\n if (typeof measurement === 'number') {\n return Math.sqrt(dx ** 2 + dy ** 2) > measurement;\n }\n\n if ('x' in measurement && 'y' in measurement) {\n return dx > measurement.x && dy > measurement.y;\n }\n\n if ('x' in measurement) {\n return dx > measurement.x;\n }\n\n if ('y' in measurement) {\n return dy > measurement.y;\n }\n\n return false;\n}\n\nvar EventName;\n\n(function (EventName) {\n EventName[\"Click\"] = \"click\";\n EventName[\"DragStart\"] = \"dragstart\";\n EventName[\"Keydown\"] = \"keydown\";\n EventName[\"ContextMenu\"] = \"contextmenu\";\n EventName[\"Resize\"] = \"resize\";\n EventName[\"SelectionChange\"] = \"selectionchange\";\n EventName[\"VisibilityChange\"] = \"visibilitychange\";\n})(EventName || (EventName = {}));\n\nfunction preventDefault(event) {\n event.preventDefault();\n}\nfunction stopPropagation(event) {\n event.stopPropagation();\n}\n\nvar KeyboardCode;\n\n(function (KeyboardCode) {\n KeyboardCode[\"Space\"] = \"Space\";\n KeyboardCode[\"Down\"] = \"ArrowDown\";\n KeyboardCode[\"Right\"] = \"ArrowRight\";\n KeyboardCode[\"Left\"] = \"ArrowLeft\";\n KeyboardCode[\"Up\"] = \"ArrowUp\";\n KeyboardCode[\"Esc\"] = \"Escape\";\n KeyboardCode[\"Enter\"] = \"Enter\";\n})(KeyboardCode || (KeyboardCode = {}));\n\nconst defaultKeyboardCodes = {\n start: [KeyboardCode.Space, KeyboardCode.Enter],\n cancel: [KeyboardCode.Esc],\n end: [KeyboardCode.Space, KeyboardCode.Enter]\n};\nconst defaultKeyboardCoordinateGetter = (event, _ref) => {\n let {\n currentCoordinates\n } = _ref;\n\n switch (event.code) {\n case KeyboardCode.Right:\n return { ...currentCoordinates,\n x: currentCoordinates.x + 25\n };\n\n case KeyboardCode.Left:\n return { ...currentCoordinates,\n x: currentCoordinates.x - 25\n };\n\n case KeyboardCode.Down:\n return { ...currentCoordinates,\n y: currentCoordinates.y + 25\n };\n\n case KeyboardCode.Up:\n return { ...currentCoordinates,\n y: currentCoordinates.y - 25\n };\n }\n\n return undefined;\n};\n\nclass KeyboardSensor {\n constructor(props) {\n this.props = void 0;\n this.autoScrollEnabled = false;\n this.referenceCoordinates = void 0;\n this.listeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n const {\n event: {\n target\n }\n } = props;\n this.props = props;\n this.listeners = new Listeners(getOwnerDocument(target));\n this.windowListeners = new Listeners(getWindow(target));\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.attach();\n }\n\n attach() {\n this.handleStart();\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n setTimeout(() => this.listeners.add(EventName.Keydown, this.handleKeyDown));\n }\n\n handleStart() {\n const {\n activeNode,\n onStart\n } = this.props;\n const node = activeNode.node.current;\n\n if (node) {\n scrollIntoViewIfNeeded(node);\n }\n\n onStart(defaultCoordinates);\n }\n\n handleKeyDown(event) {\n if (isKeyboardEvent(event)) {\n const {\n active,\n context,\n options\n } = this.props;\n const {\n keyboardCodes = defaultKeyboardCodes,\n coordinateGetter = defaultKeyboardCoordinateGetter,\n scrollBehavior = 'smooth'\n } = options;\n const {\n code\n } = event;\n\n if (keyboardCodes.end.includes(code)) {\n this.handleEnd(event);\n return;\n }\n\n if (keyboardCodes.cancel.includes(code)) {\n this.handleCancel(event);\n return;\n }\n\n const {\n collisionRect\n } = context.current;\n const currentCoordinates = collisionRect ? {\n x: collisionRect.left,\n y: collisionRect.top\n } : defaultCoordinates;\n\n if (!this.referenceCoordinates) {\n this.referenceCoordinates = currentCoordinates;\n }\n\n const newCoordinates = coordinateGetter(event, {\n active,\n context: context.current,\n currentCoordinates\n });\n\n if (newCoordinates) {\n const coordinatesDelta = subtract(newCoordinates, currentCoordinates);\n const scrollDelta = {\n x: 0,\n y: 0\n };\n const {\n scrollableAncestors\n } = context.current;\n\n for (const scrollContainer of scrollableAncestors) {\n const direction = event.code;\n const {\n isTop,\n isRight,\n isLeft,\n isBottom,\n maxScroll,\n minScroll\n } = getScrollPosition(scrollContainer);\n const scrollElementRect = getScrollElementRect(scrollContainer);\n const clampedCoordinates = {\n x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),\n y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))\n };\n const canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft;\n const canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop;\n\n if (canScrollX && clampedCoordinates.x !== newCoordinates.x) {\n const newScrollCoordinates = scrollContainer.scrollLeft + coordinatesDelta.x;\n const canScrollToNewCoordinates = direction === KeyboardCode.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode.Left && newScrollCoordinates >= minScroll.x;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.y) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n left: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.x = scrollContainer.scrollLeft - newScrollCoordinates;\n } else {\n scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;\n }\n\n if (scrollDelta.x) {\n scrollContainer.scrollBy({\n left: -scrollDelta.x,\n behavior: scrollBehavior\n });\n }\n\n break;\n } else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) {\n const newScrollCoordinates = scrollContainer.scrollTop + coordinatesDelta.y;\n const canScrollToNewCoordinates = direction === KeyboardCode.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode.Up && newScrollCoordinates >= minScroll.y;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.x) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n top: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.y = scrollContainer.scrollTop - newScrollCoordinates;\n } else {\n scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;\n }\n\n if (scrollDelta.y) {\n scrollContainer.scrollBy({\n top: -scrollDelta.y,\n behavior: scrollBehavior\n });\n }\n\n break;\n }\n }\n\n this.handleMove(event, add(subtract(newCoordinates, this.referenceCoordinates), scrollDelta));\n }\n }\n }\n\n handleMove(event, coordinates) {\n const {\n onMove\n } = this.props;\n event.preventDefault();\n onMove(coordinates);\n }\n\n handleEnd(event) {\n const {\n onEnd\n } = this.props;\n event.preventDefault();\n this.detach();\n onEnd();\n }\n\n handleCancel(event) {\n const {\n onCancel\n } = this.props;\n event.preventDefault();\n this.detach();\n onCancel();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll();\n }\n\n}\nKeyboardSensor.activators = [{\n eventName: 'onKeyDown',\n handler: (event, _ref, _ref2) => {\n let {\n keyboardCodes = defaultKeyboardCodes,\n onActivation\n } = _ref;\n let {\n active\n } = _ref2;\n const {\n code\n } = event.nativeEvent;\n\n if (keyboardCodes.start.includes(code)) {\n const activator = active.activatorNode.current;\n\n if (activator && event.target !== activator) {\n return false;\n }\n\n event.preventDefault();\n onActivation == null ? void 0 : onActivation({\n event: event.nativeEvent\n });\n return true;\n }\n\n return false;\n }\n}];\n\nfunction isDistanceConstraint(constraint) {\n return Boolean(constraint && 'distance' in constraint);\n}\n\nfunction isDelayConstraint(constraint) {\n return Boolean(constraint && 'delay' in constraint);\n}\n\nclass AbstractPointerSensor {\n constructor(props, events, listenerTarget) {\n var _getEventCoordinates;\n\n if (listenerTarget === void 0) {\n listenerTarget = getEventListenerTarget(props.event.target);\n }\n\n this.props = void 0;\n this.events = void 0;\n this.autoScrollEnabled = true;\n this.document = void 0;\n this.activated = false;\n this.initialCoordinates = void 0;\n this.timeoutId = null;\n this.listeners = void 0;\n this.documentListeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n this.events = events;\n const {\n event\n } = props;\n const {\n target\n } = event;\n this.props = props;\n this.events = events;\n this.document = getOwnerDocument(target);\n this.documentListeners = new Listeners(this.document);\n this.listeners = new Listeners(listenerTarget);\n this.windowListeners = new Listeners(getWindow(target));\n this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates;\n this.handleStart = this.handleStart.bind(this);\n this.handleMove = this.handleMove.bind(this);\n this.handleEnd = this.handleEnd.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.handleKeydown = this.handleKeydown.bind(this);\n this.removeTextSelection = this.removeTextSelection.bind(this);\n this.attach();\n }\n\n attach() {\n const {\n events,\n props: {\n options: {\n activationConstraint,\n bypassActivationConstraint\n }\n }\n } = this;\n this.listeners.add(events.move.name, this.handleMove, {\n passive: false\n });\n this.listeners.add(events.end.name, this.handleEnd);\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.DragStart, preventDefault);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n this.windowListeners.add(EventName.ContextMenu, preventDefault);\n this.documentListeners.add(EventName.Keydown, this.handleKeydown);\n\n if (activationConstraint) {\n if (bypassActivationConstraint != null && bypassActivationConstraint({\n event: this.props.event,\n activeNode: this.props.activeNode,\n options: this.props.options\n })) {\n return this.handleStart();\n }\n\n if (isDelayConstraint(activationConstraint)) {\n this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);\n return;\n }\n\n if (isDistanceConstraint(activationConstraint)) {\n return;\n }\n }\n\n this.handleStart();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll(); // Wait until the next event loop before removing document listeners\n // This is necessary because we listen for `click` and `selection` events on the document\n\n setTimeout(this.documentListeners.removeAll, 50);\n\n if (this.timeoutId !== null) {\n clearTimeout(this.timeoutId);\n this.timeoutId = null;\n }\n }\n\n handleStart() {\n const {\n initialCoordinates\n } = this;\n const {\n onStart\n } = this.props;\n\n if (initialCoordinates) {\n this.activated = true; // Stop propagation of click events once activation constraints are met\n\n this.documentListeners.add(EventName.Click, stopPropagation, {\n capture: true\n }); // Remove any text selection from the document\n\n this.removeTextSelection(); // Prevent further text selection while dragging\n\n this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection);\n onStart(initialCoordinates);\n }\n }\n\n handleMove(event) {\n var _getEventCoordinates2;\n\n const {\n activated,\n initialCoordinates,\n props\n } = this;\n const {\n onMove,\n options: {\n activationConstraint\n }\n } = props;\n\n if (!initialCoordinates) {\n return;\n }\n\n const coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates;\n const delta = subtract(initialCoordinates, coordinates); // Constraint validation\n\n if (!activated && activationConstraint) {\n if (isDistanceConstraint(activationConstraint)) {\n if (activationConstraint.tolerance != null && hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n\n if (hasExceededDistance(delta, activationConstraint.distance)) {\n return this.handleStart();\n }\n }\n\n if (isDelayConstraint(activationConstraint)) {\n if (hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n }\n\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n onMove(coordinates);\n }\n\n handleEnd() {\n const {\n onEnd\n } = this.props;\n this.detach();\n onEnd();\n }\n\n handleCancel() {\n const {\n onCancel\n } = this.props;\n this.detach();\n onCancel();\n }\n\n handleKeydown(event) {\n if (event.code === KeyboardCode.Esc) {\n this.handleCancel();\n }\n }\n\n removeTextSelection() {\n var _this$document$getSel;\n\n (_this$document$getSel = this.document.getSelection()) == null ? void 0 : _this$document$getSel.removeAllRanges();\n }\n\n}\n\nconst events = {\n move: {\n name: 'pointermove'\n },\n end: {\n name: 'pointerup'\n }\n};\nclass PointerSensor extends AbstractPointerSensor {\n constructor(props) {\n const {\n event\n } = props; // Pointer events stop firing if the target is unmounted while dragging\n // Therefore we attach listeners to the owner document instead\n\n const listenerTarget = getOwnerDocument(event.target);\n super(props, events, listenerTarget);\n }\n\n}\nPointerSensor.activators = [{\n eventName: 'onPointerDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (!event.isPrimary || event.button !== 0) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$1 = {\n move: {\n name: 'mousemove'\n },\n end: {\n name: 'mouseup'\n }\n};\nvar MouseButton;\n\n(function (MouseButton) {\n MouseButton[MouseButton[\"RightClick\"] = 2] = \"RightClick\";\n})(MouseButton || (MouseButton = {}));\n\nclass MouseSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$1, getOwnerDocument(props.event.target));\n }\n\n}\nMouseSensor.activators = [{\n eventName: 'onMouseDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (event.button === MouseButton.RightClick) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$2 = {\n move: {\n name: 'touchmove'\n },\n end: {\n name: 'touchend'\n }\n};\nclass TouchSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$2);\n }\n\n static setup() {\n // Adding a non-capture and non-passive `touchmove` listener in order\n // to force `event.preventDefault()` calls to work in dynamically added\n // touchmove event handlers. This is required for iOS Safari.\n window.addEventListener(events$2.move.name, noop, {\n capture: false,\n passive: false\n });\n return function teardown() {\n window.removeEventListener(events$2.move.name, noop);\n }; // We create a new handler because the teardown function of another sensor\n // could remove our event listener if we use a referentially equal listener.\n\n function noop() {}\n }\n\n}\nTouchSensor.activators = [{\n eventName: 'onTouchStart',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n const {\n touches\n } = event;\n\n if (touches.length > 1) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nvar AutoScrollActivator;\n\n(function (AutoScrollActivator) {\n AutoScrollActivator[AutoScrollActivator[\"Pointer\"] = 0] = \"Pointer\";\n AutoScrollActivator[AutoScrollActivator[\"DraggableRect\"] = 1] = \"DraggableRect\";\n})(AutoScrollActivator || (AutoScrollActivator = {}));\n\nvar TraversalOrder;\n\n(function (TraversalOrder) {\n TraversalOrder[TraversalOrder[\"TreeOrder\"] = 0] = \"TreeOrder\";\n TraversalOrder[TraversalOrder[\"ReversedTreeOrder\"] = 1] = \"ReversedTreeOrder\";\n})(TraversalOrder || (TraversalOrder = {}));\n\nfunction useAutoScroller(_ref) {\n let {\n acceleration,\n activator = AutoScrollActivator.Pointer,\n canScroll,\n draggingRect,\n enabled,\n interval = 5,\n order = TraversalOrder.TreeOrder,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects,\n delta,\n threshold\n } = _ref;\n const scrollIntent = useScrollIntent({\n delta,\n disabled: !enabled\n });\n const [setAutoScrollInterval, clearAutoScrollInterval] = useInterval();\n const scrollSpeed = useRef({\n x: 0,\n y: 0\n });\n const scrollDirection = useRef({\n x: 0,\n y: 0\n });\n const rect = useMemo(() => {\n switch (activator) {\n case AutoScrollActivator.Pointer:\n return pointerCoordinates ? {\n top: pointerCoordinates.y,\n bottom: pointerCoordinates.y,\n left: pointerCoordinates.x,\n right: pointerCoordinates.x\n } : null;\n\n case AutoScrollActivator.DraggableRect:\n return draggingRect;\n }\n }, [activator, draggingRect, pointerCoordinates]);\n const scrollContainerRef = useRef(null);\n const autoScroll = useCallback(() => {\n const scrollContainer = scrollContainerRef.current;\n\n if (!scrollContainer) {\n return;\n }\n\n const scrollLeft = scrollSpeed.current.x * scrollDirection.current.x;\n const scrollTop = scrollSpeed.current.y * scrollDirection.current.y;\n scrollContainer.scrollBy(scrollLeft, scrollTop);\n }, []);\n const sortedScrollableAncestors = useMemo(() => order === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order, scrollableAncestors]);\n useEffect(() => {\n if (!enabled || !scrollableAncestors.length || !rect) {\n clearAutoScrollInterval();\n return;\n }\n\n for (const scrollContainer of sortedScrollableAncestors) {\n if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) {\n continue;\n }\n\n const index = scrollableAncestors.indexOf(scrollContainer);\n const scrollContainerRect = scrollableAncestorRects[index];\n\n if (!scrollContainerRect) {\n continue;\n }\n\n const {\n direction,\n speed\n } = getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, rect, acceleration, threshold);\n\n for (const axis of ['x', 'y']) {\n if (!scrollIntent[axis][direction[axis]]) {\n speed[axis] = 0;\n direction[axis] = 0;\n }\n }\n\n if (speed.x > 0 || speed.y > 0) {\n clearAutoScrollInterval();\n scrollContainerRef.current = scrollContainer;\n setAutoScrollInterval(autoScroll, interval);\n scrollSpeed.current = speed;\n scrollDirection.current = direction;\n return;\n }\n }\n\n scrollSpeed.current = {\n x: 0,\n y: 0\n };\n scrollDirection.current = {\n x: 0,\n y: 0\n };\n clearAutoScrollInterval();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [acceleration, autoScroll, canScroll, clearAutoScrollInterval, enabled, interval, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(rect), // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(scrollIntent), setAutoScrollInterval, scrollableAncestors, sortedScrollableAncestors, scrollableAncestorRects, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold)]);\n}\nconst defaultScrollIntent = {\n x: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n },\n y: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n }\n};\n\nfunction useScrollIntent(_ref2) {\n let {\n delta,\n disabled\n } = _ref2;\n const previousDelta = usePrevious(delta);\n return useLazyMemo(previousIntent => {\n if (disabled || !previousDelta || !previousIntent) {\n // Reset scroll intent tracking when auto-scrolling is disabled\n return defaultScrollIntent;\n }\n\n const direction = {\n x: Math.sign(delta.x - previousDelta.x),\n y: Math.sign(delta.y - previousDelta.y)\n }; // Keep track of the user intent to scroll in each direction for both axis\n\n return {\n x: {\n [Direction.Backward]: previousIntent.x[Direction.Backward] || direction.x === -1,\n [Direction.Forward]: previousIntent.x[Direction.Forward] || direction.x === 1\n },\n y: {\n [Direction.Backward]: previousIntent.y[Direction.Backward] || direction.y === -1,\n [Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1\n }\n };\n }, [disabled, delta, previousDelta]);\n}\n\nfunction useCachedNode(draggableNodes, id) {\n const draggableNode = id !== null ? draggableNodes.get(id) : undefined;\n const node = draggableNode ? draggableNode.node.current : null;\n return useLazyMemo(cachedNode => {\n var _ref;\n\n if (id === null) {\n return null;\n } // In some cases, the draggable node can unmount while dragging\n // This is the case for virtualized lists. In those situations,\n // we fall back to the last known value for that node.\n\n\n return (_ref = node != null ? node : cachedNode) != null ? _ref : null;\n }, [node, id]);\n}\n\nfunction useCombineActivators(sensors, getSyntheticHandler) {\n return useMemo(() => sensors.reduce((accumulator, sensor) => {\n const {\n sensor: Sensor\n } = sensor;\n const sensorActivators = Sensor.activators.map(activator => ({\n eventName: activator.eventName,\n handler: getSyntheticHandler(activator.handler, sensor)\n }));\n return [...accumulator, ...sensorActivators];\n }, []), [sensors, getSyntheticHandler]);\n}\n\nvar MeasuringStrategy;\n\n(function (MeasuringStrategy) {\n MeasuringStrategy[MeasuringStrategy[\"Always\"] = 0] = \"Always\";\n MeasuringStrategy[MeasuringStrategy[\"BeforeDragging\"] = 1] = \"BeforeDragging\";\n MeasuringStrategy[MeasuringStrategy[\"WhileDragging\"] = 2] = \"WhileDragging\";\n})(MeasuringStrategy || (MeasuringStrategy = {}));\n\nvar MeasuringFrequency;\n\n(function (MeasuringFrequency) {\n MeasuringFrequency[\"Optimized\"] = \"optimized\";\n})(MeasuringFrequency || (MeasuringFrequency = {}));\n\nconst defaultValue = /*#__PURE__*/new Map();\nfunction useDroppableMeasuring(containers, _ref) {\n let {\n dragging,\n dependencies,\n config\n } = _ref;\n const [queue, setQueue] = useState(null);\n const {\n frequency,\n measure,\n strategy\n } = config;\n const containersRef = useRef(containers);\n const disabled = isDisabled();\n const disabledRef = useLatestValue(disabled);\n const measureDroppableContainers = useCallback(function (ids) {\n if (ids === void 0) {\n ids = [];\n }\n\n if (disabledRef.current) {\n return;\n }\n\n setQueue(value => {\n if (value === null) {\n return ids;\n }\n\n return value.concat(ids.filter(id => !value.includes(id)));\n });\n }, [disabledRef]);\n const timeoutId = useRef(null);\n const droppableRects = useLazyMemo(previousValue => {\n if (disabled && !dragging) {\n return defaultValue;\n }\n\n if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || queue != null) {\n const map = new Map();\n\n for (let container of containers) {\n if (!container) {\n continue;\n }\n\n if (queue && queue.length > 0 && !queue.includes(container.id) && container.rect.current) {\n // This container does not need to be re-measured\n map.set(container.id, container.rect.current);\n continue;\n }\n\n const node = container.node.current;\n const rect = node ? new Rect(measure(node), node) : null;\n container.rect.current = rect;\n\n if (rect) {\n map.set(container.id, rect);\n }\n }\n\n return map;\n }\n\n return previousValue;\n }, [containers, queue, dragging, disabled, measure]);\n useEffect(() => {\n containersRef.current = containers;\n }, [containers]);\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n measureDroppableContainers();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [dragging, disabled]);\n useEffect(() => {\n if (queue && queue.length > 0) {\n setQueue(null);\n }\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [JSON.stringify(queue)]);\n useEffect(() => {\n if (disabled || typeof frequency !== 'number' || timeoutId.current !== null) {\n return;\n }\n\n timeoutId.current = setTimeout(() => {\n measureDroppableContainers();\n timeoutId.current = null;\n }, frequency);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [frequency, disabled, measureDroppableContainers, ...dependencies]);\n return {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled: queue != null\n };\n\n function isDisabled() {\n switch (strategy) {\n case MeasuringStrategy.Always:\n return false;\n\n case MeasuringStrategy.BeforeDragging:\n return dragging;\n\n default:\n return !dragging;\n }\n }\n}\n\nfunction useInitialValue(value, computeFn) {\n return useLazyMemo(previousValue => {\n if (!value) {\n return null;\n }\n\n if (previousValue) {\n return previousValue;\n }\n\n return typeof computeFn === 'function' ? computeFn(value) : value;\n }, [computeFn, value]);\n}\n\nfunction useInitialRect(node, measure) {\n return useInitialValue(node, measure);\n}\n\n/**\r\n * Returns a new MutationObserver instance.\r\n * If `MutationObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useMutationObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleMutations = useEvent(callback);\n const mutationObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.MutationObserver === 'undefined') {\n return undefined;\n }\n\n const {\n MutationObserver\n } = window;\n return new MutationObserver(handleMutations);\n }, [handleMutations, disabled]);\n useEffect(() => {\n return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }, [mutationObserver]);\n return mutationObserver;\n}\n\n/**\r\n * Returns a new ResizeObserver instance bound to the `onResize` callback.\r\n * If `ResizeObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useResizeObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleResize = useEvent(callback);\n const resizeObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.ResizeObserver === 'undefined') {\n return undefined;\n }\n\n const {\n ResizeObserver\n } = window;\n return new ResizeObserver(handleResize);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [disabled]);\n useEffect(() => {\n return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();\n }, [resizeObserver]);\n return resizeObserver;\n}\n\nfunction defaultMeasure(element) {\n return new Rect(getClientRect(element), element);\n}\n\nfunction useRect(element, measure, fallbackRect) {\n if (measure === void 0) {\n measure = defaultMeasure;\n }\n\n const [rect, measureRect] = useReducer(reducer, null);\n const mutationObserver = useMutationObserver({\n callback(records) {\n if (!element) {\n return;\n }\n\n for (const record of records) {\n const {\n type,\n target\n } = record;\n\n if (type === 'childList' && target instanceof HTMLElement && target.contains(element)) {\n measureRect();\n break;\n }\n }\n }\n\n });\n const resizeObserver = useResizeObserver({\n callback: measureRect\n });\n useIsomorphicLayoutEffect(() => {\n measureRect();\n\n if (element) {\n resizeObserver == null ? void 0 : resizeObserver.observe(element);\n mutationObserver == null ? void 0 : mutationObserver.observe(document.body, {\n childList: true,\n subtree: true\n });\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }\n }, [element]);\n return rect;\n\n function reducer(currentRect) {\n if (!element) {\n return null;\n }\n\n if (element.isConnected === false) {\n var _ref;\n\n // Fall back to last rect we measured if the element is\n // no longer connected to the DOM.\n return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;\n }\n\n const newRect = measure(element);\n\n if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {\n return currentRect;\n }\n\n return newRect;\n }\n}\n\nfunction useRectDelta(rect) {\n const initialRect = useInitialValue(rect);\n return getRectDelta(rect, initialRect);\n}\n\nconst defaultValue$1 = [];\nfunction useScrollableAncestors(node) {\n const previousNode = useRef(node);\n const ancestors = useLazyMemo(previousValue => {\n if (!node) {\n return defaultValue$1;\n }\n\n if (previousValue && previousValue !== defaultValue$1 && node && previousNode.current && node.parentNode === previousNode.current.parentNode) {\n return previousValue;\n }\n\n return getScrollableAncestors(node);\n }, [node]);\n useEffect(() => {\n previousNode.current = node;\n }, [node]);\n return ancestors;\n}\n\nfunction useScrollOffsets(elements) {\n const [scrollCoordinates, setScrollCoordinates] = useState(null);\n const prevElements = useRef(elements); // To-do: Throttle the handleScroll callback\n\n const handleScroll = useCallback(event => {\n const scrollingElement = getScrollableElement(event.target);\n\n if (!scrollingElement) {\n return;\n }\n\n setScrollCoordinates(scrollCoordinates => {\n if (!scrollCoordinates) {\n return null;\n }\n\n scrollCoordinates.set(scrollingElement, getScrollCoordinates(scrollingElement));\n return new Map(scrollCoordinates);\n });\n }, []);\n useEffect(() => {\n const previousElements = prevElements.current;\n\n if (elements !== previousElements) {\n cleanup(previousElements);\n const entries = elements.map(element => {\n const scrollableElement = getScrollableElement(element);\n\n if (scrollableElement) {\n scrollableElement.addEventListener('scroll', handleScroll, {\n passive: true\n });\n return [scrollableElement, getScrollCoordinates(scrollableElement)];\n }\n\n return null;\n }).filter(entry => entry != null);\n setScrollCoordinates(entries.length ? new Map(entries) : null);\n prevElements.current = elements;\n }\n\n return () => {\n cleanup(elements);\n cleanup(previousElements);\n };\n\n function cleanup(elements) {\n elements.forEach(element => {\n const scrollableElement = getScrollableElement(element);\n scrollableElement == null ? void 0 : scrollableElement.removeEventListener('scroll', handleScroll);\n });\n }\n }, [handleScroll, elements]);\n return useMemo(() => {\n if (elements.length) {\n return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => add(acc, coordinates), defaultCoordinates) : getScrollOffsets(elements);\n }\n\n return defaultCoordinates;\n }, [elements, scrollCoordinates]);\n}\n\nfunction useScrollOffsetsDelta(scrollOffsets, dependencies) {\n if (dependencies === void 0) {\n dependencies = [];\n }\n\n const initialScrollOffsets = useRef(null);\n useEffect(() => {\n initialScrollOffsets.current = null;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n dependencies);\n useEffect(() => {\n const hasScrollOffsets = scrollOffsets !== defaultCoordinates;\n\n if (hasScrollOffsets && !initialScrollOffsets.current) {\n initialScrollOffsets.current = scrollOffsets;\n }\n\n if (!hasScrollOffsets && initialScrollOffsets.current) {\n initialScrollOffsets.current = null;\n }\n }, [scrollOffsets]);\n return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates;\n}\n\nfunction useSensorSetup(sensors) {\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n const teardownFns = sensors.map(_ref => {\n let {\n sensor\n } = _ref;\n return sensor.setup == null ? void 0 : sensor.setup();\n });\n return () => {\n for (const teardown of teardownFns) {\n teardown == null ? void 0 : teardown();\n }\n };\n }, // TO-DO: Sensors length could theoretically change which would not be a valid dependency\n // eslint-disable-next-line react-hooks/exhaustive-deps\n sensors.map(_ref2 => {\n let {\n sensor\n } = _ref2;\n return sensor;\n }));\n}\n\nfunction useSyntheticListeners(listeners, id) {\n return useMemo(() => {\n return listeners.reduce((acc, _ref) => {\n let {\n eventName,\n handler\n } = _ref;\n\n acc[eventName] = event => {\n handler(event, id);\n };\n\n return acc;\n }, {});\n }, [listeners, id]);\n}\n\nfunction useWindowRect(element) {\n return useMemo(() => element ? getWindowClientRect(element) : null, [element]);\n}\n\nconst defaultValue$2 = [];\nfunction useRects(elements, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n const [firstElement] = elements;\n const windowRect = useWindowRect(firstElement ? getWindow(firstElement) : null);\n const [rects, measureRects] = useReducer(reducer, defaultValue$2);\n const resizeObserver = useResizeObserver({\n callback: measureRects\n });\n\n if (elements.length > 0 && rects === defaultValue$2) {\n measureRects();\n }\n\n useIsomorphicLayoutEffect(() => {\n if (elements.length) {\n elements.forEach(element => resizeObserver == null ? void 0 : resizeObserver.observe(element));\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n measureRects();\n }\n }, [elements]);\n return rects;\n\n function reducer() {\n if (!elements.length) {\n return defaultValue$2;\n }\n\n return elements.map(element => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));\n }\n}\n\nfunction getMeasurableNode(node) {\n if (!node) {\n return null;\n }\n\n if (node.children.length > 1) {\n return node;\n }\n\n const firstChild = node.children[0];\n return isHTMLElement(firstChild) ? firstChild : node;\n}\n\nfunction useDragOverlayMeasuring(_ref) {\n let {\n measure\n } = _ref;\n const [rect, setRect] = useState(null);\n const handleResize = useCallback(entries => {\n for (const {\n target\n } of entries) {\n if (isHTMLElement(target)) {\n setRect(rect => {\n const newRect = measure(target);\n return rect ? { ...rect,\n width: newRect.width,\n height: newRect.height\n } : newRect;\n });\n break;\n }\n }\n }, [measure]);\n const resizeObserver = useResizeObserver({\n callback: handleResize\n });\n const handleNodeChange = useCallback(element => {\n const node = getMeasurableNode(element);\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n\n if (node) {\n resizeObserver == null ? void 0 : resizeObserver.observe(node);\n }\n\n setRect(node ? measure(node) : null);\n }, [measure, resizeObserver]);\n const [nodeRef, setRef] = useNodeRef(handleNodeChange);\n return useMemo(() => ({\n nodeRef,\n rect,\n setRef\n }), [rect, nodeRef, setRef]);\n}\n\nconst defaultSensors = [{\n sensor: PointerSensor,\n options: {}\n}, {\n sensor: KeyboardSensor,\n options: {}\n}];\nconst defaultData = {\n current: {}\n};\nconst defaultMeasuringConfiguration = {\n draggable: {\n measure: getTransformAgnosticClientRect\n },\n droppable: {\n measure: getTransformAgnosticClientRect,\n strategy: MeasuringStrategy.WhileDragging,\n frequency: MeasuringFrequency.Optimized\n },\n dragOverlay: {\n measure: getClientRect\n }\n};\n\nclass DroppableContainersMap extends Map {\n get(id) {\n var _super$get;\n\n return id != null ? (_super$get = super.get(id)) != null ? _super$get : undefined : undefined;\n }\n\n toArray() {\n return Array.from(this.values());\n }\n\n getEnabled() {\n return this.toArray().filter(_ref => {\n let {\n disabled\n } = _ref;\n return !disabled;\n });\n }\n\n getNodeFor(id) {\n var _this$get$node$curren, _this$get;\n\n return (_this$get$node$curren = (_this$get = this.get(id)) == null ? void 0 : _this$get.node.current) != null ? _this$get$node$curren : undefined;\n }\n\n}\n\nconst defaultPublicContext = {\n activatorEvent: null,\n active: null,\n activeNode: null,\n activeNodeRect: null,\n collisions: null,\n containerNodeRect: null,\n draggableNodes: /*#__PURE__*/new Map(),\n droppableRects: /*#__PURE__*/new Map(),\n droppableContainers: /*#__PURE__*/new DroppableContainersMap(),\n over: null,\n dragOverlay: {\n nodeRef: {\n current: null\n },\n rect: null,\n setRef: noop\n },\n scrollableAncestors: [],\n scrollableAncestorRects: [],\n measuringConfiguration: defaultMeasuringConfiguration,\n measureDroppableContainers: noop,\n windowRect: null,\n measuringScheduled: false\n};\nconst defaultInternalContext = {\n activatorEvent: null,\n activators: [],\n active: null,\n activeNodeRect: null,\n ariaDescribedById: {\n draggable: ''\n },\n dispatch: noop,\n draggableNodes: /*#__PURE__*/new Map(),\n over: null,\n measureDroppableContainers: noop\n};\nconst InternalContext = /*#__PURE__*/createContext(defaultInternalContext);\nconst PublicContext = /*#__PURE__*/createContext(defaultPublicContext);\n\nfunction getInitialState() {\n return {\n draggable: {\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n nodes: new Map(),\n translate: {\n x: 0,\n y: 0\n }\n },\n droppable: {\n containers: new DroppableContainersMap()\n }\n };\n}\nfunction reducer(state, action) {\n switch (action.type) {\n case Action.DragStart:\n return { ...state,\n draggable: { ...state.draggable,\n initialCoordinates: action.initialCoordinates,\n active: action.active\n }\n };\n\n case Action.DragMove:\n if (!state.draggable.active) {\n return state;\n }\n\n return { ...state,\n draggable: { ...state.draggable,\n translate: {\n x: action.coordinates.x - state.draggable.initialCoordinates.x,\n y: action.coordinates.y - state.draggable.initialCoordinates.y\n }\n }\n };\n\n case Action.DragEnd:\n case Action.DragCancel:\n return { ...state,\n draggable: { ...state.draggable,\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n translate: {\n x: 0,\n y: 0\n }\n }\n };\n\n case Action.RegisterDroppable:\n {\n const {\n element\n } = action;\n const {\n id\n } = element;\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, element);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.SetDroppableDisabled:\n {\n const {\n id,\n key,\n disabled\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, { ...element,\n disabled\n });\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.UnregisterDroppable:\n {\n const {\n id,\n key\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.delete(id);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nfunction RestoreFocus(_ref) {\n let {\n disabled\n } = _ref;\n const {\n active,\n activatorEvent,\n draggableNodes\n } = useContext(InternalContext);\n const previousActivatorEvent = usePrevious(activatorEvent);\n const previousActiveId = usePrevious(active == null ? void 0 : active.id); // Restore keyboard focus on the activator node\n\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n if (!activatorEvent && previousActivatorEvent && previousActiveId != null) {\n if (!isKeyboardEvent(previousActivatorEvent)) {\n return;\n }\n\n if (document.activeElement === previousActivatorEvent.target) {\n // No need to restore focus\n return;\n }\n\n const draggableNode = draggableNodes.get(previousActiveId);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n activatorNode,\n node\n } = draggableNode;\n\n if (!activatorNode.current && !node.current) {\n return;\n }\n\n requestAnimationFrame(() => {\n for (const element of [activatorNode.current, node.current]) {\n if (!element) {\n continue;\n }\n\n const focusableNode = findFirstFocusableNode(element);\n\n if (focusableNode) {\n focusableNode.focus();\n break;\n }\n }\n });\n }\n }, [activatorEvent, disabled, draggableNodes, previousActiveId, previousActivatorEvent]);\n return null;\n}\n\nfunction applyModifiers(modifiers, _ref) {\n let {\n transform,\n ...args\n } = _ref;\n return modifiers != null && modifiers.length ? modifiers.reduce((accumulator, modifier) => {\n return modifier({\n transform: accumulator,\n ...args\n });\n }, transform) : transform;\n}\n\nfunction useMeasuringConfiguration(config) {\n return useMemo(() => ({\n draggable: { ...defaultMeasuringConfiguration.draggable,\n ...(config == null ? void 0 : config.draggable)\n },\n droppable: { ...defaultMeasuringConfiguration.droppable,\n ...(config == null ? void 0 : config.droppable)\n },\n dragOverlay: { ...defaultMeasuringConfiguration.dragOverlay,\n ...(config == null ? void 0 : config.dragOverlay)\n }\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [config == null ? void 0 : config.draggable, config == null ? void 0 : config.droppable, config == null ? void 0 : config.dragOverlay]);\n}\n\nfunction useLayoutShiftScrollCompensation(_ref) {\n let {\n activeNode,\n measure,\n initialRect,\n config = true\n } = _ref;\n const initialized = useRef(false);\n const {\n x,\n y\n } = typeof config === 'boolean' ? {\n x: config,\n y: config\n } : config;\n useIsomorphicLayoutEffect(() => {\n const disabled = !x && !y;\n\n if (disabled || !activeNode) {\n initialized.current = false;\n return;\n }\n\n if (initialized.current || !initialRect) {\n // Return early if layout shift scroll compensation was already attempted\n // or if there is no initialRect to compare to.\n return;\n } // Get the most up to date node ref for the active draggable\n\n\n const node = activeNode == null ? void 0 : activeNode.node.current;\n\n if (!node || node.isConnected === false) {\n // Return early if there is no attached node ref or if the node is\n // disconnected from the document.\n return;\n }\n\n const rect = measure(node);\n const rectDelta = getRectDelta(rect, initialRect);\n\n if (!x) {\n rectDelta.x = 0;\n }\n\n if (!y) {\n rectDelta.y = 0;\n } // Only perform layout shift scroll compensation once\n\n\n initialized.current = true;\n\n if (Math.abs(rectDelta.x) > 0 || Math.abs(rectDelta.y) > 0) {\n const firstScrollableAncestor = getFirstScrollableAncestor(node);\n\n if (firstScrollableAncestor) {\n firstScrollableAncestor.scrollBy({\n top: rectDelta.y,\n left: rectDelta.x\n });\n }\n }\n }, [activeNode, x, y, initialRect, measure]);\n}\n\nconst ActiveDraggableContext = /*#__PURE__*/createContext({ ...defaultCoordinates,\n scaleX: 1,\n scaleY: 1\n});\nvar Status;\n\n(function (Status) {\n Status[Status[\"Uninitialized\"] = 0] = \"Uninitialized\";\n Status[Status[\"Initializing\"] = 1] = \"Initializing\";\n Status[Status[\"Initialized\"] = 2] = \"Initialized\";\n})(Status || (Status = {}));\n\nconst DndContext = /*#__PURE__*/memo(function DndContext(_ref) {\n var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;\n\n let {\n id,\n accessibility,\n autoScroll = true,\n children,\n sensors = defaultSensors,\n collisionDetection = rectIntersection,\n measuring,\n modifiers,\n ...props\n } = _ref;\n const store = useReducer(reducer, undefined, getInitialState);\n const [state, dispatch] = store;\n const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();\n const [status, setStatus] = useState(Status.Uninitialized);\n const isInitialized = status === Status.Initialized;\n const {\n draggable: {\n active: activeId,\n nodes: draggableNodes,\n translate\n },\n droppable: {\n containers: droppableContainers\n }\n } = state;\n const node = activeId ? draggableNodes.get(activeId) : null;\n const activeRects = useRef({\n initial: null,\n translated: null\n });\n const active = useMemo(() => {\n var _node$data;\n\n return activeId != null ? {\n id: activeId,\n // It's possible for the active node to unmount while dragging\n data: (_node$data = node == null ? void 0 : node.data) != null ? _node$data : defaultData,\n rect: activeRects\n } : null;\n }, [activeId, node]);\n const activeRef = useRef(null);\n const [activeSensor, setActiveSensor] = useState(null);\n const [activatorEvent, setActivatorEvent] = useState(null);\n const latestProps = useLatestValue(props, Object.values(props));\n const draggableDescribedById = useUniqueId(\"DndDescribedBy\", id);\n const enabledDroppableContainers = useMemo(() => droppableContainers.getEnabled(), [droppableContainers]);\n const measuringConfiguration = useMeasuringConfiguration(measuring);\n const {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled\n } = useDroppableMeasuring(enabledDroppableContainers, {\n dragging: isInitialized,\n dependencies: [translate.x, translate.y],\n config: measuringConfiguration.droppable\n });\n const activeNode = useCachedNode(draggableNodes, activeId);\n const activationCoordinates = useMemo(() => activatorEvent ? getEventCoordinates(activatorEvent) : null, [activatorEvent]);\n const autoScrollOptions = getAutoScrollerOptions();\n const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure);\n useLayoutShiftScrollCompensation({\n activeNode: activeId ? draggableNodes.get(activeId) : null,\n config: autoScrollOptions.layoutShiftCompensation,\n initialRect: initialActiveNodeRect,\n measure: measuringConfiguration.draggable.measure\n });\n const activeNodeRect = useRect(activeNode, measuringConfiguration.draggable.measure, initialActiveNodeRect);\n const containerNodeRect = useRect(activeNode ? activeNode.parentElement : null);\n const sensorContext = useRef({\n activatorEvent: null,\n active: null,\n activeNode,\n collisionRect: null,\n collisions: null,\n droppableRects,\n draggableNodes,\n draggingNode: null,\n draggingNodeRect: null,\n droppableContainers,\n over: null,\n scrollableAncestors: [],\n scrollAdjustedTranslate: null\n });\n const overNode = droppableContainers.getNodeFor((_sensorContext$curren = sensorContext.current.over) == null ? void 0 : _sensorContext$curren.id);\n const dragOverlay = useDragOverlayMeasuring({\n measure: measuringConfiguration.dragOverlay.measure\n }); // Use the rect of the drag overlay if it is mounted\n\n const draggingNode = (_dragOverlay$nodeRef$ = dragOverlay.nodeRef.current) != null ? _dragOverlay$nodeRef$ : activeNode;\n const draggingNodeRect = isInitialized ? (_dragOverlay$rect = dragOverlay.rect) != null ? _dragOverlay$rect : activeNodeRect : null;\n const usesDragOverlay = Boolean(dragOverlay.nodeRef.current && dragOverlay.rect); // The delta between the previous and new position of the draggable node\n // is only relevant when there is no drag overlay\n\n const nodeRectDelta = useRectDelta(usesDragOverlay ? null : activeNodeRect); // Get the window rect of the dragging node\n\n const windowRect = useWindowRect(draggingNode ? getWindow(draggingNode) : null); // Get scrollable ancestors of the dragging node\n\n const scrollableAncestors = useScrollableAncestors(isInitialized ? overNode != null ? overNode : activeNode : null);\n const scrollableAncestorRects = useRects(scrollableAncestors); // Apply modifiers\n\n const modifiedTranslate = applyModifiers(modifiers, {\n transform: {\n x: translate.x - nodeRectDelta.x,\n y: translate.y - nodeRectDelta.y,\n scaleX: 1,\n scaleY: 1\n },\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect,\n over: sensorContext.current.over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n });\n const pointerCoordinates = activationCoordinates ? add(activationCoordinates, translate) : null;\n const scrollOffsets = useScrollOffsets(scrollableAncestors); // Represents the scroll delta since dragging was initiated\n\n const scrollAdjustment = useScrollOffsetsDelta(scrollOffsets); // Represents the scroll delta since the last time the active node rect was measured\n\n const activeNodeScrollDelta = useScrollOffsetsDelta(scrollOffsets, [activeNodeRect]);\n const scrollAdjustedTranslate = add(modifiedTranslate, scrollAdjustment);\n const collisionRect = draggingNodeRect ? getAdjustedRect(draggingNodeRect, modifiedTranslate) : null;\n const collisions = active && collisionRect ? collisionDetection({\n active,\n collisionRect,\n droppableRects,\n droppableContainers: enabledDroppableContainers,\n pointerCoordinates\n }) : null;\n const overId = getFirstCollision(collisions, 'id');\n const [over, setOver] = useState(null); // When there is no drag overlay used, we need to account for the\n // window scroll delta\n\n const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);\n const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);\n const instantiateSensor = useCallback((event, _ref2) => {\n let {\n sensor: Sensor,\n options\n } = _ref2;\n\n if (activeRef.current == null) {\n return;\n }\n\n const activeNode = draggableNodes.get(activeRef.current);\n\n if (!activeNode) {\n return;\n }\n\n const activatorEvent = event.nativeEvent;\n const sensorInstance = new Sensor({\n active: activeRef.current,\n activeNode,\n event: activatorEvent,\n options,\n // Sensors need to be instantiated with refs for arguments that change over time\n // otherwise they are frozen in time with the stale arguments\n context: sensorContext,\n\n onStart(initialCoordinates) {\n const id = activeRef.current;\n\n if (id == null) {\n return;\n }\n\n const draggableNode = draggableNodes.get(id);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n onDragStart\n } = latestProps.current;\n const event = {\n active: {\n id,\n data: draggableNode.data,\n rect: activeRects\n }\n };\n unstable_batchedUpdates(() => {\n onDragStart == null ? void 0 : onDragStart(event);\n setStatus(Status.Initializing);\n dispatch({\n type: Action.DragStart,\n initialCoordinates,\n active: id\n });\n dispatchMonitorEvent({\n type: 'onDragStart',\n event\n });\n });\n },\n\n onMove(coordinates) {\n dispatch({\n type: Action.DragMove,\n coordinates\n });\n },\n\n onEnd: createHandler(Action.DragEnd),\n onCancel: createHandler(Action.DragCancel)\n });\n unstable_batchedUpdates(() => {\n setActiveSensor(sensorInstance);\n setActivatorEvent(event.nativeEvent);\n });\n\n function createHandler(type) {\n return async function handler() {\n const {\n active,\n collisions,\n over,\n scrollAdjustedTranslate\n } = sensorContext.current;\n let event = null;\n\n if (active && scrollAdjustedTranslate) {\n const {\n cancelDrop\n } = latestProps.current;\n event = {\n activatorEvent,\n active: active,\n collisions,\n delta: scrollAdjustedTranslate,\n over\n };\n\n if (type === Action.DragEnd && typeof cancelDrop === 'function') {\n const shouldCancel = await Promise.resolve(cancelDrop(event));\n\n if (shouldCancel) {\n type = Action.DragCancel;\n }\n }\n }\n\n activeRef.current = null;\n unstable_batchedUpdates(() => {\n dispatch({\n type\n });\n setStatus(Status.Uninitialized);\n setOver(null);\n setActiveSensor(null);\n setActivatorEvent(null);\n const eventName = type === Action.DragEnd ? 'onDragEnd' : 'onDragCancel';\n\n if (event) {\n const handler = latestProps.current[eventName];\n handler == null ? void 0 : handler(event);\n dispatchMonitorEvent({\n type: eventName,\n event\n });\n }\n });\n };\n }\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes]);\n const bindActivatorToSensorInstantiator = useCallback((handler, sensor) => {\n return (event, active) => {\n const nativeEvent = event.nativeEvent;\n const activeDraggableNode = draggableNodes.get(active);\n\n if ( // Another sensor is already instantiating\n activeRef.current !== null || // No active draggable\n !activeDraggableNode || // Event has already been captured\n nativeEvent.dndKit || nativeEvent.defaultPrevented) {\n return;\n }\n\n const activationContext = {\n active: activeDraggableNode\n };\n const shouldActivate = handler(event, sensor.options, activationContext);\n\n if (shouldActivate === true) {\n nativeEvent.dndKit = {\n capturedBy: sensor.sensor\n };\n activeRef.current = active;\n instantiateSensor(event, sensor);\n }\n };\n }, [draggableNodes, instantiateSensor]);\n const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);\n useSensorSetup(sensors);\n useIsomorphicLayoutEffect(() => {\n if (activeNodeRect && status === Status.Initializing) {\n setStatus(Status.Initialized);\n }\n }, [activeNodeRect, status]);\n useEffect(() => {\n const {\n onDragMove\n } = latestProps.current;\n const {\n active,\n activatorEvent,\n collisions,\n over\n } = sensorContext.current;\n\n if (!active || !activatorEvent) {\n return;\n }\n\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n onDragMove == null ? void 0 : onDragMove(event);\n dispatchMonitorEvent({\n type: 'onDragMove',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]);\n useEffect(() => {\n const {\n active,\n activatorEvent,\n collisions,\n droppableContainers,\n scrollAdjustedTranslate\n } = sensorContext.current;\n\n if (!active || activeRef.current == null || !activatorEvent || !scrollAdjustedTranslate) {\n return;\n }\n\n const {\n onDragOver\n } = latestProps.current;\n const overContainer = droppableContainers.get(overId);\n const over = overContainer && overContainer.rect.current ? {\n id: overContainer.id,\n rect: overContainer.rect.current,\n data: overContainer.data,\n disabled: overContainer.disabled\n } : null;\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n setOver(over);\n onDragOver == null ? void 0 : onDragOver(event);\n dispatchMonitorEvent({\n type: 'onDragOver',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [overId]);\n useIsomorphicLayoutEffect(() => {\n sensorContext.current = {\n activatorEvent,\n active,\n activeNode,\n collisionRect,\n collisions,\n droppableRects,\n draggableNodes,\n draggingNode,\n draggingNodeRect,\n droppableContainers,\n over,\n scrollableAncestors,\n scrollAdjustedTranslate\n };\n activeRects.current = {\n initial: draggingNodeRect,\n translated: collisionRect\n };\n }, [active, activeNode, collisions, collisionRect, draggableNodes, draggingNode, draggingNodeRect, droppableRects, droppableContainers, over, scrollableAncestors, scrollAdjustedTranslate]);\n useAutoScroller({ ...autoScrollOptions,\n delta: translate,\n draggingRect: collisionRect,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects\n });\n const publicContext = useMemo(() => {\n const context = {\n active,\n activeNode,\n activeNodeRect,\n activatorEvent,\n collisions,\n containerNodeRect,\n dragOverlay,\n draggableNodes,\n droppableContainers,\n droppableRects,\n over,\n measureDroppableContainers,\n scrollableAncestors,\n scrollableAncestorRects,\n measuringConfiguration,\n measuringScheduled,\n windowRect\n };\n return context;\n }, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringConfiguration, measuringScheduled, windowRect]);\n const internalContext = useMemo(() => {\n const context = {\n activatorEvent,\n activators,\n active,\n activeNodeRect,\n ariaDescribedById: {\n draggable: draggableDescribedById\n },\n dispatch,\n draggableNodes,\n over,\n measureDroppableContainers\n };\n return context;\n }, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]);\n return React.createElement(DndMonitorContext.Provider, {\n value: registerMonitorListener\n }, React.createElement(InternalContext.Provider, {\n value: internalContext\n }, React.createElement(PublicContext.Provider, {\n value: publicContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: transform\n }, children)), React.createElement(RestoreFocus, {\n disabled: (accessibility == null ? void 0 : accessibility.restoreFocus) === false\n })), React.createElement(Accessibility, { ...accessibility,\n hiddenTextDescribedById: draggableDescribedById\n }));\n\n function getAutoScrollerOptions() {\n const activeSensorDisablesAutoscroll = (activeSensor == null ? void 0 : activeSensor.autoScrollEnabled) === false;\n const autoScrollGloballyDisabled = typeof autoScroll === 'object' ? autoScroll.enabled === false : autoScroll === false;\n const enabled = isInitialized && !activeSensorDisablesAutoscroll && !autoScrollGloballyDisabled;\n\n if (typeof autoScroll === 'object') {\n return { ...autoScroll,\n enabled\n };\n }\n\n return {\n enabled\n };\n }\n});\n\nconst NullContext = /*#__PURE__*/createContext(null);\nconst defaultRole = 'button';\nconst ID_PREFIX = 'Droppable';\nfunction useDraggable(_ref) {\n let {\n id,\n data,\n disabled = false,\n attributes\n } = _ref;\n const key = useUniqueId(ID_PREFIX);\n const {\n activators,\n activatorEvent,\n active,\n activeNodeRect,\n ariaDescribedById,\n draggableNodes,\n over\n } = useContext(InternalContext);\n const {\n role = defaultRole,\n roleDescription = 'draggable',\n tabIndex = 0\n } = attributes != null ? attributes : {};\n const isDragging = (active == null ? void 0 : active.id) === id;\n const transform = useContext(isDragging ? ActiveDraggableContext : NullContext);\n const [node, setNodeRef] = useNodeRef();\n const [activatorNode, setActivatorNodeRef] = useNodeRef();\n const listeners = useSyntheticListeners(activators, id);\n const dataRef = useLatestValue(data);\n useIsomorphicLayoutEffect(() => {\n draggableNodes.set(id, {\n id,\n key,\n node,\n activatorNode,\n data: dataRef\n });\n return () => {\n const node = draggableNodes.get(id);\n\n if (node && node.key === key) {\n draggableNodes.delete(id);\n }\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes, id]);\n const memoizedAttributes = useMemo(() => ({\n role,\n tabIndex,\n 'aria-disabled': disabled,\n 'aria-pressed': isDragging && role === defaultRole ? true : undefined,\n 'aria-roledescription': roleDescription,\n 'aria-describedby': ariaDescribedById.draggable\n }), [disabled, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);\n return {\n active,\n activatorEvent,\n activeNodeRect,\n attributes: memoizedAttributes,\n isDragging,\n listeners: disabled ? undefined : listeners,\n node,\n over,\n setNodeRef,\n setActivatorNodeRef,\n transform\n };\n}\n\nfunction useDndContext() {\n return useContext(PublicContext);\n}\n\nconst ID_PREFIX$1 = 'Droppable';\nconst defaultResizeObserverConfig = {\n timeout: 25\n};\nfunction useDroppable(_ref) {\n let {\n data,\n disabled = false,\n id,\n resizeObserverConfig\n } = _ref;\n const key = useUniqueId(ID_PREFIX$1);\n const {\n active,\n dispatch,\n over,\n measureDroppableContainers\n } = useContext(InternalContext);\n const previous = useRef({\n disabled\n });\n const resizeObserverConnected = useRef(false);\n const rect = useRef(null);\n const callbackId = useRef(null);\n const {\n disabled: resizeObserverDisabled,\n updateMeasurementsFor,\n timeout: resizeObserverTimeout\n } = { ...defaultResizeObserverConfig,\n ...resizeObserverConfig\n };\n const ids = useLatestValue(updateMeasurementsFor != null ? updateMeasurementsFor : id);\n const handleResize = useCallback(() => {\n if (!resizeObserverConnected.current) {\n // ResizeObserver invokes the `handleResize` callback as soon as `observe` is called,\n // assuming the element is rendered and displayed.\n resizeObserverConnected.current = true;\n return;\n }\n\n if (callbackId.current != null) {\n clearTimeout(callbackId.current);\n }\n\n callbackId.current = setTimeout(() => {\n measureDroppableContainers(Array.isArray(ids.current) ? ids.current : [ids.current]);\n callbackId.current = null;\n }, resizeObserverTimeout);\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [resizeObserverTimeout]);\n const resizeObserver = useResizeObserver({\n callback: handleResize,\n disabled: resizeObserverDisabled || !active\n });\n const handleNodeChange = useCallback((newElement, previousElement) => {\n if (!resizeObserver) {\n return;\n }\n\n if (previousElement) {\n resizeObserver.unobserve(previousElement);\n resizeObserverConnected.current = false;\n }\n\n if (newElement) {\n resizeObserver.observe(newElement);\n }\n }, [resizeObserver]);\n const [nodeRef, setNodeRef] = useNodeRef(handleNodeChange);\n const dataRef = useLatestValue(data);\n useEffect(() => {\n if (!resizeObserver || !nodeRef.current) {\n return;\n }\n\n resizeObserver.disconnect();\n resizeObserverConnected.current = false;\n resizeObserver.observe(nodeRef.current);\n }, [nodeRef, resizeObserver]);\n useIsomorphicLayoutEffect(() => {\n dispatch({\n type: Action.RegisterDroppable,\n element: {\n id,\n key,\n disabled,\n node: nodeRef,\n rect,\n data: dataRef\n }\n });\n return () => dispatch({\n type: Action.UnregisterDroppable,\n key,\n id\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [id]);\n useEffect(() => {\n if (disabled !== previous.current.disabled) {\n dispatch({\n type: Action.SetDroppableDisabled,\n id,\n key,\n disabled\n });\n previous.current.disabled = disabled;\n }\n }, [id, key, disabled, dispatch]);\n return {\n active,\n rect,\n isOver: (over == null ? void 0 : over.id) === id,\n node: nodeRef,\n over,\n setNodeRef\n };\n}\n\nfunction AnimationManager(_ref) {\n let {\n animation,\n children\n } = _ref;\n const [clonedChildren, setClonedChildren] = useState(null);\n const [element, setElement] = useState(null);\n const previousChildren = usePrevious(children);\n\n if (!children && !clonedChildren && previousChildren) {\n setClonedChildren(previousChildren);\n }\n\n useIsomorphicLayoutEffect(() => {\n if (!element) {\n return;\n }\n\n const key = clonedChildren == null ? void 0 : clonedChildren.key;\n const id = clonedChildren == null ? void 0 : clonedChildren.props.id;\n\n if (key == null || id == null) {\n setClonedChildren(null);\n return;\n }\n\n Promise.resolve(animation(id, element)).then(() => {\n setClonedChildren(null);\n });\n }, [animation, clonedChildren, element]);\n return React.createElement(React.Fragment, null, children, clonedChildren ? cloneElement(clonedChildren, {\n ref: setElement\n }) : null);\n}\n\nconst defaultTransform = {\n x: 0,\n y: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction NullifiedContextProvider(_ref) {\n let {\n children\n } = _ref;\n return React.createElement(InternalContext.Provider, {\n value: defaultInternalContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: defaultTransform\n }, children));\n}\n\nconst baseStyles = {\n position: 'fixed',\n touchAction: 'none'\n};\n\nconst defaultTransition = activatorEvent => {\n const isKeyboardActivator = isKeyboardEvent(activatorEvent);\n return isKeyboardActivator ? 'transform 250ms ease' : undefined;\n};\n\nconst PositionedOverlay = /*#__PURE__*/forwardRef((_ref, ref) => {\n let {\n as,\n activatorEvent,\n adjustScale,\n children,\n className,\n rect,\n style,\n transform,\n transition = defaultTransition\n } = _ref;\n\n if (!rect) {\n return null;\n }\n\n const scaleAdjustedTransform = adjustScale ? transform : { ...transform,\n scaleX: 1,\n scaleY: 1\n };\n const styles = { ...baseStyles,\n width: rect.width,\n height: rect.height,\n top: rect.top,\n left: rect.left,\n transform: CSS.Transform.toString(scaleAdjustedTransform),\n transformOrigin: adjustScale && activatorEvent ? getRelativeTransformOrigin(activatorEvent, rect) : undefined,\n transition: typeof transition === 'function' ? transition(activatorEvent) : transition,\n ...style\n };\n return React.createElement(as, {\n className,\n style: styles,\n ref\n }, children);\n});\n\nconst defaultDropAnimationSideEffects = options => _ref => {\n let {\n active,\n dragOverlay\n } = _ref;\n const originalStyles = {};\n const {\n styles,\n className\n } = options;\n\n if (styles != null && styles.active) {\n for (const [key, value] of Object.entries(styles.active)) {\n if (value === undefined) {\n continue;\n }\n\n originalStyles[key] = active.node.style.getPropertyValue(key);\n active.node.style.setProperty(key, value);\n }\n }\n\n if (styles != null && styles.dragOverlay) {\n for (const [key, value] of Object.entries(styles.dragOverlay)) {\n if (value === undefined) {\n continue;\n }\n\n dragOverlay.node.style.setProperty(key, value);\n }\n }\n\n if (className != null && className.active) {\n active.node.classList.add(className.active);\n }\n\n if (className != null && className.dragOverlay) {\n dragOverlay.node.classList.add(className.dragOverlay);\n }\n\n return function cleanup() {\n for (const [key, value] of Object.entries(originalStyles)) {\n active.node.style.setProperty(key, value);\n }\n\n if (className != null && className.active) {\n active.node.classList.remove(className.active);\n }\n };\n};\n\nconst defaultKeyframeResolver = _ref2 => {\n let {\n transform: {\n initial,\n final\n }\n } = _ref2;\n return [{\n transform: CSS.Transform.toString(initial)\n }, {\n transform: CSS.Transform.toString(final)\n }];\n};\n\nconst defaultDropAnimationConfiguration = {\n duration: 250,\n easing: 'ease',\n keyframes: defaultKeyframeResolver,\n sideEffects: /*#__PURE__*/defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: '0'\n }\n }\n })\n};\nfunction useDropAnimation(_ref3) {\n let {\n config,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n } = _ref3;\n return useEvent((id, node) => {\n if (config === null) {\n return;\n }\n\n const activeDraggable = draggableNodes.get(id);\n\n if (!activeDraggable) {\n return;\n }\n\n const activeNode = activeDraggable.node.current;\n\n if (!activeNode) {\n return;\n }\n\n const measurableNode = getMeasurableNode(node);\n\n if (!measurableNode) {\n return;\n }\n\n const {\n transform\n } = getWindow(node).getComputedStyle(node);\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return;\n }\n\n const animation = typeof config === 'function' ? config : createDefaultDropAnimation(config);\n scrollIntoViewIfNeeded(activeNode, measuringConfiguration.draggable.measure);\n return animation({\n active: {\n id,\n data: activeDraggable.data,\n node: activeNode,\n rect: measuringConfiguration.draggable.measure(activeNode)\n },\n draggableNodes,\n dragOverlay: {\n node,\n rect: measuringConfiguration.dragOverlay.measure(measurableNode)\n },\n droppableContainers,\n measuringConfiguration,\n transform: parsedTransform\n });\n });\n}\n\nfunction createDefaultDropAnimation(options) {\n const {\n duration,\n easing,\n sideEffects,\n keyframes\n } = { ...defaultDropAnimationConfiguration,\n ...options\n };\n return _ref4 => {\n let {\n active,\n dragOverlay,\n transform,\n ...rest\n } = _ref4;\n\n if (!duration) {\n // Do not animate if animation duration is zero.\n return;\n }\n\n const delta = {\n x: dragOverlay.rect.left - active.rect.left,\n y: dragOverlay.rect.top - active.rect.top\n };\n const scale = {\n scaleX: transform.scaleX !== 1 ? active.rect.width * transform.scaleX / dragOverlay.rect.width : 1,\n scaleY: transform.scaleY !== 1 ? active.rect.height * transform.scaleY / dragOverlay.rect.height : 1\n };\n const finalTransform = {\n x: transform.x - delta.x,\n y: transform.y - delta.y,\n ...scale\n };\n const animationKeyframes = keyframes({ ...rest,\n active,\n dragOverlay,\n transform: {\n initial: transform,\n final: finalTransform\n }\n });\n const [firstKeyframe] = animationKeyframes;\n const lastKeyframe = animationKeyframes[animationKeyframes.length - 1];\n\n if (JSON.stringify(firstKeyframe) === JSON.stringify(lastKeyframe)) {\n // The start and end keyframes are the same, infer that there is no animation needed.\n return;\n }\n\n const cleanup = sideEffects == null ? void 0 : sideEffects({\n active,\n dragOverlay,\n ...rest\n });\n const animation = dragOverlay.node.animate(animationKeyframes, {\n duration,\n easing,\n fill: 'forwards'\n });\n return new Promise(resolve => {\n animation.onfinish = () => {\n cleanup == null ? void 0 : cleanup();\n resolve();\n };\n });\n };\n}\n\nlet key = 0;\nfunction useKey(id) {\n return useMemo(() => {\n if (id == null) {\n return;\n }\n\n key++;\n return key;\n }, [id]);\n}\n\nconst DragOverlay = /*#__PURE__*/React.memo(_ref => {\n let {\n adjustScale = false,\n children,\n dropAnimation: dropAnimationConfig,\n style,\n transition,\n modifiers,\n wrapperElement = 'div',\n className,\n zIndex = 999\n } = _ref;\n const {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggableNodes,\n droppableContainers,\n dragOverlay,\n over,\n measuringConfiguration,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n } = useDndContext();\n const transform = useContext(ActiveDraggableContext);\n const key = useKey(active == null ? void 0 : active.id);\n const modifiedTransform = applyModifiers(modifiers, {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect: dragOverlay.rect,\n over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n transform,\n windowRect\n });\n const initialRect = useInitialValue(activeNodeRect);\n const dropAnimation = useDropAnimation({\n config: dropAnimationConfig,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n }); // We need to wait for the active node to be measured before connecting the drag overlay ref\n // otherwise collisions can be computed against a mispositioned drag overlay\n\n const ref = initialRect ? dragOverlay.setRef : undefined;\n return React.createElement(NullifiedContextProvider, null, React.createElement(AnimationManager, {\n animation: dropAnimation\n }, active && key ? React.createElement(PositionedOverlay, {\n key: key,\n id: active.id,\n ref: ref,\n as: wrapperElement,\n activatorEvent: activatorEvent,\n adjustScale: adjustScale,\n className: className,\n transition: transition,\n rect: initialRect,\n style: {\n zIndex,\n ...style\n },\n transform: modifiedTransform\n }, children) : null));\n});\n\nexport { AutoScrollActivator, DndContext, DragOverlay, KeyboardCode, KeyboardSensor, MeasuringFrequency, MeasuringStrategy, MouseSensor, PointerSensor, TouchSensor, TraversalOrder, applyModifiers, closestCenter, closestCorners, defaultAnnouncements, defaultCoordinates, defaultDropAnimationConfiguration as defaultDropAnimation, defaultDropAnimationSideEffects, defaultScreenReaderInstructions, getClientRect, getFirstCollision, getScrollableAncestors, pointerWithin, rectIntersection, useDndContext, useDndMonitor, useDraggable, useDroppable, useSensor, useSensors };\n//# sourceMappingURL=core.esm.js.map\n","import React, { useState, useCallback } from 'react';\n\nconst hiddenStyles = {\n display: 'none'\n};\nfunction HiddenText(_ref) {\n let {\n id,\n value\n } = _ref;\n return React.createElement(\"div\", {\n id: id,\n style: hiddenStyles\n }, value);\n}\n\nfunction LiveRegion(_ref) {\n let {\n id,\n announcement,\n ariaLiveType = \"assertive\"\n } = _ref;\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden = {\n position: 'fixed',\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap'\n };\n return React.createElement(\"div\", {\n id: id,\n style: visuallyHidden,\n role: \"status\",\n \"aria-live\": ariaLiveType,\n \"aria-atomic\": true\n }, announcement);\n}\n\nfunction useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback(value => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n return {\n announce,\n announcement\n };\n}\n\nexport { HiddenText, LiveRegion, useAnnouncement };\n//# sourceMappingURL=accessibility.esm.js.map\n","import { getEventCoordinates } from '@dnd-kit/utilities';\n\nfunction createSnapModifier(gridSize) {\n return _ref => {\n let {\n transform\n } = _ref;\n return { ...transform,\n x: Math.ceil(transform.x / gridSize) * gridSize,\n y: Math.ceil(transform.y / gridSize) * gridSize\n };\n };\n}\n\nconst restrictToHorizontalAxis = _ref => {\n let {\n transform\n } = _ref;\n return { ...transform,\n y: 0\n };\n};\n\nfunction restrictToBoundingRect(transform, rect, boundingRect) {\n const value = { ...transform\n };\n\n if (rect.top + transform.y <= boundingRect.top) {\n value.y = boundingRect.top - rect.top;\n } else if (rect.bottom + transform.y >= boundingRect.top + boundingRect.height) {\n value.y = boundingRect.top + boundingRect.height - rect.bottom;\n }\n\n if (rect.left + transform.x <= boundingRect.left) {\n value.x = boundingRect.left - rect.left;\n } else if (rect.right + transform.x >= boundingRect.left + boundingRect.width) {\n value.x = boundingRect.left + boundingRect.width - rect.right;\n }\n\n return value;\n}\n\nconst restrictToParentElement = _ref => {\n let {\n containerNodeRect,\n draggingNodeRect,\n transform\n } = _ref;\n\n if (!draggingNodeRect || !containerNodeRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, draggingNodeRect, containerNodeRect);\n};\n\nconst restrictToFirstScrollableAncestor = _ref => {\n let {\n draggingNodeRect,\n transform,\n scrollableAncestorRects\n } = _ref;\n const firstScrollableAncestorRect = scrollableAncestorRects[0];\n\n if (!draggingNodeRect || !firstScrollableAncestorRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, draggingNodeRect, firstScrollableAncestorRect);\n};\n\nconst restrictToVerticalAxis = _ref => {\n let {\n transform\n } = _ref;\n return { ...transform,\n x: 0\n };\n};\n\nconst restrictToWindowEdges = _ref => {\n let {\n transform,\n draggingNodeRect,\n windowRect\n } = _ref;\n\n if (!draggingNodeRect || !windowRect) {\n return transform;\n }\n\n return restrictToBoundingRect(transform, draggingNodeRect, windowRect);\n};\n\nconst snapCenterToCursor = _ref => {\n let {\n activatorEvent,\n draggingNodeRect,\n transform\n } = _ref;\n\n if (draggingNodeRect && activatorEvent) {\n const activatorCoordinates = getEventCoordinates(activatorEvent);\n\n if (!activatorCoordinates) {\n return transform;\n }\n\n const offsetX = activatorCoordinates.x - draggingNodeRect.left;\n const offsetY = activatorCoordinates.y - draggingNodeRect.top;\n return { ...transform,\n x: transform.x + offsetX - draggingNodeRect.width / 2,\n y: transform.y + offsetY - draggingNodeRect.height / 2\n };\n }\n\n return transform;\n};\n\nexport { createSnapModifier, restrictToFirstScrollableAncestor, restrictToHorizontalAxis, restrictToParentElement, restrictToVerticalAxis, restrictToWindowEdges, snapCenterToCursor };\n//# sourceMappingURL=modifiers.esm.js.map\n","import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId && !previous.current.activeId) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n","import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId && !previous.current.activeId) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n","import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs(...refs) {\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies = [value]) {\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeRef = useLatestValue(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeRef.current == null ? void 0 : onChangeRef.current(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return `${prefix}-${id}`;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return (object, ...adjustments) => {\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return `translate3d(${x ? Math.round(x) : 0}px, ${y ? Math.round(y) : 0}px, 0)`;\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return `scaleX(${scaleX}) scaleY(${scaleY})`;\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString({\n property,\n duration,\n easing\n }) {\n return `${property} ${duration}ms ${easing}`;\n }\n\n }\n});\n\nexport { CSS, add, canUseDOM, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs(...refs) {\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies = [value]) {\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeRef = useLatestValue(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeRef.current == null ? void 0 : onChangeRef.current(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return `${prefix}-${id}`;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return (object, ...adjustments) => {\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return `translate3d(${x ? Math.round(x) : 0}px, ${y ? Math.round(y) : 0}px, 0)`;\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return `scaleX(${scaleX}) scaleY(${scaleY})`;\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString({\n property,\n duration,\n easing\n }) {\n return `${property} ${duration}ms ${easing}`;\n }\n\n }\n});\n\nexport { CSS, add, canUseDOM, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useEvent(handler) {\n const handlerRef = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n return useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return handlerRef.current == null ? void 0 : handlerRef.current(...args);\n }, []);\n}\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies) {\n if (dependencies === void 0) {\n dependencies = [value];\n }\n\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return prefix + \"-\" + id;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return \"translate3d(\" + (x ? Math.round(x) : 0) + \"px, \" + (y ? Math.round(y) : 0) + \"px, 0)\";\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return \"scaleX(\" + scaleX + \") scaleY(\" + scaleY + \")\";\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString(_ref) {\n let {\n property,\n duration,\n easing\n } = _ref;\n return property + \" \" + duration + \"ms \" + easing;\n }\n\n }\n});\n\nconst SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\nfunction findFirstFocusableNode(element) {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n\nexport { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useEvent(handler) {\n const handlerRef = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n return useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return handlerRef.current == null ? void 0 : handlerRef.current(...args);\n }, []);\n}\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies) {\n if (dependencies === void 0) {\n dependencies = [value];\n }\n\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return prefix + \"-\" + id;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return \"translate3d(\" + (x ? Math.round(x) : 0) + \"px, \" + (y ? Math.round(y) : 0) + \"px, 0)\";\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return \"scaleX(\" + scaleX + \") scaleY(\" + scaleY + \")\";\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString(_ref) {\n let {\n property,\n duration,\n easing\n } = _ref;\n return property + \" \" + duration + \"ms \" + easing;\n }\n\n }\n});\n\nconst SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\nfunction findFirstFocusableNode(element) {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n\nexport { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","var isDevelopment = false;\n\n/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n } // this function should always return with a value\n // TS can't understand it though so we make it stop complaining here\n\n\n return undefined;\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? !isDevelopment : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n this.tags.forEach(function (tag) {\n var _tag$parentNode;\n\n return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function\n /*: EmotionCache */\ncreateCache(options\n/*: Options */\n) {\n var key = options.key;\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node\n /*: HTMLStyleElement */\n ) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n var inserted = {};\n var container;\n /* : Node */\n\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node\n /*: HTMLStyleElement */\n ) {\n var attrib = node.getAttribute(\"data-emotion\").split(' ');\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n /*: (\n selector: string,\n serialized: SerializedStyles,\n sheet: StyleSheet,\n shouldCache: boolean\n ) => string | void */\n\n\n var omnipresentPlugins = [compat, removeLabel];\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function\n /*: void */\n insert(selector\n /*: string */\n , serialized\n /*: SerializedStyles */\n , sheet\n /*: StyleSheet */\n , shouldCache\n /*: boolean */\n ) {\n currentSheet = sheet;\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache\n /*: EmotionCache */\n = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import { createContext, useContext, forwardRef, createElement } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../isolated-hoist-non-react-statics-do-not-use-this-in-your-code/dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nif (process.env.NODE_ENV !== 'production') {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = useContext(ThemeContext);\n return /*#__PURE__*/createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\n// thus we only need to replace what is a valid character for JS, but not for CSS\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type;\n\n if (process.env.NODE_ENV !== 'production') {\n var error = new Error();\n\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z0-9$]+) /);\n\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z0-9$]+)@/);\n }\n\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n\n return newProps;\n};\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = insertStyles(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/createElement(type, newProps);\n\n return ele;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwnProperty as h, useTheme as u, withEmotionCache as w };\n","import { createElement, useContext, useRef, useLayoutEffect } from 'react';\nimport '@emotion/cache';\nimport { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext } from './emotion-element-99289b21.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-99289b21.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport 'hoist-non-react-statics';\nimport '../isolated-hoist-non-react-statics-do-not-use-this-in-your-code/dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js';\nimport { insertStyles, getRegisteredStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { StyleSheet } from '@emotion/sheet';\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.5.0\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.cjs.js\": \"./dist/emotion-react.browser.cjs.js\",\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n\t},\n\ttypes: \"types/index.d.ts\",\n\tfiles: [\n\t\t\"src\",\n\t\t\"dist\",\n\t\t\"jsx-runtime\",\n\t\t\"jsx-dev-runtime\",\n\t\t\"isolated-hoist-non-react-statics-do-not-use-this-in-your-code\",\n\t\t\"types/*.d.ts\",\n\t\t\"macro.js\",\n\t\t\"macro.d.ts\",\n\t\t\"macro.js.flow\"\n\t],\n\tsideEffects: false,\n\tauthor: \"mitchellhamilton \",\n\tlicense: \"MIT\",\n\tscripts: {\n\t\t\"test:typescript\": \"dtslint types\"\n\t},\n\tdependencies: {\n\t\t\"@babel/runtime\": \"^7.13.10\",\n\t\t\"@emotion/cache\": \"^11.5.0\",\n\t\t\"@emotion/serialize\": \"^1.0.2\",\n\t\t\"@emotion/sheet\": \"^1.0.3\",\n\t\t\"@emotion/utils\": \"^1.0.0\",\n\t\t\"@emotion/weak-memoize\": \"^0.2.5\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\t\"@babel/core\": \"^7.0.0\",\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@babel/core\": {\n\t\t\toptional: true\n\t\t},\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@babel/core\": \"^7.13.10\",\n\t\t\"@emotion/css\": \"11.5.0\",\n\t\t\"@emotion/css-prettifier\": \"1.0.0\",\n\t\t\"@emotion/server\": \"11.4.0\",\n\t\t\"@emotion/styled\": \"11.3.0\",\n\t\t\"@types/react\": \"^16.9.11\",\n\t\tdtslint: \"^0.3.0\",\n\t\t\"html-tag-names\": \"^1.1.2\",\n\t\treact: \"16.14.0\",\n\t\t\"svg-tag-names\": \"^1.1.1\"\n\t},\n\trepository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n\tpublishConfig: {\n\t\taccess: \"public\"\n\t},\n\t\"umd:main\": \"dist/emotion-react.umd.min.js\",\n\tpreconstruct: {\n\t\tentrypoints: [\n\t\t\t\"./index.js\",\n\t\t\t\"./jsx-runtime.js\",\n\t\t\t\"./jsx-dev-runtime.js\",\n\t\t\t\"./isolated-hoist-non-react-statics-do-not-use-this-in-your-code.js\"\n\t\t],\n\t\tumdName: \"emotionReact\"\n\t}\n};\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwnProperty.call(props, 'css')) {\n // $FlowFixMe\n return createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, useContext(ThemeContext));\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = useRef();\n useLayoutEffect(function () {\n var key = cache.key + \"-global\";\n var sheet = new StyleSheet({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false; // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useLayoutEffect(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Global.displayName = 'EmotionGlobal';\n}\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {\n console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from component.');\n }\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n\n {\n insertStyles(cache, serialized, false);\n }\n\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n\n return ele;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n ClassNames.displayName = 'EmotionClassNames';\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var isBrowser = \"object\" !== 'undefined'; // #1727 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock\n\n var isJest = typeof jest !== 'undefined';\n\n if (isBrowser && !isJest) {\n // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later\n var globalContext = // $FlowIgnore\n typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef\n : isBrowser ? window : global;\n var globalKey = \"__EMOTION_REACT_\" + pkg.version.split('.')[0] + \"__\";\n\n if (globalContext[globalKey]) {\n console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');\n }\n\n globalContext[globalKey] = true;\n }\n}\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar isDevelopment = false;\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n var componentSelector = interpolation;\n\n if (componentSelector.__emotion_styles !== undefined) {\n\n return componentSelector;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n var keyframes = interpolation;\n\n if (keyframes.anim === 1) {\n cursor = {\n name: keyframes.name,\n styles: keyframes.styles,\n next: cursor\n };\n return keyframes.name;\n }\n\n var serializedStyles = interpolation;\n\n if (serializedStyles.styles !== undefined) {\n var next = serializedStyles.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = serializedStyles.styles + \";\";\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n }\n\n break;\n }\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n var asString = interpolation;\n\n if (registered == null) {\n return asString;\n }\n\n var cached = registered[asString];\n return cached !== undefined ? cached : asString;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var key in obj) {\n var value = obj[key];\n\n if (typeof value !== 'object') {\n var asString = value;\n\n if (registered != null && registered[asString] !== undefined) {\n string += key + \"{\" + registered[asString] + \"}\";\n } else if (isProcessableValue(asString)) {\n string += processStyleName(key) + \":\" + processStyleValue(key, asString) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n\n string += key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;{]+)\\s*(;|$)/g;\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nfunction serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n var asTemplateStringsArr = strings;\n\n styles += asTemplateStringsArr[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n var templateStringsArr = strings;\n\n styles += templateStringsArr[i];\n }\n }\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n}\n\nexport { serializeStyles };\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","function stylis_min (W) {\n function M(d, c, e, h, a) {\n for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n g = e.charCodeAt(l);\n l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n if (0 === b + n + v + m) {\n if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n switch (g) {\n case 32:\n case 9:\n case 59:\n case 13:\n case 10:\n break;\n\n default:\n f += e.charAt(l);\n }\n\n g = 59;\n }\n\n switch (g) {\n case 123:\n f = f.trim();\n q = f.charCodeAt(0);\n k = 1;\n\n for (t = ++l; l < B;) {\n switch (g = e.charCodeAt(l)) {\n case 123:\n k++;\n break;\n\n case 125:\n k--;\n break;\n\n case 47:\n switch (g = e.charCodeAt(l + 1)) {\n case 42:\n case 47:\n a: {\n for (u = l + 1; u < J; ++u) {\n switch (e.charCodeAt(u)) {\n case 47:\n if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n l = u + 1;\n break a;\n }\n\n break;\n\n case 10:\n if (47 === g) {\n l = u + 1;\n break a;\n }\n\n }\n }\n\n l = u;\n }\n\n }\n\n break;\n\n case 91:\n g++;\n\n case 40:\n g++;\n\n case 34:\n case 39:\n for (; l++ < J && e.charCodeAt(l) !== g;) {\n }\n\n }\n\n if (0 === k) break;\n l++;\n }\n\n k = e.substring(t, l);\n 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n switch (q) {\n case 64:\n 0 < r && (f = f.replace(N, ''));\n g = f.charCodeAt(1);\n\n switch (g) {\n case 100:\n case 109:\n case 115:\n case 45:\n r = c;\n break;\n\n default:\n r = O;\n }\n\n k = M(c, r, k, g, a + 1);\n t = k.length;\n 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n if (0 < t) switch (g) {\n case 115:\n f = f.replace(da, ea);\n\n case 100:\n case 109:\n case 45:\n k = f + '{' + k + '}';\n break;\n\n case 107:\n f = f.replace(fa, '$1 $2');\n k = f + '{' + k + '}';\n k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n break;\n\n default:\n k = f + k, 112 === h && (k = (p += k, ''));\n } else k = '';\n break;\n\n default:\n k = M(c, X(c, f, I), k, h, a + 1);\n }\n\n F += k;\n k = I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n break;\n\n case 125:\n case 59:\n f = (0 < r ? f.replace(N, '') : f).trim();\n if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n case 0:\n break;\n\n case 64:\n if (105 === g || 99 === g) {\n G += f + e.charAt(l);\n break;\n }\n\n default:\n 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n }\n I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n }\n }\n\n switch (g) {\n case 13:\n case 10:\n 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n z = 1;\n D++;\n break;\n\n case 59:\n case 125:\n if (0 === b + n + v + m) {\n z++;\n break;\n }\n\n default:\n z++;\n y = e.charAt(l);\n\n switch (g) {\n case 9:\n case 32:\n if (0 === n + m + b) switch (x) {\n case 44:\n case 58:\n case 9:\n case 32:\n y = '';\n break;\n\n default:\n 32 !== g && (y = ' ');\n }\n break;\n\n case 0:\n y = '\\\\0';\n break;\n\n case 12:\n y = '\\\\f';\n break;\n\n case 11:\n y = '\\\\v';\n break;\n\n case 38:\n 0 === n + b + m && (r = I = 1, y = '\\f' + y);\n break;\n\n case 108:\n if (0 === n + b + m + E && 0 < u) switch (l - u) {\n case 2:\n 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n case 8:\n 111 === K && (E = K);\n }\n break;\n\n case 58:\n 0 === n + b + m && (u = l);\n break;\n\n case 44:\n 0 === b + v + n + m && (r = 1, y += '\\r');\n break;\n\n case 34:\n case 39:\n 0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n break;\n\n case 91:\n 0 === n + b + v && m++;\n break;\n\n case 93:\n 0 === n + b + v && m--;\n break;\n\n case 41:\n 0 === n + b + m && v--;\n break;\n\n case 40:\n if (0 === n + b + m) {\n if (0 === q) switch (2 * x + 3 * K) {\n case 533:\n break;\n\n default:\n q = 1;\n }\n v++;\n }\n\n break;\n\n case 64:\n 0 === b + v + n + m + u + k && (k = 1);\n break;\n\n case 42:\n case 47:\n if (!(0 < n + m + v)) switch (b) {\n case 0:\n switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n case 235:\n b = 47;\n break;\n\n case 220:\n t = l, b = 42;\n }\n\n break;\n\n case 42:\n 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n }\n }\n\n 0 === b && (f += y);\n }\n\n K = x;\n x = g;\n l++;\n }\n\n t = p.length;\n\n if (0 < t) {\n r = c;\n if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n p = r.join(',') + '{' + p + '}';\n\n if (0 !== w * E) {\n 2 !== w || L(p, 2) || (E = 0);\n\n switch (E) {\n case 111:\n p = p.replace(ha, ':-moz-$1') + p;\n break;\n\n case 112:\n p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n }\n\n E = 0;\n }\n }\n\n return G + p + F;\n }\n\n function X(d, c, e) {\n var h = c.trim().split(ia);\n c = h;\n var a = h.length,\n m = d.length;\n\n switch (m) {\n case 0:\n case 1:\n var b = 0;\n\n for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n c[b] = Z(d, c[b], e).trim();\n }\n\n break;\n\n default:\n var v = b = 0;\n\n for (c = []; b < a; ++b) {\n for (var n = 0; n < m; ++n) {\n c[v++] = Z(d[n] + ' ', h[b], e).trim();\n }\n }\n\n }\n\n return c;\n }\n\n function Z(d, c, e) {\n var h = c.charCodeAt(0);\n 33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n switch (h) {\n case 38:\n return c.replace(F, '$1' + d.trim());\n\n case 58:\n return d.trim() + c.replace(F, '$1' + d.trim());\n\n default:\n if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n }\n\n return d + c;\n }\n\n function P(d, c, e, h) {\n var a = d + ';',\n m = 2 * c + 3 * e + 4 * h;\n\n if (944 === m) {\n d = a.indexOf(':', 9) + 1;\n var b = a.substring(d, a.length - 1).trim();\n b = a.substring(0, d).trim() + b + ';';\n return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n }\n\n if (0 === w || 2 === w && !L(a, 1)) return a;\n\n switch (m) {\n case 1015:\n return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n case 951:\n return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n case 963:\n return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n case 1009:\n if (100 !== a.charCodeAt(4)) break;\n\n case 969:\n case 942:\n return '-webkit-' + a + a;\n\n case 978:\n return '-webkit-' + a + '-moz-' + a + a;\n\n case 1019:\n case 983:\n return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n case 883:\n if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n break;\n\n case 932:\n if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n case 103:\n return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n case 115:\n return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n case 98:\n return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n }\n return '-webkit-' + a + '-ms-' + a + a;\n\n case 964:\n return '-webkit-' + a + '-ms-flex-' + a + a;\n\n case 1023:\n if (99 !== a.charCodeAt(8)) break;\n b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n case 1005:\n return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n case 1e3:\n b = a.substring(13).trim();\n c = b.indexOf('-') + 1;\n\n switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n case 226:\n b = a.replace(G, 'tb');\n break;\n\n case 232:\n b = a.replace(G, 'tb-rl');\n break;\n\n case 220:\n b = a.replace(G, 'lr');\n break;\n\n default:\n return a;\n }\n\n return '-webkit-' + a + '-ms-' + b + a;\n\n case 1017:\n if (-1 === a.indexOf('sticky', 9)) break;\n\n case 975:\n c = (a = d).length - 10;\n b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n case 203:\n if (111 > b.charCodeAt(8)) break;\n\n case 115:\n a = a.replace(b, '-webkit-' + b) + ';' + a;\n break;\n\n case 207:\n case 102:\n a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n }\n\n return a + ';';\n\n case 938:\n if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n case 105:\n return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n case 115:\n return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n default:\n return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n }\n break;\n\n case 973:\n case 989:\n if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n case 931:\n case 953:\n if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n break;\n\n case 962:\n if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n }\n\n return a;\n }\n\n function L(d, c) {\n var e = d.indexOf(1 === c ? ':' : '{'),\n h = d.substring(0, 3 !== c ? e : 10);\n e = d.substring(e + 1, d.length - 1);\n return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n }\n\n function ea(d, c) {\n var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n }\n\n function H(d, c, e, h, a, m, b, v, n, q) {\n for (var g = 0, x = c, w; g < A; ++g) {\n switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n case void 0:\n case !1:\n case !0:\n case null:\n break;\n\n default:\n x = w;\n }\n }\n\n if (x !== c) return x;\n }\n\n function T(d) {\n switch (d) {\n case void 0:\n case null:\n A = S.length = 0;\n break;\n\n default:\n if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n T(d[c]);\n } else Y = !!d | 0;\n }\n\n return T;\n }\n\n function U(d) {\n d = d.prefix;\n void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n return U;\n }\n\n function B(d, c) {\n var e = d;\n 33 > e.charCodeAt(0) && (e = e.trim());\n V = e;\n e = [V];\n\n if (0 < A) {\n var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n void 0 !== h && 'string' === typeof h && (c = h);\n }\n\n var a = M(O, e, c, 0, 0);\n 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n V = '';\n E = 0;\n z = D = 1;\n return a;\n }\n\n var ca = /^\\0+/g,\n N = /[\\0\\r\\f]/g,\n aa = /: */g,\n ka = /zoo|gra/,\n ma = /([,: ])(transform)/g,\n ia = /,\\r+?/g,\n F = /([\\t\\r\\n ])*\\f?&/g,\n fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n Q = /::(place)/g,\n ha = /:(read-only)/g,\n G = /[svh]\\w+-[tblr]{2}/,\n da = /\\(\\s*(.*)\\s*\\)/g,\n oa = /([\\s\\S]*?);/g,\n ba = /-self|flex-/g,\n na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n ja = /([^-])(image-set\\()/,\n z = 1,\n D = 1,\n E = 0,\n w = 1,\n O = [],\n S = [],\n A = 0,\n R = null,\n Y = 0,\n V = '';\n B.use = T;\n B.set = U;\n void 0 !== W && U(W);\n return B;\n}\n\nexport default stylis_min;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","var isBrowser = true;\n\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else if (className) {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","var snippet = function snippet(_ref) {\n var orgId = _ref.orgId,\n _ref$namespace = _ref.namespace,\n namespace = _ref$namespace === void 0 ? 'FS' : _ref$namespace,\n _ref$debug = _ref.debug,\n debug = _ref$debug === void 0 ? false : _ref$debug,\n _ref$host = _ref.host,\n host = _ref$host === void 0 ? 'fullstory.com' : _ref$host,\n _ref$script = _ref.script,\n script = _ref$script === void 0 ? 'edge.fullstory.com/s/fs.js' : _ref$script;\n\n if (!orgId) {\n throw new Error('FullStory orgId is a required parameter');\n }\n\n window['_fs_debug'] = debug;\n window['_fs_host'] = host;\n window['_fs_script'] = script;\n window['_fs_org'] = orgId;\n window['_fs_namespace'] = namespace;\n\n (function (m, n, e, t, l, o, g, y) {\n if (e in m) {\n if (m.console && m.console.log) {\n m.console.log('FullStory namespace conflict. Please set window[\"_fs_namespace\"].');\n }\n\n return;\n }\n\n g = m[e] = function (a, b, s) {\n g.q ? g.q.push([a, b, s]) : g._api(a, b, s);\n };\n\n g.q = [];\n o = n.createElement(t);\n o.async = 1;\n o.crossOrigin = 'anonymous';\n o.src = 'https://' + _fs_script;\n y = n.getElementsByTagName(t)[0];\n y.parentNode.insertBefore(o, y);\n\n g.identify = function (i, v, s) {\n g(l, {\n uid: i\n }, s);\n if (v) g(l, v, s);\n };\n\n g.setUserVars = function (v, s) {\n g(l, v, s);\n };\n\n g.event = function (i, v, s) {\n g('event', {\n n: i,\n p: v\n }, s);\n };\n\n g.anonymize = function () {\n g.identify(!!0);\n };\n\n g.shutdown = function () {\n g(\"rec\", !1);\n };\n\n g.restart = function () {\n g(\"rec\", !0);\n };\n\n g.log = function (a, b) {\n g(\"log\", [a, b]);\n };\n\n g.consent = function (a) {\n g(\"consent\", !arguments.length || a);\n };\n\n g.identifyAccount = function (i, v) {\n o = 'account';\n v = v || {};\n v.acctId = i;\n g(o, v);\n };\n\n g.clearUserCookie = function () {};\n\n g.setVars = function (n, p) {\n g('setVars', [n, p]);\n };\n\n g._w = {};\n y = 'XMLHttpRequest';\n g._w[y] = m[y];\n y = 'fetch';\n g._w[y] = m[y];\n if (m[y]) m[y] = function () {\n return g._w[y].apply(this, arguments);\n };\n g._v = \"1.3.0\";\n })(window, document, window['_fs_namespace'], 'script', 'user');\n};\n\nvar fs = function fs() {\n return window[window._fs_namespace];\n};\n\nvar ensureSnippetLoaded = function ensureSnippetLoaded() {\n var snippetLoaded = !!fs();\n\n if (!snippetLoaded) {\n throw Error('FullStory is not loaded, please ensure the init function is invoked before calling FullStory API functions');\n }\n};\n\nvar hasFullStoryWithFunction = function hasFullStoryWithFunction() {\n ensureSnippetLoaded();\n\n for (var _len = arguments.length, testNames = new Array(_len), _key = 0; _key < _len; _key++) {\n testNames[_key] = arguments[_key];\n }\n\n return testNames.every(function (current) {\n return fs()[current];\n });\n};\n\nvar guard = function guard(name) {\n return function () {\n if (window._fs_dev_mode) {\n var message = \"FullStory is in dev mode and is not recording: \".concat(name, \" method not executed\");\n console.warn(message);\n return message;\n }\n\n if (hasFullStoryWithFunction(name)) {\n var _fs;\n\n return (_fs = fs())[name].apply(_fs, arguments);\n }\n\n console.warn(\"FS.\".concat(name, \" not ready\"));\n return null;\n };\n};\n\nvar event = guard('event');\nvar log = guard('log');\nvar getCurrentSessionURL = guard('getCurrentSessionURL');\nvar identify = guard('identify');\nvar setUserVars = guard('setUserVars');\nvar consent = guard('consent');\nvar shutdown = guard('shutdown');\nvar restart = guard('restart');\nvar anonymize = guard('anonymize');\nvar setVars = guard('setVars');\n\nvar _init = function _init(options, readyCallback) {\n if (fs()) {\n console.warn('The FullStory snippet has already been defined elsewhere (likely in the element)');\n return;\n }\n\n if (options.recordCrossDomainIFrames) {\n window._fs_run_in_iframe = true;\n }\n\n if (options.recordOnlyThisIFrame) {\n window._fs_is_outer_script = true;\n }\n\n snippet(options);\n\n if (readyCallback) {\n fs()('observe', {\n type: 'start',\n callback: readyCallback\n });\n }\n\n if (options.devMode === true) {\n var message = 'FullStory was initialized in devMode and will stop recording';\n event('FullStory Dev Mode', {\n message_str: message\n });\n shutdown();\n window._fs_dev_mode = true;\n console.warn(message);\n }\n};\n\nvar initOnce = function initOnce(fn, message) {\n return function () {\n if (window._fs_initialized) {\n if (message) console.warn(message);\n return;\n }\n\n fn.apply(void 0, arguments);\n window._fs_initialized = true;\n };\n};\n\nvar init = initOnce(_init, 'FullStory init has already been called once, additional invocations are ignored');\nvar isInitialized = function isInitialized() {\n return !!window._fs_initialized;\n};\n\nexport { anonymize, consent, event, getCurrentSessionURL, identify, init, isInitialized, log, restart, setUserVars, setVars, shutdown };\n","'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _gud = require('gud');\n\nvar _gud2 = _interopRequireDefault(_gud);\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar MAX_SIGNED_31_BIT_INT = 1073741823;\n\n// Inlined Object.is polyfill.\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction objectIs(x, y) {\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nfunction createEventEmitter(value) {\n var handlers = [];\n return {\n on: function on(handler) {\n handlers.push(handler);\n },\n off: function off(handler) {\n handlers = handlers.filter(function (h) {\n return h !== handler;\n });\n },\n get: function get() {\n return value;\n },\n set: function set(newValue, changedBits) {\n value = newValue;\n handlers.forEach(function (handler) {\n return handler(value, changedBits);\n });\n }\n };\n}\n\nfunction onlyChild(children) {\n return Array.isArray(children) ? children[0] : children;\n}\n\nfunction createReactContext(defaultValue, calculateChangedBits) {\n var _Provider$childContex, _Consumer$contextType;\n\n var contextProp = '__create-react-context-' + (0, _gud2.default)() + '__';\n\n var Provider = function (_Component) {\n _inherits(Provider, _Component);\n\n function Provider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Provider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.emitter = createEventEmitter(_this.props.value), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Provider.prototype.getChildContext = function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[contextProp] = this.emitter, _ref;\n };\n\n Provider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (this.props.value !== nextProps.value) {\n var oldValue = this.props.value;\n var newValue = nextProps.value;\n var changedBits = void 0;\n\n if (objectIs(oldValue, newValue)) {\n changedBits = 0; // No change\n } else {\n changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n if (process.env.NODE_ENV !== 'production') {\n (0, _warning2.default)((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);\n }\n\n changedBits |= 0;\n\n if (changedBits !== 0) {\n this.emitter.set(nextProps.value, changedBits);\n }\n }\n }\n };\n\n Provider.prototype.render = function render() {\n return this.props.children;\n };\n\n return Provider;\n }(_react.Component);\n\n Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = _propTypes2.default.object.isRequired, _Provider$childContex);\n\n var Consumer = function (_Component2) {\n _inherits(Consumer, _Component2);\n\n function Consumer() {\n var _temp2, _this2, _ret2;\n\n _classCallCheck(this, Consumer);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this2 = _possibleConstructorReturn(this, _Component2.call.apply(_Component2, [this].concat(args))), _this2), _this2.state = {\n value: _this2.getValue()\n }, _this2.onUpdate = function (newValue, changedBits) {\n var observedBits = _this2.observedBits | 0;\n if ((observedBits & changedBits) !== 0) {\n _this2.setState({ value: _this2.getValue() });\n }\n }, _temp2), _possibleConstructorReturn(_this2, _ret2);\n }\n\n Consumer.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var observedBits = nextProps.observedBits;\n\n this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default\n : observedBits;\n };\n\n Consumer.prototype.componentDidMount = function componentDidMount() {\n if (this.context[contextProp]) {\n this.context[contextProp].on(this.onUpdate);\n }\n var observedBits = this.props.observedBits;\n\n this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default\n : observedBits;\n };\n\n Consumer.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.context[contextProp]) {\n this.context[contextProp].off(this.onUpdate);\n }\n };\n\n Consumer.prototype.getValue = function getValue() {\n if (this.context[contextProp]) {\n return this.context[contextProp].get();\n } else {\n return defaultValue;\n }\n };\n\n Consumer.prototype.render = function render() {\n return onlyChild(this.props.children)(this.state.value);\n };\n\n return Consumer;\n }(_react.Component);\n\n Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = _propTypes2.default.object, _Consumer$contextType);\n\n\n return {\n Provider: Provider,\n Consumer: Consumer\n };\n}\n\nexports.default = createReactContext;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _implementation = require('./implementation');\n\nvar _implementation2 = _interopRequireDefault(_implementation);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _react2.default.createContext || _implementation2.default;\nmodule.exports = exports['default'];","export default function getBoundingClientRect(element) {\n var rect = element.getBoundingClientRect();\n return {\n width: rect.width,\n height: rect.height,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n y: rect.top\n };\n}","export default function getWindow(node) {\n if ({}.toString.call(node) !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getWindow from \"./getWindow.js\";\n/*:: declare function isElement(node: mixed): boolean %checks(node instanceof\n Element); */\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement;\n}\n/*:: declare function isHTMLElement(node: mixed): boolean %checks(node instanceof\n HTMLElement); */\n\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement;\n}\n\nexport { isElement, isHTMLElement };","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\n\nfunction toNumber(cssValue) {\n return parseFloat(cssValue) || 0;\n}\n\nexport default function getBorders(element) {\n var computedStyle = isHTMLElement(element) ? getComputedStyle(element) : {};\n return {\n top: toNumber(computedStyle.borderTopWidth),\n right: toNumber(computedStyle.borderRightWidth),\n bottom: toNumber(computedStyle.borderBottomWidth),\n left: toNumber(computedStyle.borderLeftWidth)\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getBorders from \"./getBorders.js\";\nimport { isHTMLElement } from \"./instanceOf.js\"; // offsets without `border`\n\nfunction getInnerOffsets(offsetParent) {\n var rect = getBoundingClientRect(offsetParent);\n var borders = getBorders(offsetParent);\n return {\n x: rect.x + borders.left,\n y: rect.y + borders.top\n };\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (getNodeName(offsetParent) !== 'body') {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getInnerOffsets(offsetParent);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","// Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\nexport default function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n}","import getNodeName from \"./getNodeName.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return element.parentNode || // DOM Element detected\n // $FlowFixMe: need a better way to handle this...\n element.host || // ShadowRoot detected\n document.ownerDocument || // Fallback to ownerDocument if available\n document.documentElement // Or to documentElement if everything else fails\n ;\n}","import getParentNode from \"./getParentNode.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node)) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(node),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n if (/auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX)) {\n return node;\n }\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getWindow from \"./getWindow.js\";\nexport default function listScrollParents(element, list) {\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = getNodeName(scrollParent) === 'body';\n var target = isBody ? getWindow(scrollParent) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\"; // https://stackoverflow.com/a/9851769/2059996\n\nvar isFirefox = function isFirefox() {\n return typeof window.InstallTrigger !== 'undefined';\n};\n\nfunction getTrueOffsetParent(element) {\n var offsetParent;\n\n if (!isHTMLElement(element) || !(offsetParent = element.offsetParent) || // https://github.com/popperjs/popper.js/issues/837\n isFirefox() && getComputedStyle(offsetParent).position === 'fixed') {\n return null;\n }\n\n return offsetParent;\n}\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element); // Find the nearest non-table offsetParent\n\n while (offsetParent && isTableElement(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static') {\n return window;\n }\n\n return offsetParent || window;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements =\n/*#__PURE__*/\nbasePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements =\n/*#__PURE__*/\n[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nexport * from \"./types.js\";\nexport * from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided to Popper, they must be either a valid DOM element, virtual element, or a jQuery-wrapped DOM element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, {}, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(options) {\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, {}, state.options, {}, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers([].concat(state.options.modifiers.filter(function (modifier) {\n return !defaultModifiers.find(function (_ref) {\n var name = _ref.name;\n return name === modifier.name;\n });\n }), defaultModifiers.map(function (defaultModifier) {\n return Object.assign({}, defaultModifier, {}, state.options.modifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === defaultModifier.name;\n }));\n }))); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref3) {\n var name = _ref3.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = orderedModifiers.find(function (_ref4) {\n var name = _ref4.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n } // Strip out disabled modifiers\n\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref5) {\n var name = _ref5.name,\n _ref5$options = _ref5.options,\n options = _ref5$options === void 0 ? {} : _ref5$options,\n effect = _ref5.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper =\n/*#__PURE__*/\npopperGenerator();","import getWindow from \"../dom-utils/getWindow.js\";\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n}\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = Math.floor(offsets[mainAxis]) - Math.floor(reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = Math.floor(offsets[mainAxis]) + Math.ceil(reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","export default function getDocumentElement(element) {\n // $FlowFixMe: assume body is always available\n return element.ownerDocument.documentElement;\n}","import { top, left, right, bottom } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = window.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive;\n\n var _roundOffsets = roundOffsets(offsets),\n x = _roundOffsets.x,\n y = _roundOffsets.y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n }\n\n if (placement === top) {\n sideY = bottom;\n y -= offsetParent.clientHeight - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left) {\n sideX = right;\n x -= offsetParent.clientWidth - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (window.devicePixelRatio || 1) < 2 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref3) {\n var state = _ref3.state,\n options = _ref3.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration\n }; // popper offsets are always available\n\n state.styles.popper = Object.assign({}, state.styles.popper, {}, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive\n }))); // arrow offsets may not be available\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, {}, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n}\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\";\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n state.modifiersData[name] = data;\n}\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getViewportRect(element) {\n var win = getWindow(element);\n return {\n width: win.innerWidth,\n height: win.innerHeight,\n x: 0,\n y: 0\n };\n}","import getCompositeRect from \"./getCompositeRect.js\";\nimport getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getDocumentRect(element) {\n var win = getWindow(element);\n var winScroll = getWindowScroll(element);\n var documentRect = getCompositeRect(getDocumentElement(element), win);\n documentRect.height = Math.max(documentRect.height, win.innerHeight);\n documentRect.width = Math.max(documentRect.width, win.innerWidth);\n documentRect.x = -winScroll.scrollLeft;\n documentRect.y = -winScroll.scrollTop;\n return documentRect;\n}","import getBorders from \"./getBorders.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getWindow from \"./getWindow.js\"; // Borders + scrollbars\n\nexport default function getDecorations(element) {\n var borders = getBorders(element);\n var win = getWindow(element);\n var right = element.offsetWidth - element.clientWidth - borders.right;\n var bottom = element.offsetHeight - element.clientHeight - borders.bottom;\n\n if (getNodeName(element) === 'html') {\n right = win.innerWidth - element.clientWidth;\n bottom = win.innerHeight - element.clientHeight;\n }\n\n return {\n top: borders.top,\n right: right,\n bottom: bottom,\n left: borders.left\n };\n}","export default function contains(parent, child) {\n // $FlowFixMe: hasOwnProperty doesn't seem to work in tests\n var isShadow = Boolean(child.getRootNode && child.getRootNode().host); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (isShadow) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDecorations from \"./getDecorations.js\";\nimport contains from \"./contains.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n }\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n var decorations = getDecorations(isHTMLElement(clippingParent) ? clippingParent : getDocumentElement(element));\n accRect.top = Math.max(rect.top + decorations.top, accRect.top);\n accRect.right = Math.min(rect.right - decorations.right, accRect.right);\n accRect.bottom = Math.min(rect.bottom - decorations.bottom, accRect.bottom);\n accRect.left = Math.max(rect.left + decorations.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), {}, paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\";\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var referenceElement = state.elements.reference;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(referenceElement);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, {}, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements; // $FlowFixMe: Flow seems to have problems with two array unions...\n\n var overflows = placements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","export default function uniqueBy(arr, fn) {\n var identifiers = new Set();\n return arr.filter(function (item) {\n var identifier = fn(item);\n\n if (!identifiers.has(identifier)) {\n identifiers.add(identifier);\n return true;\n }\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport uniqueBy from \"../utils/uniqueBy.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\";\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = uniqueBy([preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return getBasePlacement(placement) === auto ? acc.concat(computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations\n })) : acc.concat(placement);\n }, []), function (placement) {\n return placement;\n });\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [overflow[_basePlacement] <= 0, overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0];\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n}\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","export default function within(min, value, max) {\n return Math.max(min, Math.min(value, max));\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n}\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import { popperGenerator } from \"./index.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper =\n/*#__PURE__*/\npopperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers };","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n}\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n position: 'absolute',\n left: '0',\n top: '0',\n margin: '0'\n };\n Object.assign(state.elements.popper.style, initialStyles);\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? Object.assign({}, state.styles[name]) : initialStyles);\n var attributes = state.attributes[name] || {}; // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n var _Object$assign;\n\n return Object.assign({}, style, (_Object$assign = {}, _Object$assign[String(property)] = '', _Object$assign));\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n return element.removeAttribute(attribute);\n });\n });\n };\n}\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport within from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var data = {\n x: 0,\n y: 0\n };\n\n if (checkMainAxis) {\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = popperOffsets[mainAxis] + overflow[mainSide];\n var max = popperOffsets[mainAxis] - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, Math.abs(referenceRect[len] - arrowRect[len]), arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n var tetherMin = state.modifiersData.popperOffsets[mainAxis] + minOffset - offsetModifierValue;\n var tetherMax = state.modifiersData.popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? Math.min(min, tetherMin) : min, offset, tether ? Math.max(max, tetherMax) : max);\n state.modifiersData.popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var _preventedOffset = within(_min, _offset, _max);\n\n state.modifiersData.popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n}\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport within from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement) {\n return;\n }\n\n var paddingObject = state.modifiersData[name + \"#persistent\"].padding;\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var center = within(paddingObject[minProp], state.rects.popper[len] / 2 - arrowRect[len] / 2 + centerToReference, state.rects.popper[len] - arrowRect[len] - paddingObject[maxProp]); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element,\n _options$padding = options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding; // CSS selector\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n state.modifiersData[name + \"#persistent\"] = {\n padding: mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements))\n };\n}\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","var i=Symbol.for(\"preact-signals\");function t(){if(!(s>1)){var i,t=!1;while(void 0!==h){var r=h;h=void 0;f++;while(void 0!==r){var o=r.o;r.o=void 0;r.f&=-3;if(!(8&r.f)&&c(r))try{r.c()}catch(r){if(!t){i=r;t=!0}}r=o}}f=0;s--;if(t)throw i}else s--}function r(i){if(s>0)return i();s++;try{return i()}finally{t()}}var o=void 0;function n(i){var t=o;o=void 0;try{return i()}finally{o=t}}var h=void 0,s=0,f=0,v=0;function e(i){if(void 0!==o){var t=i.n;if(void 0===t||t.t!==o){t={i:0,S:i,p:o.s,n:void 0,t:o,e:void 0,x:void 0,r:t};if(void 0!==o.s)o.s.n=t;o.s=t;i.n=t;if(32&o.f)i.S(t);return t}else if(-1===t.i){t.i=0;if(void 0!==t.n){t.n.p=t.p;if(void 0!==t.p)t.p.n=t.n;t.p=o.s;t.n=void 0;o.s.n=t;o.s=t}return t}}}function u(i){this.v=i;this.i=0;this.n=void 0;this.t=void 0}u.prototype.brand=i;u.prototype.h=function(){return!0};u.prototype.S=function(i){if(this.t!==i&&void 0===i.e){i.x=this.t;if(void 0!==this.t)this.t.e=i;this.t=i}};u.prototype.U=function(i){if(void 0!==this.t){var t=i.e,r=i.x;if(void 0!==t){t.x=r;i.e=void 0}if(void 0!==r){r.e=t;i.x=void 0}if(i===this.t)this.t=r}};u.prototype.subscribe=function(i){var t=this;return E(function(){var r=t.value,n=o;o=void 0;try{i(r)}finally{o=n}})};u.prototype.valueOf=function(){return this.value};u.prototype.toString=function(){return this.value+\"\"};u.prototype.toJSON=function(){return this.value};u.prototype.peek=function(){var i=o;o=void 0;try{return this.value}finally{o=i}};Object.defineProperty(u.prototype,\"value\",{get:function(){var i=e(this);if(void 0!==i)i.i=this.i;return this.v},set:function(i){if(i!==this.v){if(f>100)throw new Error(\"Cycle detected\");this.v=i;this.i++;v++;s++;try{for(var r=this.t;void 0!==r;r=r.x)r.t.N()}finally{t()}}}});function d(i){return new u(i)}function c(i){for(var t=i.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function a(i){for(var t=i.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r)t.r=r;t.S.n=t;t.i=-1;if(void 0===t.n){i.s=t;break}}}function l(i){var t=i.s,r=void 0;while(void 0!==t){var o=t.p;if(-1===t.i){t.S.U(t);if(void 0!==o)o.n=t.n;if(void 0!==t.n)t.n.p=o}else r=t;t.S.n=t.r;if(void 0!==t.r)t.r=void 0;t=o}i.s=r}function y(i){u.call(this,void 0);this.x=i;this.s=void 0;this.g=v-1;this.f=4}(y.prototype=new u).h=function(){this.f&=-3;if(1&this.f)return!1;if(32==(36&this.f))return!0;this.f&=-5;if(this.g===v)return!0;this.g=v;this.f|=1;if(this.i>0&&!c(this)){this.f&=-2;return!0}var i=o;try{a(this);o=this;var t=this.x();if(16&this.f||this.v!==t||0===this.i){this.v=t;this.f&=-17;this.i++}}catch(i){this.v=i;this.f|=16;this.i++}o=i;l(this);this.f&=-2;return!0};y.prototype.S=function(i){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}u.prototype.S.call(this,i)};y.prototype.U=function(i){if(void 0!==this.t){u.prototype.U.call(this,i);if(void 0===this.t){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}}};y.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N()}};Object.defineProperty(y.prototype,\"value\",{get:function(){if(1&this.f)throw new Error(\"Cycle detected\");var i=e(this);this.h();if(void 0!==i)i.i=this.i;if(16&this.f)throw this.v;return this.v}});function w(i){return new y(i)}function _(i){var r=i.u;i.u=void 0;if(\"function\"==typeof r){s++;var n=o;o=void 0;try{r()}catch(t){i.f&=-2;i.f|=8;g(i);throw t}finally{o=n;t()}}}function g(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;_(i)}function p(i){if(o!==this)throw new Error(\"Out-of-order effect\");l(this);o=i;this.f&=-2;if(8&this.f)g(this);t()}function b(i){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32}b.prototype.c=function(){var i=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();if(\"function\"==typeof t)this.u=t}finally{i()}};b.prototype.S=function(){if(1&this.f)throw new Error(\"Cycle detected\");this.f|=1;this.f&=-9;_(this);a(this);s++;var i=o;o=this;return p.bind(this,i)};b.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=h;h=this}};b.prototype.d=function(){this.f|=8;if(!(1&this.f))g(this)};function E(i){var t=new b(i);try{t.c()}catch(i){t.d();throw i}return t.d.bind(t)}export{u as Signal,r as batch,w as computed,E as effect,d as signal,n as untracked};//# sourceMappingURL=signals-core.module.js.map\n","import{Signal as n,signal as r,computed as t,effect as e}from\"@preact/signals-core\";import i,{version as u,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED as o,useRef as f,useLayoutEffect as c,useMemo as a,useEffect as s}from\"react\";import{useSyncExternalStore as l}from\"use-sync-external-store/shim/index.js\";import v from\"react/jsx-runtime\";import m from\"react/jsx-dev-runtime\";var p=!1,d=null,b=!1,g=null,h=new Map;function y(n){if(!n)return 1;var r,t=h.get(n);if(void 0!==t)return t;var e=n.useCallback.toString();if(n.useReducer===n.useEffect)r=1;else if(n.useEffect===n.useImperativeHandle)r=32;else if(/Invalid/.test(e))r=2;else if(/updateCallback/.test(e)||/\\[0\\]/.test(e)&&/\\[1\\]/.test(e)){var i=n.useReducer.toString();if(/rerenderReducer/.test(i)||/return\\s*\\[\\w+,/.test(i))r=16;else r=8}else r=4;h.set(n,r);return r}function _(){if(u.split(\".\").map(Number)[0]>=19)throw new Error(\"Automatic signals tracking is not supported in React 19 and later, try the Babel plugin instead https://github.com/preactjs/signals/tree/main/packages/react-transform#signals-react-transform.\");!function(){p=!0;Object.defineProperty(o.ReactCurrentDispatcher,\"current\",{get:function(){return g},set:function(n){if(!b){var r=y(g),t=y(n);g=n;if(function(n,r){if(1&n&&28&r)return!0;else if(2&n||2&r)return!1;else return!1}(r,t)){b=!0;d=M(1);b=!1}else if(function(n,r){return Boolean(28&n&&16&r)}(r,t)){var e;null==(e=d)||e.f();b=!0;d=M(1);b=!1}else if(function(n,r){return Boolean(28&n&&1&r)}(r,t)){var i;null==(i=d)||i.f();d=null}}else g=n}})}();!function(){var n=v,r=m;i.createElement=k(i.createElement);r.jsx&&(r.jsx=k(r.jsx));n.jsx&&(n.jsx=k(n.jsx));r.jsxs&&(r.jsxs=k(r.jsxs));n.jsxs&&(n.jsxs=k(n.jsxs));r.jsxDEV&&(r.jsxDEV=k(r.jsxDEV));n.jsxDEV&&(n.jsxDEV=k(n.jsxDEV))}()}var j=[],S=Symbol.for(\"react.element\"),x=function(){};function k(r){if(\"function\"!=typeof r)return r;else return function(t,e){if(\"string\"==typeof t&&e)for(var i in e){var u=e[i];if(\"children\"!==i&&u instanceof n)e[i]=u.value}return r.call.apply(r,[r,t,e].concat([].slice.call(arguments,2)))}}var w,B=Symbol.dispose||Symbol.for(\"Symbol.dispose\");function O(n,r){var t=r.effect.S();w=r;return P.bind(r,n,t)}function P(n,r){r();w=n}var R,$,A=((R={u:0,effect:{s:void 0,c:function(){},S:function(){return x},d:function(){}},subscribe:function(){return x},getSnapshot:function(){return 0},S:function(){},f:function(){}})[B]=function(){},R),C=Promise.prototype.then.bind(Promise.resolve());function E(){if(!$)$=C(I)}function I(){var n;$=void 0;null==(n=w)||n.f()}function M(n){if(void 0===n)n=0;E();var r=f();if(null==r.current)r.current=function(n){var r,t,i,u,o=0,f=e(function(){t=this});t.c=function(){o=o+1|0;if(u)u()};return(r={u:n,effect:t,subscribe:function(n){u=n;return function(){o=o+1|0;u=void 0;f()}},getSnapshot:function(){return o},S:function(){if(null!=w){var n=w.u,r=this.u;if(0==n&&0==r||0==n&&1==r){w.f();i=O(void 0,this)}else if(1==n&&0==r||2==n&&0==r);else i=O(w,this)}else i=O(void 0,this)},f:function(){var n=i;i=void 0;null==n||n()}})[B]=function(){this.f()},r}(n);var t=r.current;l(t.subscribe,t.getSnapshot,t.getSnapshot);t.S();if(0===n)c(I);return t}Object.defineProperties(n.prototype,{$$typeof:{configurable:!0,value:S},type:{configurable:!0,value:function(n){var r=n.data,t=M(1);try{return r.value}finally{t.f()}}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});function N(n){if(p)return A;else return M(n)}function useSignal(n){return a(function(){return r(n)},j)}function useComputed(n){var r=f(n);r.current=n;return a(function(){return t(function(){return r.current()})},j)}function useSignalEffect(n){var r=f(n);r.current=n;s(function(){return e(function(){return r.current()})},j)}export{M as _useSignalsImplementation,E as ensureFinalCleanup,_ as installAutoSignalTracking,useComputed,useSignal,useSignalEffect,N as useSignals,k as wrapJsx};//# sourceMappingURL=runtime.module.js.map\n","import { CANCEL } from '@redux-saga/symbols';\n\nvar MAX_SIGNED_INT = 2147483647;\nfunction delayP(ms, val) {\n if (val === void 0) {\n val = true;\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#maximum_delay_value\n if (process.env.NODE_ENV !== 'production' && ms > MAX_SIGNED_INT) {\n throw new Error('delay only supports a maximum value of ' + MAX_SIGNED_INT + 'ms');\n }\n\n var timeoutId;\n var promise = new Promise(function (resolve) {\n timeoutId = setTimeout(resolve, Math.min(MAX_SIGNED_INT, ms), val);\n });\n\n promise[CANCEL] = function () {\n clearTimeout(timeoutId);\n };\n\n return promise;\n}\n\nexport default delayP;\n","import { TASK_CANCEL, TERMINATE, SAGA_LOCATION, SAGA_ACTION, IO, SELF_CANCELLATION } from '@redux-saga/symbols';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport { array, notUndef, pattern, multicast, channel, undef, effect, task, func, buffer, string, object } from '@redux-saga/is';\nimport delayP from '@redux-saga/delay-p';\n\nvar konst = function konst(v) {\n return function () {\n return v;\n };\n};\nvar kTrue =\n/*#__PURE__*/\nkonst(true);\n\nvar noop = function noop() {};\n\nif (process.env.NODE_ENV !== 'production' && typeof Proxy !== 'undefined') {\n noop =\n /*#__PURE__*/\n new Proxy(noop, {\n set: function set() {\n throw internalErr('There was an attempt to assign a property to internal `noop` function.');\n }\n });\n}\nvar identity = function identity(v) {\n return v;\n};\nvar hasSymbol = typeof Symbol === 'function';\nvar asyncIteratorSymbol = hasSymbol && Symbol.asyncIterator ? Symbol.asyncIterator : '@@asyncIterator';\nfunction check(value, predicate, error) {\n if (!predicate(value)) {\n throw new Error(error);\n }\n}\nvar assignWithSymbols = function assignWithSymbols(target, source) {\n _extends(target, source);\n\n if (Object.getOwnPropertySymbols) {\n Object.getOwnPropertySymbols(source).forEach(function (s) {\n target[s] = source[s];\n });\n }\n};\nvar flatMap = function flatMap(mapper, arr) {\n var _ref;\n\n return (_ref = []).concat.apply(_ref, arr.map(mapper));\n};\nfunction remove(array, item) {\n var index = array.indexOf(item);\n\n if (index >= 0) {\n array.splice(index, 1);\n }\n}\nfunction once(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n\n called = true;\n fn();\n };\n}\n\nvar kThrow = function kThrow(err) {\n throw err;\n};\n\nvar kReturn = function kReturn(value) {\n return {\n value: value,\n done: true\n };\n};\n\nfunction makeIterator(next, thro, name) {\n if (thro === void 0) {\n thro = kThrow;\n }\n\n if (name === void 0) {\n name = 'iterator';\n }\n\n var iterator = {\n meta: {\n name: name\n },\n next: next,\n throw: thro,\n return: kReturn,\n isSagaIterator: true\n };\n\n if (typeof Symbol !== 'undefined') {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n}\nfunction logError(error, _ref2) {\n var sagaStack = _ref2.sagaStack;\n\n /*eslint-disable no-console*/\n console.error(error);\n console.error(sagaStack);\n}\nvar internalErr = function internalErr(err) {\n return new Error(\"\\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\\n in redux-saga code and not yours. Thanks for reporting this in the project's github repo.\\n Error: \" + err + \"\\n\");\n};\nvar createSetContextWarning = function createSetContextWarning(ctx, props) {\n return (ctx ? ctx + '.' : '') + \"setContext(props): argument \" + props + \" is not a plain object\";\n};\nvar FROZEN_ACTION_ERROR = \"You can't put (a.k.a. dispatch from saga) frozen actions.\\nWe have to define a special non-enumerable property on those actions for scheduling purposes.\\nOtherwise you wouldn't be able to communicate properly between sagas & other subscribers (action ordering would become far less predictable).\\nIf you are using redux and you care about this behaviour (frozen actions),\\nthen you might want to switch to freezing actions in a middleware rather than in action creator.\\nExample implementation:\\n\\nconst freezeActions = store => next => action => next(Object.freeze(action))\\n\"; // creates empty, but not-holey array\n\nvar createEmptyArray = function createEmptyArray(n) {\n return Array.apply(null, new Array(n));\n};\nvar wrapSagaDispatch = function wrapSagaDispatch(dispatch) {\n return function (action) {\n if (process.env.NODE_ENV !== 'production') {\n check(action, function (ac) {\n return !Object.isFrozen(ac);\n }, FROZEN_ACTION_ERROR);\n }\n\n return dispatch(Object.defineProperty(action, SAGA_ACTION, {\n value: true\n }));\n };\n};\nvar shouldTerminate = function shouldTerminate(res) {\n return res === TERMINATE;\n};\nvar shouldCancel = function shouldCancel(res) {\n return res === TASK_CANCEL;\n};\nvar shouldComplete = function shouldComplete(res) {\n return shouldTerminate(res) || shouldCancel(res);\n};\nfunction createAllStyleChildCallbacks(shape, parentCallback) {\n var keys = Object.keys(shape);\n var totalCount = keys.length;\n\n if (process.env.NODE_ENV !== 'production') {\n check(totalCount, function (c) {\n return c > 0;\n }, 'createAllStyleChildCallbacks: get an empty array or object');\n }\n\n var completedCount = 0;\n var completed;\n var results = array(shape) ? createEmptyArray(totalCount) : {};\n var childCallbacks = {};\n\n function checkEnd() {\n if (completedCount === totalCount) {\n completed = true;\n parentCallback(results);\n }\n }\n\n keys.forEach(function (key) {\n var chCbAtKey = function chCbAtKey(res, isErr) {\n if (completed) {\n return;\n }\n\n if (isErr || shouldComplete(res)) {\n parentCallback.cancel();\n parentCallback(res, isErr);\n } else {\n results[key] = res;\n completedCount++;\n checkEnd();\n }\n };\n\n chCbAtKey.cancel = noop;\n childCallbacks[key] = chCbAtKey;\n });\n\n parentCallback.cancel = function () {\n if (!completed) {\n completed = true;\n keys.forEach(function (key) {\n return childCallbacks[key].cancel();\n });\n }\n };\n\n return childCallbacks;\n}\nfunction getMetaInfo(fn) {\n return {\n name: fn.name || 'anonymous',\n location: getLocation(fn)\n };\n}\nfunction getLocation(instrumented) {\n return instrumented[SAGA_LOCATION];\n}\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\nvar BUFFER_OVERFLOW = \"Channel's Buffer overflow!\";\nvar ON_OVERFLOW_THROW = 1;\nvar ON_OVERFLOW_DROP = 2;\nvar ON_OVERFLOW_SLIDE = 3;\nvar ON_OVERFLOW_EXPAND = 4;\nvar zeroBuffer = {\n isEmpty: kTrue,\n put: noop,\n take: noop\n};\n\nfunction ringBuffer(limit, overflowAction) {\n if (limit === void 0) {\n limit = 10;\n }\n\n var arr = new Array(limit);\n var length = 0;\n var pushIndex = 0;\n var popIndex = 0;\n\n var push = function push(it) {\n arr[pushIndex] = it;\n pushIndex = (pushIndex + 1) % limit;\n length++;\n };\n\n var take = function take() {\n if (length != 0) {\n var it = arr[popIndex];\n arr[popIndex] = null;\n length--;\n popIndex = (popIndex + 1) % limit;\n return it;\n }\n };\n\n var flush = function flush() {\n var items = [];\n\n while (length) {\n items.push(take());\n }\n\n return items;\n };\n\n return {\n isEmpty: function isEmpty() {\n return length == 0;\n },\n put: function put(it) {\n if (length < limit) {\n push(it);\n } else {\n var doubledLimit;\n\n switch (overflowAction) {\n case ON_OVERFLOW_THROW:\n throw new Error(BUFFER_OVERFLOW);\n\n case ON_OVERFLOW_SLIDE:\n arr[pushIndex] = it;\n pushIndex = (pushIndex + 1) % limit;\n popIndex = pushIndex;\n break;\n\n case ON_OVERFLOW_EXPAND:\n doubledLimit = 2 * limit;\n arr = flush();\n length = arr.length;\n pushIndex = arr.length;\n popIndex = 0;\n arr.length = doubledLimit;\n limit = doubledLimit;\n push(it);\n break;\n\n default: // DROP\n\n }\n }\n },\n take: take,\n flush: flush\n };\n}\n\nvar none = function none() {\n return zeroBuffer;\n};\nvar fixed = function fixed(limit) {\n return ringBuffer(limit, ON_OVERFLOW_THROW);\n};\nvar dropping = function dropping(limit) {\n return ringBuffer(limit, ON_OVERFLOW_DROP);\n};\nvar sliding = function sliding(limit) {\n return ringBuffer(limit, ON_OVERFLOW_SLIDE);\n};\nvar expanding = function expanding(initialSize) {\n return ringBuffer(initialSize, ON_OVERFLOW_EXPAND);\n};\n\nvar buffers = /*#__PURE__*/Object.freeze({\n __proto__: null,\n none: none,\n fixed: fixed,\n dropping: dropping,\n sliding: sliding,\n expanding: expanding\n});\n\nvar TAKE = 'TAKE';\nvar PUT = 'PUT';\nvar ALL = 'ALL';\nvar RACE = 'RACE';\nvar CALL = 'CALL';\nvar CPS = 'CPS';\nvar FORK = 'FORK';\nvar JOIN = 'JOIN';\nvar CANCEL = 'CANCEL';\nvar SELECT = 'SELECT';\nvar ACTION_CHANNEL = 'ACTION_CHANNEL';\nvar CANCELLED = 'CANCELLED';\nvar FLUSH = 'FLUSH';\nvar GET_CONTEXT = 'GET_CONTEXT';\nvar SET_CONTEXT = 'SET_CONTEXT';\n\nvar effectTypes = /*#__PURE__*/Object.freeze({\n __proto__: null,\n TAKE: TAKE,\n PUT: PUT,\n ALL: ALL,\n RACE: RACE,\n CALL: CALL,\n CPS: CPS,\n FORK: FORK,\n JOIN: JOIN,\n CANCEL: CANCEL,\n SELECT: SELECT,\n ACTION_CHANNEL: ACTION_CHANNEL,\n CANCELLED: CANCELLED,\n FLUSH: FLUSH,\n GET_CONTEXT: GET_CONTEXT,\n SET_CONTEXT: SET_CONTEXT\n});\n\nvar TEST_HINT = '\\n(HINT: if you are getting these errors in tests, consider using createMockTask from @redux-saga/testing-utils)';\n\nvar makeEffect = function makeEffect(type, payload) {\n var _ref;\n\n return _ref = {}, _ref[IO] = true, _ref.combinator = false, _ref.type = type, _ref.payload = payload, _ref;\n};\n\nvar isForkEffect = function isForkEffect(eff) {\n return effect(eff) && eff.type === FORK;\n};\n\nvar detach = function detach(eff) {\n if (process.env.NODE_ENV !== 'production') {\n check(eff, isForkEffect, 'detach(eff): argument must be a fork effect');\n }\n\n return makeEffect(FORK, _extends({}, eff.payload, {\n detached: true\n }));\n};\nfunction take(patternOrChannel, multicastPattern) {\n if (patternOrChannel === void 0) {\n patternOrChannel = '*';\n }\n\n if (process.env.NODE_ENV !== 'production' && arguments.length) {\n check(arguments[0], notUndef, 'take(patternOrChannel): patternOrChannel is undefined');\n }\n\n if (pattern(patternOrChannel)) {\n if (notUndef(multicastPattern)) {\n /* eslint-disable no-console */\n console.warn(\"take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types\");\n }\n\n return makeEffect(TAKE, {\n pattern: patternOrChannel\n });\n }\n\n if (multicast(patternOrChannel) && notUndef(multicastPattern) && pattern(multicastPattern)) {\n return makeEffect(TAKE, {\n channel: patternOrChannel,\n pattern: multicastPattern\n });\n }\n\n if (channel(patternOrChannel)) {\n if (notUndef(multicastPattern)) {\n /* eslint-disable no-console */\n console.warn(\"take(channel) takes one argument but two were provided. Second argument is ignored.\");\n }\n\n return makeEffect(TAKE, {\n channel: patternOrChannel\n });\n }\n\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\"take(patternOrChannel): argument \" + patternOrChannel + \" is not valid channel or a valid pattern\");\n }\n}\nvar takeMaybe = function takeMaybe() {\n var eff = take.apply(void 0, arguments);\n eff.payload.maybe = true;\n return eff;\n};\nfunction put(channel$1, action) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n check(channel$1, notUndef, 'put(channel, action): argument channel is undefined');\n check(channel$1, channel, \"put(channel, action): argument \" + channel$1 + \" is not a valid channel\");\n check(action, notUndef, 'put(channel, action): argument action is undefined');\n } else {\n check(channel$1, notUndef, 'put(action): argument action is undefined');\n }\n }\n\n if (undef(action)) {\n action = channel$1; // `undefined` instead of `null` to make default parameter work\n\n channel$1 = undefined;\n }\n\n return makeEffect(PUT, {\n channel: channel$1,\n action: action\n });\n}\nvar putResolve = function putResolve() {\n var eff = put.apply(void 0, arguments);\n eff.payload.resolve = true;\n return eff;\n};\nfunction all(effects) {\n var eff = makeEffect(ALL, effects);\n eff.combinator = true;\n return eff;\n}\nfunction race(effects) {\n var eff = makeEffect(RACE, effects);\n eff.combinator = true;\n return eff;\n} // this match getFnCallDescriptor logic\n\nvar validateFnDescriptor = function validateFnDescriptor(effectName, fnDescriptor) {\n check(fnDescriptor, notUndef, effectName + \": argument fn is undefined or null\");\n\n if (func(fnDescriptor)) {\n return;\n }\n\n var context = null;\n var fn;\n\n if (array(fnDescriptor)) {\n context = fnDescriptor[0];\n fn = fnDescriptor[1];\n check(fn, notUndef, effectName + \": argument of type [context, fn] has undefined or null `fn`\");\n } else if (object(fnDescriptor)) {\n context = fnDescriptor.context;\n fn = fnDescriptor.fn;\n check(fn, notUndef, effectName + \": argument of type {context, fn} has undefined or null `fn`\");\n } else {\n check(fnDescriptor, func, effectName + \": argument fn is not function\");\n return;\n }\n\n if (context && string(fn)) {\n check(context[fn], func, effectName + \": context arguments has no such method - \\\"\" + fn + \"\\\"\");\n return;\n }\n\n check(fn, func, effectName + \": unpacked fn argument (from [context, fn] or {context, fn}) is not a function\");\n};\n\nfunction getFnCallDescriptor(fnDescriptor, args) {\n var context = null;\n var fn;\n\n if (func(fnDescriptor)) {\n fn = fnDescriptor;\n } else {\n if (array(fnDescriptor)) {\n context = fnDescriptor[0];\n fn = fnDescriptor[1];\n } else {\n context = fnDescriptor.context;\n fn = fnDescriptor.fn;\n }\n\n if (context && string(fn) && func(context[fn])) {\n fn = context[fn];\n }\n }\n\n return {\n context: context,\n fn: fn,\n args: args\n };\n}\n\nvar isNotDelayEffect = function isNotDelayEffect(fn) {\n return fn !== delay;\n};\n\nfunction call(fnDescriptor) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var arg0 = typeof args[0] === 'number' ? args[0] : 'ms';\n check(fnDescriptor, isNotDelayEffect, \"instead of writing `yield call(delay, \" + arg0 + \")` where delay is an effect from `redux-saga/effects` you should write `yield delay(\" + arg0 + \")`\");\n validateFnDescriptor('call', fnDescriptor);\n }\n\n return makeEffect(CALL, getFnCallDescriptor(fnDescriptor, args));\n}\nfunction apply(context, fn, args) {\n if (args === void 0) {\n args = [];\n }\n\n var fnDescriptor = [context, fn];\n\n if (process.env.NODE_ENV !== 'production') {\n validateFnDescriptor('apply', fnDescriptor);\n }\n\n return makeEffect(CALL, getFnCallDescriptor([context, fn], args));\n}\nfunction cps(fnDescriptor) {\n if (process.env.NODE_ENV !== 'production') {\n validateFnDescriptor('cps', fnDescriptor);\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return makeEffect(CPS, getFnCallDescriptor(fnDescriptor, args));\n}\nfunction fork(fnDescriptor) {\n if (process.env.NODE_ENV !== 'production') {\n validateFnDescriptor('fork', fnDescriptor);\n check(fnDescriptor, function (arg) {\n return !effect(arg);\n }, 'fork: argument must not be an effect');\n }\n\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n return makeEffect(FORK, getFnCallDescriptor(fnDescriptor, args));\n}\nfunction spawn(fnDescriptor) {\n if (process.env.NODE_ENV !== 'production') {\n validateFnDescriptor('spawn', fnDescriptor);\n }\n\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n\n return detach(fork.apply(void 0, [fnDescriptor].concat(args)));\n}\nfunction join(taskOrTasks) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n throw new Error('join(...tasks) is not supported any more. Please use join([...tasks]) to join multiple tasks.');\n }\n\n if (array(taskOrTasks)) {\n taskOrTasks.forEach(function (t) {\n check(t, task, \"join([...tasks]): argument \" + t + \" is not a valid Task object \" + TEST_HINT);\n });\n } else {\n check(taskOrTasks, task, \"join(task): argument \" + taskOrTasks + \" is not a valid Task object \" + TEST_HINT);\n }\n }\n\n return makeEffect(JOIN, taskOrTasks);\n}\nfunction cancel(taskOrTasks) {\n if (taskOrTasks === void 0) {\n taskOrTasks = SELF_CANCELLATION;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n throw new Error('cancel(...tasks) is not supported any more. Please use cancel([...tasks]) to cancel multiple tasks.');\n }\n\n if (array(taskOrTasks)) {\n taskOrTasks.forEach(function (t) {\n check(t, task, \"cancel([...tasks]): argument \" + t + \" is not a valid Task object \" + TEST_HINT);\n });\n } else if (taskOrTasks !== SELF_CANCELLATION && notUndef(taskOrTasks)) {\n check(taskOrTasks, task, \"cancel(task): argument \" + taskOrTasks + \" is not a valid Task object \" + TEST_HINT);\n }\n }\n\n return makeEffect(CANCEL, taskOrTasks);\n}\nfunction select(selector) {\n if (selector === void 0) {\n selector = identity;\n }\n\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n\n if (process.env.NODE_ENV !== 'production' && arguments.length) {\n check(arguments[0], notUndef, 'select(selector, [...]): argument selector is undefined');\n check(selector, func, \"select(selector, [...]): argument \" + selector + \" is not a function\");\n }\n\n return makeEffect(SELECT, {\n selector: selector,\n args: args\n });\n}\n/**\n channel(pattern, [buffer]) => creates a proxy channel for store actions\n**/\n\nfunction actionChannel(pattern$1, buffer$1) {\n if (process.env.NODE_ENV !== 'production') {\n check(pattern$1, pattern, 'actionChannel(pattern,...): argument pattern is not valid');\n\n if (arguments.length > 1) {\n check(buffer$1, notUndef, 'actionChannel(pattern, buffer): argument buffer is undefined');\n check(buffer$1, buffer, \"actionChannel(pattern, buffer): argument \" + buffer$1 + \" is not a valid buffer\");\n }\n }\n\n return makeEffect(ACTION_CHANNEL, {\n pattern: pattern$1,\n buffer: buffer$1\n });\n}\nfunction cancelled() {\n return makeEffect(CANCELLED, {});\n}\nfunction flush(channel$1) {\n if (process.env.NODE_ENV !== 'production') {\n check(channel$1, channel, \"flush(channel): argument \" + channel$1 + \" is not valid channel\");\n }\n\n return makeEffect(FLUSH, channel$1);\n}\nfunction getContext(prop) {\n if (process.env.NODE_ENV !== 'production') {\n check(prop, string, \"getContext(prop): argument \" + prop + \" is not a string\");\n }\n\n return makeEffect(GET_CONTEXT, prop);\n}\nfunction setContext(props) {\n if (process.env.NODE_ENV !== 'production') {\n check(props, object, createSetContextWarning(null, props));\n }\n\n return makeEffect(SET_CONTEXT, props);\n}\nvar delay =\n/*#__PURE__*/\ncall.bind(null, delayP);\n\nexport { all as $, ALL as A, compose as B, CALL as C, logError as D, wrapSagaDispatch as E, FORK as F, GET_CONTEXT as G, identity as H, buffers as I, JOIN as J, detach as K, take as L, fork as M, cancel as N, call as O, PUT as P, delay as Q, RACE as R, SELECT as S, TAKE as T, actionChannel as U, sliding as V, race as W, effectTypes as X, takeMaybe as Y, put as Z, putResolve as _, CPS as a, apply as a0, cps as a1, spawn as a2, join as a3, select as a4, cancelled as a5, flush as a6, getContext as a7, setContext as a8, CANCEL as b, check as c, ACTION_CHANNEL as d, expanding as e, CANCELLED as f, FLUSH as g, SET_CONTEXT as h, internalErr as i, getMetaInfo as j, kTrue as k, createAllStyleChildCallbacks as l, createEmptyArray as m, none as n, once as o, assignWithSymbols as p, makeIterator as q, remove as r, shouldComplete as s, noop as t, flatMap as u, getLocation as v, createSetContextWarning as w, asyncIteratorSymbol as x, shouldCancel as y, shouldTerminate as z };\n","import { TASK, SAGA_ACTION, MULTICAST, IO } from '@redux-saga/symbols';\n\nvar undef = function undef(v) {\n return v === null || v === undefined;\n};\nvar notUndef = function notUndef(v) {\n return v !== null && v !== undefined;\n};\nvar func = function func(f) {\n return typeof f === 'function';\n};\nvar number = function number(n) {\n return typeof n === 'number';\n};\nvar string = function string(s) {\n return typeof s === 'string';\n};\nvar array = Array.isArray;\nvar object = function object(obj) {\n return obj && !array(obj) && typeof obj === 'object';\n};\nvar promise = function promise(p) {\n return p && func(p.then);\n};\nvar iterator = function iterator(it) {\n return it && func(it.next) && func(it.throw);\n};\nvar iterable = function iterable(it) {\n return it && func(Symbol) ? func(it[Symbol.iterator]) : array(it);\n};\nvar task = function task(t) {\n return t && t[TASK];\n};\nvar sagaAction = function sagaAction(a) {\n return Boolean(a && a[SAGA_ACTION]);\n};\nvar observable = function observable(ob) {\n return ob && func(ob.subscribe);\n};\nvar buffer = function buffer(buf) {\n return buf && func(buf.isEmpty) && func(buf.take) && func(buf.put);\n};\nvar pattern = function pattern(pat) {\n return pat && (string(pat) || symbol(pat) || func(pat) || array(pat) && pat.every(pattern));\n};\nvar channel = function channel(ch) {\n return ch && func(ch.take) && func(ch.close);\n};\nvar stringableFunc = function stringableFunc(f) {\n return func(f) && f.hasOwnProperty('toString');\n};\nvar symbol = function symbol(sym) {\n return Boolean(sym) && typeof Symbol === 'function' && sym.constructor === Symbol && sym !== Symbol.prototype;\n};\nvar multicast = function multicast(ch) {\n return channel(ch) && ch[MULTICAST];\n};\nvar effect = function effect(eff) {\n return eff && eff[IO];\n};\n\nexport { array, buffer, channel, effect, func, iterable, iterator, multicast, notUndef, number, object, observable, pattern, promise, sagaAction, string, stringableFunc, symbol, task, undef };\n","var createSymbol = function createSymbol(name) {\n return \"@@redux-saga/\" + name;\n};\n\nvar CANCEL =\n/*#__PURE__*/\ncreateSymbol('CANCEL_PROMISE');\nvar CHANNEL_END_TYPE =\n/*#__PURE__*/\ncreateSymbol('CHANNEL_END');\nvar IO =\n/*#__PURE__*/\ncreateSymbol('IO');\nvar MATCH =\n/*#__PURE__*/\ncreateSymbol('MATCH');\nvar MULTICAST =\n/*#__PURE__*/\ncreateSymbol('MULTICAST');\nvar SAGA_ACTION =\n/*#__PURE__*/\ncreateSymbol('SAGA_ACTION');\nvar SELF_CANCELLATION =\n/*#__PURE__*/\ncreateSymbol('SELF_CANCELLATION');\nvar TASK =\n/*#__PURE__*/\ncreateSymbol('TASK');\nvar TASK_CANCEL =\n/*#__PURE__*/\ncreateSymbol('TASK_CANCEL');\nvar TERMINATE =\n/*#__PURE__*/\ncreateSymbol('TERMINATE');\nvar SAGA_LOCATION =\n/*#__PURE__*/\ncreateSymbol('LOCATION');\n\nexport { CANCEL, CHANNEL_END_TYPE, IO, MATCH, MULTICAST, SAGA_ACTION, SAGA_LOCATION, SELF_CANCELLATION, TASK, TASK_CANCEL, TERMINATE };\n","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n};\r\nvar __defProp = Object.defineProperty;\r\nvar __defProps = Object.defineProperties;\r\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\r\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\r\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\r\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\r\nvar __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };\r\nvar __spreadValues = function (a, b) {\r\n for (var prop in b || (b = {}))\r\n if (__hasOwnProp.call(b, prop))\r\n __defNormalProp(a, prop, b[prop]);\r\n if (__getOwnPropSymbols)\r\n for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) {\r\n var prop = _c[_i];\r\n if (__propIsEnum.call(b, prop))\r\n __defNormalProp(a, prop, b[prop]);\r\n }\r\n return a;\r\n};\r\nvar __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };\r\nvar __async = function (__this, __arguments, generator) {\r\n return new Promise(function (resolve, reject) {\r\n var fulfilled = function (value) {\r\n try {\r\n step(generator.next(value));\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n };\r\n var rejected = function (value) {\r\n try {\r\n step(generator.throw(value));\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n };\r\n var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); };\r\n step((generator = generator.apply(__this, __arguments)).next());\r\n });\r\n};\r\n// src/index.ts\r\nimport { enableES5 } from \"immer\";\r\nexport * from \"redux\";\r\nimport { default as default2, current as current2, freeze, original, isDraft as isDraft4 } from \"immer\";\r\nimport { createSelector as createSelector2 } from \"reselect\";\r\n// src/createDraftSafeSelector.ts\r\nimport { current, isDraft } from \"immer\";\r\nimport { createSelector } from \"reselect\";\r\nvar createDraftSafeSelector = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var selector = createSelector.apply(void 0, args);\r\n var wrappedSelector = function (value) {\r\n var rest = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n rest[_i - 1] = arguments[_i];\r\n }\r\n return selector.apply(void 0, __spreadArray([isDraft(value) ? current(value) : value], rest));\r\n };\r\n return wrappedSelector;\r\n};\r\n// src/configureStore.ts\r\nimport { createStore, compose as compose2, applyMiddleware, combineReducers } from \"redux\";\r\n// src/devtoolsExtension.ts\r\nimport { compose } from \"redux\";\r\nvar composeWithDevTools = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {\r\n if (arguments.length === 0)\r\n return void 0;\r\n if (typeof arguments[0] === \"object\")\r\n return compose;\r\n return compose.apply(null, arguments);\r\n};\r\nvar devToolsEnhancer = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {\r\n return function (noop2) {\r\n return noop2;\r\n };\r\n};\r\n// src/isPlainObject.ts\r\nfunction isPlainObject(value) {\r\n if (typeof value !== \"object\" || value === null)\r\n return false;\r\n var proto = Object.getPrototypeOf(value);\r\n if (proto === null)\r\n return true;\r\n var baseProto = proto;\r\n while (Object.getPrototypeOf(baseProto) !== null) {\r\n baseProto = Object.getPrototypeOf(baseProto);\r\n }\r\n return proto === baseProto;\r\n}\r\n// src/getDefaultMiddleware.ts\r\nimport thunkMiddleware from \"redux-thunk\";\r\n// src/utils.ts\r\nfunction getTimeMeasureUtils(maxDelay, fnName) {\r\n var elapsed = 0;\r\n return {\r\n measureTime: function (fn) {\r\n var started = Date.now();\r\n try {\r\n return fn();\r\n }\r\n finally {\r\n var finished = Date.now();\r\n elapsed += finished - started;\r\n }\r\n },\r\n warnIfExceeded: function () {\r\n if (elapsed > maxDelay) {\r\n console.warn(fnName + \" took \" + elapsed + \"ms, which is more than the warning threshold of \" + maxDelay + \"ms. \\nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\\nIt is disabled in production builds, so you don't need to worry about that.\");\r\n }\r\n }\r\n };\r\n}\r\nvar MiddlewareArray = /** @class */ (function (_super) {\r\n __extends(MiddlewareArray, _super);\r\n function MiddlewareArray() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var _this = _super.apply(this, args) || this;\r\n Object.setPrototypeOf(_this, MiddlewareArray.prototype);\r\n return _this;\r\n }\r\n Object.defineProperty(MiddlewareArray, Symbol.species, {\r\n get: function () {\r\n return MiddlewareArray;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n MiddlewareArray.prototype.concat = function () {\r\n var arr = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n arr[_i] = arguments[_i];\r\n }\r\n return _super.prototype.concat.apply(this, arr);\r\n };\r\n MiddlewareArray.prototype.prepend = function () {\r\n var arr = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n arr[_i] = arguments[_i];\r\n }\r\n if (arr.length === 1 && Array.isArray(arr[0])) {\r\n return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();\r\n }\r\n return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();\r\n };\r\n return MiddlewareArray;\r\n}(Array));\r\n// src/immutableStateInvariantMiddleware.ts\r\nvar isProduction = process.env.NODE_ENV === \"production\";\r\nvar prefix = \"Invariant failed\";\r\nfunction invariant(condition, message) {\r\n if (condition) {\r\n return;\r\n }\r\n if (isProduction) {\r\n throw new Error(prefix);\r\n }\r\n throw new Error(prefix + \": \" + (message || \"\"));\r\n}\r\nfunction stringify(obj, serializer, indent, decycler) {\r\n return JSON.stringify(obj, getSerialize(serializer, decycler), indent);\r\n}\r\nfunction getSerialize(serializer, decycler) {\r\n var stack = [], keys = [];\r\n if (!decycler)\r\n decycler = function (_, value) {\r\n if (stack[0] === value)\r\n return \"[Circular ~]\";\r\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\";\r\n };\r\n return function (key, value) {\r\n if (stack.length > 0) {\r\n var thisPos = stack.indexOf(this);\r\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\r\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\r\n if (~stack.indexOf(value))\r\n value = decycler.call(this, key, value);\r\n }\r\n else\r\n stack.push(value);\r\n return serializer == null ? value : serializer.call(this, key, value);\r\n };\r\n}\r\nfunction isImmutableDefault(value) {\r\n return typeof value !== \"object\" || value === null || typeof value === \"undefined\" || Object.isFrozen(value);\r\n}\r\nfunction trackForMutations(isImmutable, ignorePaths, obj) {\r\n var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);\r\n return {\r\n detectMutations: function () {\r\n return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);\r\n }\r\n };\r\n}\r\nfunction trackProperties(isImmutable, ignorePaths, obj, path) {\r\n if (ignorePaths === void 0) { ignorePaths = []; }\r\n if (path === void 0) { path = \"\"; }\r\n var tracked = { value: obj };\r\n if (!isImmutable(obj)) {\r\n tracked.children = {};\r\n for (var key in obj) {\r\n var childPath = path ? path + \".\" + key : key;\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue;\r\n }\r\n tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);\r\n }\r\n }\r\n return tracked;\r\n}\r\nfunction detectMutations(isImmutable, ignorePaths, trackedProperty, obj, sameParentRef, path) {\r\n if (ignorePaths === void 0) { ignorePaths = []; }\r\n if (sameParentRef === void 0) { sameParentRef = false; }\r\n if (path === void 0) { path = \"\"; }\r\n var prevObj = trackedProperty ? trackedProperty.value : void 0;\r\n var sameRef = prevObj === obj;\r\n if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\r\n return { wasMutated: true, path: path };\r\n }\r\n if (isImmutable(prevObj) || isImmutable(obj)) {\r\n return { wasMutated: false };\r\n }\r\n var keysToDetect = {};\r\n for (var key in trackedProperty.children) {\r\n keysToDetect[key] = true;\r\n }\r\n for (var key in obj) {\r\n keysToDetect[key] = true;\r\n }\r\n for (var key in keysToDetect) {\r\n var childPath = path ? path + \".\" + key : key;\r\n if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\r\n continue;\r\n }\r\n var result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath);\r\n if (result.wasMutated) {\r\n return result;\r\n }\r\n }\r\n return { wasMutated: false };\r\n}\r\nfunction createImmutableStateInvariantMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n if (process.env.NODE_ENV === \"production\") {\r\n return function () { return function (next) { return function (action) { return next(action); }; }; };\r\n }\r\n var _c = options.isImmutable, isImmutable = _c === void 0 ? isImmutableDefault : _c, ignoredPaths = options.ignoredPaths, _d = options.warnAfter, warnAfter = _d === void 0 ? 32 : _d, ignore = options.ignore;\r\n ignoredPaths = ignoredPaths || ignore;\r\n var track = trackForMutations.bind(null, isImmutable, ignoredPaths);\r\n return function (_c) {\r\n var getState = _c.getState;\r\n var state = getState();\r\n var tracker = track(state);\r\n var result;\r\n return function (next) { return function (action) {\r\n var measureUtils = getTimeMeasureUtils(warnAfter, \"ImmutableStateInvariantMiddleware\");\r\n measureUtils.measureTime(function () {\r\n state = getState();\r\n result = tracker.detectMutations();\r\n tracker = track(state);\r\n invariant(!result.wasMutated, \"A state mutation was detected between dispatches, in the path '\" + (result.path || \"\") + \"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)\");\r\n });\r\n var dispatchedAction = next(action);\r\n measureUtils.measureTime(function () {\r\n state = getState();\r\n result = tracker.detectMutations();\r\n tracker = track(state);\r\n result.wasMutated && invariant(!result.wasMutated, \"A state mutation was detected inside a dispatch, in the path: \" + (result.path || \"\") + \". Take a look at the reducer(s) handling the action \" + stringify(action) + \". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)\");\r\n });\r\n measureUtils.warnIfExceeded();\r\n return dispatchedAction;\r\n }; };\r\n };\r\n}\r\n// src/serializableStateInvariantMiddleware.ts\r\nfunction isPlain(val) {\r\n var type = typeof val;\r\n return type === \"undefined\" || val === null || type === \"string\" || type === \"boolean\" || type === \"number\" || Array.isArray(val) || isPlainObject(val);\r\n}\r\nfunction findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths) {\r\n if (path === void 0) { path = \"\"; }\r\n if (isSerializable === void 0) { isSerializable = isPlain; }\r\n if (ignoredPaths === void 0) { ignoredPaths = []; }\r\n var foundNestedSerializable;\r\n if (!isSerializable(value)) {\r\n return {\r\n keyPath: path || \"\",\r\n value: value\r\n };\r\n }\r\n if (typeof value !== \"object\" || value === null) {\r\n return false;\r\n }\r\n var entries = getEntries != null ? getEntries(value) : Object.entries(value);\r\n var hasIgnoredPaths = ignoredPaths.length > 0;\r\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\r\n var _c = entries_1[_i], key = _c[0], nestedValue = _c[1];\r\n var nestedPath = path ? path + \".\" + key : key;\r\n if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {\r\n continue;\r\n }\r\n if (!isSerializable(nestedValue)) {\r\n return {\r\n keyPath: nestedPath,\r\n value: nestedValue\r\n };\r\n }\r\n if (typeof nestedValue === \"object\") {\r\n foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths);\r\n if (foundNestedSerializable) {\r\n return foundNestedSerializable;\r\n }\r\n }\r\n }\r\n return false;\r\n}\r\nfunction createSerializableStateInvariantMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n if (process.env.NODE_ENV === \"production\") {\r\n return function () { return function (next) { return function (action) { return next(action); }; }; };\r\n }\r\n var _c = options.isSerializable, isSerializable = _c === void 0 ? isPlain : _c, getEntries = options.getEntries, _d = options.ignoredActions, ignoredActions = _d === void 0 ? [] : _d, _e = options.ignoredActionPaths, ignoredActionPaths = _e === void 0 ? [\"meta.arg\", \"meta.baseQueryMeta\"] : _e, _f = options.ignoredPaths, ignoredPaths = _f === void 0 ? [] : _f, _g = options.warnAfter, warnAfter = _g === void 0 ? 32 : _g, _h = options.ignoreState, ignoreState = _h === void 0 ? false : _h, _j = options.ignoreActions, ignoreActions = _j === void 0 ? false : _j;\r\n return function (storeAPI) { return function (next) { return function (action) {\r\n var result = next(action);\r\n var measureUtils = getTimeMeasureUtils(warnAfter, \"SerializableStateInvariantMiddleware\");\r\n if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {\r\n measureUtils.measureTime(function () {\r\n var foundActionNonSerializableValue = findNonSerializableValue(action, \"\", isSerializable, getEntries, ignoredActionPaths);\r\n if (foundActionNonSerializableValue) {\r\n var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;\r\n console.error(\"A non-serializable value was detected in an action, in the path: `\" + keyPath + \"`. Value:\", value, \"\\nTake a look at the logic that dispatched this action: \", action, \"\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)\", \"\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)\");\r\n }\r\n });\r\n }\r\n if (!ignoreState) {\r\n measureUtils.measureTime(function () {\r\n var state = storeAPI.getState();\r\n var foundStateNonSerializableValue = findNonSerializableValue(state, \"\", isSerializable, getEntries, ignoredPaths);\r\n if (foundStateNonSerializableValue) {\r\n var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;\r\n console.error(\"A non-serializable value was detected in the state, in the path: `\" + keyPath + \"`. Value:\", value, \"\\nTake a look at the reducer(s) handling this action type: \" + action.type + \".\\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)\");\r\n }\r\n });\r\n measureUtils.warnIfExceeded();\r\n }\r\n return result;\r\n }; }; };\r\n}\r\n// src/getDefaultMiddleware.ts\r\nfunction isBoolean(x) {\r\n return typeof x === \"boolean\";\r\n}\r\nfunction curryGetDefaultMiddleware() {\r\n return function curriedGetDefaultMiddleware(options) {\r\n return getDefaultMiddleware(options);\r\n };\r\n}\r\nfunction getDefaultMiddleware(options) {\r\n if (options === void 0) { options = {}; }\r\n var _c = options.thunk, thunk = _c === void 0 ? true : _c, _d = options.immutableCheck, immutableCheck = _d === void 0 ? true : _d, _e = options.serializableCheck, serializableCheck = _e === void 0 ? true : _e;\r\n var middlewareArray = new MiddlewareArray();\r\n if (thunk) {\r\n if (isBoolean(thunk)) {\r\n middlewareArray.push(thunkMiddleware);\r\n }\r\n else {\r\n middlewareArray.push(thunkMiddleware.withExtraArgument(thunk.extraArgument));\r\n }\r\n }\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (immutableCheck) {\r\n var immutableOptions = {};\r\n if (!isBoolean(immutableCheck)) {\r\n immutableOptions = immutableCheck;\r\n }\r\n middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));\r\n }\r\n if (serializableCheck) {\r\n var serializableOptions = {};\r\n if (!isBoolean(serializableCheck)) {\r\n serializableOptions = serializableCheck;\r\n }\r\n middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));\r\n }\r\n }\r\n return middlewareArray;\r\n}\r\n// src/configureStore.ts\r\nvar IS_PRODUCTION = process.env.NODE_ENV === \"production\";\r\nfunction configureStore(options) {\r\n var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();\r\n var _c = options || {}, _d = _c.reducer, reducer = _d === void 0 ? void 0 : _d, _e = _c.middleware, middleware = _e === void 0 ? curriedGetDefaultMiddleware() : _e, _f = _c.devTools, devTools = _f === void 0 ? true : _f, _g = _c.preloadedState, preloadedState = _g === void 0 ? void 0 : _g, _h = _c.enhancers, enhancers = _h === void 0 ? void 0 : _h;\r\n var rootReducer;\r\n if (typeof reducer === \"function\") {\r\n rootReducer = reducer;\r\n }\r\n else if (isPlainObject(reducer)) {\r\n rootReducer = combineReducers(reducer);\r\n }\r\n else {\r\n throw new Error('\"reducer\" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');\r\n }\r\n var finalMiddleware = middleware;\r\n if (typeof finalMiddleware === \"function\") {\r\n finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);\r\n if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {\r\n throw new Error(\"when using a middleware builder function, an array of middleware must be returned\");\r\n }\r\n }\r\n if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== \"function\"; })) {\r\n throw new Error(\"each middleware provided to configureStore must be a function\");\r\n }\r\n var middlewareEnhancer = applyMiddleware.apply(void 0, finalMiddleware);\r\n var finalCompose = compose2;\r\n if (devTools) {\r\n finalCompose = composeWithDevTools(__spreadValues({\r\n trace: !IS_PRODUCTION\r\n }, typeof devTools === \"object\" && devTools));\r\n }\r\n var storeEnhancers = [middlewareEnhancer];\r\n if (Array.isArray(enhancers)) {\r\n storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);\r\n }\r\n else if (typeof enhancers === \"function\") {\r\n storeEnhancers = enhancers(storeEnhancers);\r\n }\r\n var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);\r\n return createStore(rootReducer, preloadedState, composedEnhancer);\r\n}\r\n// src/createAction.ts\r\nfunction createAction(type, prepareAction) {\r\n function actionCreator() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n if (prepareAction) {\r\n var prepared = prepareAction.apply(void 0, args);\r\n if (!prepared) {\r\n throw new Error(\"prepareAction did not return an object\");\r\n }\r\n return __spreadValues(__spreadValues({\r\n type: type,\r\n payload: prepared.payload\r\n }, \"meta\" in prepared && { meta: prepared.meta }), \"error\" in prepared && { error: prepared.error });\r\n }\r\n return { type: type, payload: args[0] };\r\n }\r\n actionCreator.toString = function () { return \"\" + type; };\r\n actionCreator.type = type;\r\n actionCreator.match = function (action) { return action.type === type; };\r\n return actionCreator;\r\n}\r\nfunction isFSA(action) {\r\n return isPlainObject(action) && typeof action.type === \"string\" && Object.keys(action).every(isValidKey);\r\n}\r\nfunction isValidKey(key) {\r\n return [\"type\", \"payload\", \"error\", \"meta\"].indexOf(key) > -1;\r\n}\r\nfunction getType(actionCreator) {\r\n return \"\" + actionCreator;\r\n}\r\n// src/createReducer.ts\r\nimport createNextState, { isDraft as isDraft2, isDraftable } from \"immer\";\r\n// src/mapBuilders.ts\r\nfunction executeReducerBuilderCallback(builderCallback) {\r\n var actionsMap = {};\r\n var actionMatchers = [];\r\n var defaultCaseReducer;\r\n var builder = {\r\n addCase: function (typeOrActionCreator, reducer) {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (actionMatchers.length > 0) {\r\n throw new Error(\"`builder.addCase` should only be called before calling `builder.addMatcher`\");\r\n }\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addCase` should only be called before calling `builder.addDefaultCase`\");\r\n }\r\n }\r\n var type = typeof typeOrActionCreator === \"string\" ? typeOrActionCreator : typeOrActionCreator.type;\r\n if (type in actionsMap) {\r\n throw new Error(\"addCase cannot be called with two reducers for the same action type\");\r\n }\r\n actionsMap[type] = reducer;\r\n return builder;\r\n },\r\n addMatcher: function (matcher, reducer) {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`\");\r\n }\r\n }\r\n actionMatchers.push({ matcher: matcher, reducer: reducer });\r\n return builder;\r\n },\r\n addDefaultCase: function (reducer) {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (defaultCaseReducer) {\r\n throw new Error(\"`builder.addDefaultCase` can only be called once\");\r\n }\r\n }\r\n defaultCaseReducer = reducer;\r\n return builder;\r\n }\r\n };\r\n builderCallback(builder);\r\n return [actionsMap, actionMatchers, defaultCaseReducer];\r\n}\r\n// src/createReducer.ts\r\nfunction isStateFunction(x) {\r\n return typeof x === \"function\";\r\n}\r\nfunction createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {\r\n if (actionMatchers === void 0) { actionMatchers = []; }\r\n var _c = typeof mapOrBuilderCallback === \"function\" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2];\r\n var getInitialState;\r\n if (isStateFunction(initialState)) {\r\n getInitialState = function () { return createNextState(initialState(), function () {\r\n }); };\r\n }\r\n else {\r\n var frozenInitialState_1 = createNextState(initialState, function () {\r\n });\r\n getInitialState = function () { return frozenInitialState_1; };\r\n }\r\n function reducer(state, action) {\r\n if (state === void 0) { state = getInitialState(); }\r\n var caseReducers = __spreadArray([\r\n actionsMap[action.type]\r\n ], finalActionMatchers.filter(function (_c) {\r\n var matcher = _c.matcher;\r\n return matcher(action);\r\n }).map(function (_c) {\r\n var reducer2 = _c.reducer;\r\n return reducer2;\r\n }));\r\n if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {\r\n caseReducers = [finalDefaultCaseReducer];\r\n }\r\n return caseReducers.reduce(function (previousState, caseReducer) {\r\n if (caseReducer) {\r\n if (isDraft2(previousState)) {\r\n var draft = previousState;\r\n var result = caseReducer(draft, action);\r\n if (typeof result === \"undefined\") {\r\n return previousState;\r\n }\r\n return result;\r\n }\r\n else if (!isDraftable(previousState)) {\r\n var result = caseReducer(previousState, action);\r\n if (typeof result === \"undefined\") {\r\n if (previousState === null) {\r\n return previousState;\r\n }\r\n throw Error(\"A case reducer on a non-draftable value must not return undefined\");\r\n }\r\n return result;\r\n }\r\n else {\r\n return createNextState(previousState, function (draft) {\r\n return caseReducer(draft, action);\r\n });\r\n }\r\n }\r\n return previousState;\r\n }, state);\r\n }\r\n reducer.getInitialState = getInitialState;\r\n return reducer;\r\n}\r\n// src/createSlice.ts\r\nfunction getType2(slice, actionKey) {\r\n return slice + \"/\" + actionKey;\r\n}\r\nfunction createSlice(options) {\r\n var name = options.name;\r\n if (!name) {\r\n throw new Error(\"`name` is a required option for createSlice\");\r\n }\r\n var initialState = typeof options.initialState == \"function\" ? options.initialState : default2(options.initialState, function () {\r\n });\r\n var reducers = options.reducers || {};\r\n var reducerNames = Object.keys(reducers);\r\n var sliceCaseReducersByName = {};\r\n var sliceCaseReducersByType = {};\r\n var actionCreators = {};\r\n reducerNames.forEach(function (reducerName) {\r\n var maybeReducerWithPrepare = reducers[reducerName];\r\n var type = getType2(name, reducerName);\r\n var caseReducer;\r\n var prepareCallback;\r\n if (\"reducer\" in maybeReducerWithPrepare) {\r\n caseReducer = maybeReducerWithPrepare.reducer;\r\n prepareCallback = maybeReducerWithPrepare.prepare;\r\n }\r\n else {\r\n caseReducer = maybeReducerWithPrepare;\r\n }\r\n sliceCaseReducersByName[reducerName] = caseReducer;\r\n sliceCaseReducersByType[type] = caseReducer;\r\n actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);\r\n });\r\n function buildReducer() {\r\n var _c = typeof options.extraReducers === \"function\" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers], _d = _c[0], extraReducers = _d === void 0 ? {} : _d, _e = _c[1], actionMatchers = _e === void 0 ? [] : _e, _f = _c[2], defaultCaseReducer = _f === void 0 ? void 0 : _f;\r\n var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);\r\n return createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer);\r\n }\r\n var _reducer;\r\n return {\r\n name: name,\r\n reducer: function (state, action) {\r\n if (!_reducer)\r\n _reducer = buildReducer();\r\n return _reducer(state, action);\r\n },\r\n actions: actionCreators,\r\n caseReducers: sliceCaseReducersByName,\r\n getInitialState: function () {\r\n if (!_reducer)\r\n _reducer = buildReducer();\r\n return _reducer.getInitialState();\r\n }\r\n };\r\n}\r\n// src/entities/entity_state.ts\r\nfunction getInitialEntityState() {\r\n return {\r\n ids: [],\r\n entities: {}\r\n };\r\n}\r\nfunction createInitialStateFactory() {\r\n function getInitialState(additionalState) {\r\n if (additionalState === void 0) { additionalState = {}; }\r\n return Object.assign(getInitialEntityState(), additionalState);\r\n }\r\n return { getInitialState: getInitialState };\r\n}\r\n// src/entities/state_selectors.ts\r\nfunction createSelectorsFactory() {\r\n function getSelectors(selectState) {\r\n var selectIds = function (state) { return state.ids; };\r\n var selectEntities = function (state) { return state.entities; };\r\n var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });\r\n var selectId = function (_, id) { return id; };\r\n var selectById = function (entities, id) { return entities[id]; };\r\n var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });\r\n if (!selectState) {\r\n return {\r\n selectIds: selectIds,\r\n selectEntities: selectEntities,\r\n selectAll: selectAll,\r\n selectTotal: selectTotal,\r\n selectById: createDraftSafeSelector(selectEntities, selectId, selectById)\r\n };\r\n }\r\n var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);\r\n return {\r\n selectIds: createDraftSafeSelector(selectState, selectIds),\r\n selectEntities: selectGlobalizedEntities,\r\n selectAll: createDraftSafeSelector(selectState, selectAll),\r\n selectTotal: createDraftSafeSelector(selectState, selectTotal),\r\n selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)\r\n };\r\n }\r\n return { getSelectors: getSelectors };\r\n}\r\n// src/entities/state_adapter.ts\r\nimport createNextState2, { isDraft as isDraft3 } from \"immer\";\r\nfunction createSingleArgumentStateOperator(mutator) {\r\n var operator = createStateOperator(function (_, state) { return mutator(state); });\r\n return function operation(state) {\r\n return operator(state, void 0);\r\n };\r\n}\r\nfunction createStateOperator(mutator) {\r\n return function operation(state, arg) {\r\n function isPayloadActionArgument(arg2) {\r\n return isFSA(arg2);\r\n }\r\n var runMutator = function (draft) {\r\n if (isPayloadActionArgument(arg)) {\r\n mutator(arg.payload, draft);\r\n }\r\n else {\r\n mutator(arg, draft);\r\n }\r\n };\r\n if (isDraft3(state)) {\r\n runMutator(state);\r\n return state;\r\n }\r\n else {\r\n return createNextState2(state, runMutator);\r\n }\r\n };\r\n}\r\n// src/entities/utils.ts\r\nfunction selectIdValue(entity, selectId) {\r\n var key = selectId(entity);\r\n if (process.env.NODE_ENV !== \"production\" && key === void 0) {\r\n console.warn(\"The entity passed to the `selectId` implementation returned undefined.\", \"You should probably provide your own `selectId` implementation.\", \"The entity that was passed:\", entity, \"The `selectId` implementation:\", selectId.toString());\r\n }\r\n return key;\r\n}\r\nfunction ensureEntitiesArray(entities) {\r\n if (!Array.isArray(entities)) {\r\n entities = Object.values(entities);\r\n }\r\n return entities;\r\n}\r\nfunction splitAddedUpdatedEntities(newEntities, selectId, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n var added = [];\r\n var updated = [];\r\n for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) {\r\n var entity = newEntities_1[_i];\r\n var id = selectIdValue(entity, selectId);\r\n if (id in state.entities) {\r\n updated.push({ id: id, changes: entity });\r\n }\r\n else {\r\n added.push(entity);\r\n }\r\n }\r\n return [added, updated];\r\n}\r\n// src/entities/unsorted_state_adapter.ts\r\nfunction createUnsortedStateAdapter(selectId) {\r\n function addOneMutably(entity, state) {\r\n var key = selectIdValue(entity, selectId);\r\n if (key in state.entities) {\r\n return;\r\n }\r\n state.ids.push(key);\r\n state.entities[key] = entity;\r\n }\r\n function addManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) {\r\n var entity = newEntities_2[_i];\r\n addOneMutably(entity, state);\r\n }\r\n }\r\n function setOneMutably(entity, state) {\r\n var key = selectIdValue(entity, selectId);\r\n if (!(key in state.entities)) {\r\n state.ids.push(key);\r\n }\r\n state.entities[key] = entity;\r\n }\r\n function setManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) {\r\n var entity = newEntities_3[_i];\r\n setOneMutably(entity, state);\r\n }\r\n }\r\n function setAllMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n state.ids = [];\r\n state.entities = {};\r\n addManyMutably(newEntities, state);\r\n }\r\n function removeOneMutably(key, state) {\r\n return removeManyMutably([key], state);\r\n }\r\n function removeManyMutably(keys, state) {\r\n var didMutate = false;\r\n keys.forEach(function (key) {\r\n if (key in state.entities) {\r\n delete state.entities[key];\r\n didMutate = true;\r\n }\r\n });\r\n if (didMutate) {\r\n state.ids = state.ids.filter(function (id) { return id in state.entities; });\r\n }\r\n }\r\n function removeAllMutably(state) {\r\n Object.assign(state, {\r\n ids: [],\r\n entities: {}\r\n });\r\n }\r\n function takeNewKey(keys, update, state) {\r\n var original2 = state.entities[update.id];\r\n var updated = Object.assign({}, original2, update.changes);\r\n var newKey = selectIdValue(updated, selectId);\r\n var hasNewKey = newKey !== update.id;\r\n if (hasNewKey) {\r\n keys[update.id] = newKey;\r\n delete state.entities[update.id];\r\n }\r\n state.entities[newKey] = updated;\r\n return hasNewKey;\r\n }\r\n function updateOneMutably(update, state) {\r\n return updateManyMutably([update], state);\r\n }\r\n function updateManyMutably(updates, state) {\r\n var newKeys = {};\r\n var updatesPerEntity = {};\r\n updates.forEach(function (update) {\r\n if (update.id in state.entities) {\r\n updatesPerEntity[update.id] = {\r\n id: update.id,\r\n changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)\r\n };\r\n }\r\n });\r\n updates = Object.values(updatesPerEntity);\r\n var didMutateEntities = updates.length > 0;\r\n if (didMutateEntities) {\r\n var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;\r\n if (didMutateIds) {\r\n state.ids = state.ids.map(function (id) { return newKeys[id] || id; });\r\n }\r\n }\r\n }\r\n function upsertOneMutably(entity, state) {\r\n return upsertManyMutably([entity], state);\r\n }\r\n function upsertManyMutably(newEntities, state) {\r\n var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];\r\n updateManyMutably(updated, state);\r\n addManyMutably(added, state);\r\n }\r\n return {\r\n removeAll: createSingleArgumentStateOperator(removeAllMutably),\r\n addOne: createStateOperator(addOneMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n upsertMany: createStateOperator(upsertManyMutably),\r\n removeOne: createStateOperator(removeOneMutably),\r\n removeMany: createStateOperator(removeManyMutably)\r\n };\r\n}\r\n// src/entities/sorted_state_adapter.ts\r\nfunction createSortedStateAdapter(selectId, sort) {\r\n var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll;\r\n function addOneMutably(entity, state) {\r\n return addManyMutably([entity], state);\r\n }\r\n function addManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });\r\n if (models.length !== 0) {\r\n merge(models, state);\r\n }\r\n }\r\n function setOneMutably(entity, state) {\r\n return setManyMutably([entity], state);\r\n }\r\n function setManyMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n if (newEntities.length !== 0) {\r\n merge(newEntities, state);\r\n }\r\n }\r\n function setAllMutably(newEntities, state) {\r\n newEntities = ensureEntitiesArray(newEntities);\r\n state.entities = {};\r\n state.ids = [];\r\n addManyMutably(newEntities, state);\r\n }\r\n function updateOneMutably(update, state) {\r\n return updateManyMutably([update], state);\r\n }\r\n function takeUpdatedModel(models, update, state) {\r\n if (!(update.id in state.entities)) {\r\n return false;\r\n }\r\n var original2 = state.entities[update.id];\r\n var updated = Object.assign({}, original2, update.changes);\r\n var newKey = selectIdValue(updated, selectId);\r\n delete state.entities[update.id];\r\n models.push(updated);\r\n return newKey !== update.id;\r\n }\r\n function updateManyMutably(updates, state) {\r\n var models = [];\r\n updates.forEach(function (update) { return takeUpdatedModel(models, update, state); });\r\n if (models.length !== 0) {\r\n merge(models, state);\r\n }\r\n }\r\n function upsertOneMutably(entity, state) {\r\n return upsertManyMutably([entity], state);\r\n }\r\n function upsertManyMutably(newEntities, state) {\r\n var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];\r\n updateManyMutably(updated, state);\r\n addManyMutably(added, state);\r\n }\r\n function areArraysEqual(a, b) {\r\n if (a.length !== b.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < a.length && i < b.length; i++) {\r\n if (a[i] === b[i]) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n function merge(models, state) {\r\n models.forEach(function (model) {\r\n state.entities[selectId(model)] = model;\r\n });\r\n var allEntities = Object.values(state.entities);\r\n allEntities.sort(sort);\r\n var newSortedIds = allEntities.map(selectId);\r\n var ids = state.ids;\r\n if (!areArraysEqual(ids, newSortedIds)) {\r\n state.ids = newSortedIds;\r\n }\r\n }\r\n return {\r\n removeOne: removeOne,\r\n removeMany: removeMany,\r\n removeAll: removeAll,\r\n addOne: createStateOperator(addOneMutably),\r\n updateOne: createStateOperator(updateOneMutably),\r\n upsertOne: createStateOperator(upsertOneMutably),\r\n setOne: createStateOperator(setOneMutably),\r\n setMany: createStateOperator(setManyMutably),\r\n setAll: createStateOperator(setAllMutably),\r\n addMany: createStateOperator(addManyMutably),\r\n updateMany: createStateOperator(updateManyMutably),\r\n upsertMany: createStateOperator(upsertManyMutably)\r\n };\r\n}\r\n// src/entities/create_adapter.ts\r\nfunction createEntityAdapter(options) {\r\n if (options === void 0) { options = {}; }\r\n var _c = __spreadValues({\r\n sortComparer: false,\r\n selectId: function (instance) { return instance.id; }\r\n }, options), selectId = _c.selectId, sortComparer = _c.sortComparer;\r\n var stateFactory = createInitialStateFactory();\r\n var selectorsFactory = createSelectorsFactory();\r\n var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);\r\n return __spreadValues(__spreadValues(__spreadValues({\r\n selectId: selectId,\r\n sortComparer: sortComparer\r\n }, stateFactory), selectorsFactory), stateAdapter);\r\n}\r\n// src/nanoid.ts\r\nvar urlAlphabet = \"ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW\";\r\nvar nanoid = function (size) {\r\n if (size === void 0) { size = 21; }\r\n var id = \"\";\r\n var i = size;\r\n while (i--) {\r\n id += urlAlphabet[Math.random() * 64 | 0];\r\n }\r\n return id;\r\n};\r\n// src/createAsyncThunk.ts\r\nvar commonProperties = [\r\n \"name\",\r\n \"message\",\r\n \"stack\",\r\n \"code\"\r\n];\r\nvar RejectWithValue = /** @class */ (function () {\r\n function RejectWithValue(payload, meta) {\r\n this.payload = payload;\r\n this.meta = meta;\r\n }\r\n return RejectWithValue;\r\n}());\r\nvar FulfillWithMeta = /** @class */ (function () {\r\n function FulfillWithMeta(payload, meta) {\r\n this.payload = payload;\r\n this.meta = meta;\r\n }\r\n return FulfillWithMeta;\r\n}());\r\nvar miniSerializeError = function (value) {\r\n if (typeof value === \"object\" && value !== null) {\r\n var simpleError = {};\r\n for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) {\r\n var property = commonProperties_1[_i];\r\n if (typeof value[property] === \"string\") {\r\n simpleError[property] = value[property];\r\n }\r\n }\r\n return simpleError;\r\n }\r\n return { message: String(value) };\r\n};\r\nfunction createAsyncThunk(typePrefix, payloadCreator, options) {\r\n var fulfilled = createAction(typePrefix + \"/fulfilled\", function (payload, requestId, arg, meta) { return ({\r\n payload: payload,\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n requestStatus: \"fulfilled\"\r\n })\r\n }); });\r\n var pending = createAction(typePrefix + \"/pending\", function (requestId, arg, meta) { return ({\r\n payload: void 0,\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n requestStatus: \"pending\"\r\n })\r\n }); });\r\n var rejected = createAction(typePrefix + \"/rejected\", function (error, requestId, arg, payload, meta) { return ({\r\n payload: payload,\r\n error: (options && options.serializeError || miniSerializeError)(error || \"Rejected\"),\r\n meta: __spreadProps(__spreadValues({}, meta || {}), {\r\n arg: arg,\r\n requestId: requestId,\r\n rejectedWithValue: !!payload,\r\n requestStatus: \"rejected\",\r\n aborted: (error == null ? void 0 : error.name) === \"AbortError\",\r\n condition: (error == null ? void 0 : error.name) === \"ConditionError\"\r\n })\r\n }); });\r\n var displayedWarning = false;\r\n var AC = typeof AbortController !== \"undefined\" ? AbortController : /** @class */ (function () {\r\n function class_1() {\r\n this.signal = {\r\n aborted: false,\r\n addEventListener: function () {\r\n },\r\n dispatchEvent: function () {\r\n return false;\r\n },\r\n onabort: function () {\r\n },\r\n removeEventListener: function () {\r\n }\r\n };\r\n }\r\n class_1.prototype.abort = function () {\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (!displayedWarning) {\r\n displayedWarning = true;\r\n console.info(\"This platform does not implement AbortController. \\nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.\");\r\n }\r\n }\r\n };\r\n return class_1;\r\n }());\r\n function actionCreator(arg) {\r\n return function (dispatch, getState, extra) {\r\n var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid();\r\n var abortController = new AC();\r\n var abortReason;\r\n var abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener(\"abort\", function () { return reject({ name: \"AbortError\", message: abortReason || \"Aborted\" }); }); });\r\n var started = false;\r\n function abort(reason) {\r\n if (started) {\r\n abortReason = reason;\r\n abortController.abort();\r\n }\r\n }\r\n var promise = function () {\r\n return __async(this, null, function () {\r\n var _a, _b, finalAction, conditionResult, err_1, skipDispatch;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n _c.trys.push([0, 4, , 5]);\r\n conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra });\r\n if (!isThenable(conditionResult)) return [3 /*break*/, 2];\r\n return [4 /*yield*/, conditionResult];\r\n case 1:\r\n conditionResult = _c.sent();\r\n _c.label = 2;\r\n case 2:\r\n if (conditionResult === false) {\r\n throw {\r\n name: \"ConditionError\",\r\n message: \"Aborted due to condition callback returning false.\"\r\n };\r\n }\r\n started = true;\r\n dispatch(pending(requestId, arg, (_b = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _b.call(options, { requestId: requestId, arg: arg }, { getState: getState, extra: extra })));\r\n return [4 /*yield*/, Promise.race([\r\n abortedPromise,\r\n Promise.resolve(payloadCreator(arg, {\r\n dispatch: dispatch,\r\n getState: getState,\r\n extra: extra,\r\n requestId: requestId,\r\n signal: abortController.signal,\r\n rejectWithValue: function (value, meta) {\r\n return new RejectWithValue(value, meta);\r\n },\r\n fulfillWithValue: function (value, meta) {\r\n return new FulfillWithMeta(value, meta);\r\n }\r\n })).then(function (result) {\r\n if (result instanceof RejectWithValue) {\r\n throw result;\r\n }\r\n if (result instanceof FulfillWithMeta) {\r\n return fulfilled(result.payload, requestId, arg, result.meta);\r\n }\r\n return fulfilled(result, requestId, arg);\r\n })\r\n ])];\r\n case 3:\r\n finalAction = _c.sent();\r\n return [3 /*break*/, 5];\r\n case 4:\r\n err_1 = _c.sent();\r\n finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);\r\n return [3 /*break*/, 5];\r\n case 5:\r\n skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;\r\n if (!skipDispatch) {\r\n dispatch(finalAction);\r\n }\r\n return [2 /*return*/, finalAction];\r\n }\r\n });\r\n });\r\n }();\r\n return Object.assign(promise, {\r\n abort: abort,\r\n requestId: requestId,\r\n arg: arg,\r\n unwrap: function () {\r\n return promise.then(unwrapResult);\r\n }\r\n });\r\n };\r\n }\r\n return Object.assign(actionCreator, {\r\n pending: pending,\r\n rejected: rejected,\r\n fulfilled: fulfilled,\r\n typePrefix: typePrefix\r\n });\r\n}\r\nfunction unwrapResult(action) {\r\n if (action.meta && action.meta.rejectedWithValue) {\r\n throw action.payload;\r\n }\r\n if (action.error) {\r\n throw action.error;\r\n }\r\n return action.payload;\r\n}\r\nfunction isThenable(value) {\r\n return value !== null && typeof value === \"object\" && typeof value.then === \"function\";\r\n}\r\n// src/tsHelpers.ts\r\nvar hasMatchFunction = function (v) {\r\n return v && typeof v.match === \"function\";\r\n};\r\n// src/matchers.ts\r\nvar matches = function (matcher, action) {\r\n if (hasMatchFunction(matcher)) {\r\n return matcher.match(action);\r\n }\r\n else {\r\n return matcher(action);\r\n }\r\n};\r\nfunction isAnyOf() {\r\n var matchers = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n matchers[_i] = arguments[_i];\r\n }\r\n return function (action) {\r\n return matchers.some(function (matcher) { return matches(matcher, action); });\r\n };\r\n}\r\nfunction isAllOf() {\r\n var matchers = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n matchers[_i] = arguments[_i];\r\n }\r\n return function (action) {\r\n return matchers.every(function (matcher) { return matches(matcher, action); });\r\n };\r\n}\r\nfunction hasExpectedRequestMetadata(action, validStatus) {\r\n if (!action || !action.meta)\r\n return false;\r\n var hasValidRequestId = typeof action.meta.requestId === \"string\";\r\n var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;\r\n return hasValidRequestId && hasValidRequestStatus;\r\n}\r\nfunction isAsyncThunkArray(a) {\r\n return typeof a[0] === \"function\" && \"pending\" in a[0] && \"fulfilled\" in a[0] && \"rejected\" in a[0];\r\n}\r\nfunction isPending() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"pending\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isPending()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isRejected() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"rejected\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejected()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isRejectedWithValue() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n var hasFlag = function (action) {\r\n return action && action.meta && action.meta.rejectedWithValue;\r\n };\r\n if (asyncThunks.length === 0) {\r\n return function (action) {\r\n var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);\r\n return combinedMatcher(action);\r\n };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isRejectedWithValue()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isFulfilled() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"fulfilled\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isFulfilled()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\nfunction isAsyncThunkAction() {\r\n var asyncThunks = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n asyncThunks[_i] = arguments[_i];\r\n }\r\n if (asyncThunks.length === 0) {\r\n return function (action) { return hasExpectedRequestMetadata(action, [\"pending\", \"fulfilled\", \"rejected\"]); };\r\n }\r\n if (!isAsyncThunkArray(asyncThunks)) {\r\n return isAsyncThunkAction()(asyncThunks[0]);\r\n }\r\n return function (action) {\r\n var matchers = [];\r\n for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) {\r\n var asyncThunk = asyncThunks_1[_i];\r\n matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);\r\n }\r\n var combinedMatcher = isAnyOf.apply(void 0, matchers);\r\n return combinedMatcher(action);\r\n };\r\n}\r\n// src/listenerMiddleware/utils.ts\r\nvar assertFunction = function (func, expected) {\r\n if (typeof func !== \"function\") {\r\n throw new TypeError(expected + \" is not a function\");\r\n }\r\n};\r\nvar noop = function () {\r\n};\r\nvar catchRejection = function (promise, onError) {\r\n if (onError === void 0) { onError = noop; }\r\n promise.catch(onError);\r\n return promise;\r\n};\r\nvar addAbortSignalListener = function (abortSignal, callback) {\r\n abortSignal.addEventListener(\"abort\", callback, { once: true });\r\n};\r\nvar abortControllerWithReason = function (abortController, reason) {\r\n var signal = abortController.signal;\r\n if (signal.aborted) {\r\n return;\r\n }\r\n if (!(\"reason\" in signal)) {\r\n Object.defineProperty(signal, \"reason\", {\r\n enumerable: true,\r\n value: reason,\r\n configurable: true,\r\n writable: true\r\n });\r\n }\r\n ;\r\n abortController.abort(reason);\r\n};\r\n// src/listenerMiddleware/exceptions.ts\r\nvar task = \"task\";\r\nvar listener = \"listener\";\r\nvar completed = \"completed\";\r\nvar cancelled = \"cancelled\";\r\nvar taskCancelled = \"task-\" + cancelled;\r\nvar taskCompleted = \"task-\" + completed;\r\nvar listenerCancelled = listener + \"-\" + cancelled;\r\nvar listenerCompleted = listener + \"-\" + completed;\r\nvar TaskAbortError = /** @class */ (function () {\r\n function TaskAbortError(code) {\r\n this.code = code;\r\n this.name = \"TaskAbortError\";\r\n this.message = task + \" \" + cancelled + \" (reason: \" + code + \")\";\r\n }\r\n return TaskAbortError;\r\n}());\r\n// src/listenerMiddleware/task.ts\r\nvar validateActive = function (signal) {\r\n if (signal.aborted) {\r\n throw new TaskAbortError(signal.reason);\r\n }\r\n};\r\nvar promisifyAbortSignal = function (signal) {\r\n return catchRejection(new Promise(function (_, reject) {\r\n var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); };\r\n if (signal.aborted) {\r\n notifyRejection();\r\n }\r\n else {\r\n addAbortSignalListener(signal, notifyRejection);\r\n }\r\n }));\r\n};\r\nvar runTask = function (task2, cleanUp) { return __async(void 0, null, function () {\r\n var value, error_1;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n _c.trys.push([0, 3, 4, 5]);\r\n return [4 /*yield*/, Promise.resolve()];\r\n case 1:\r\n _c.sent();\r\n return [4 /*yield*/, task2()];\r\n case 2:\r\n value = _c.sent();\r\n return [2 /*return*/, {\r\n status: \"ok\",\r\n value: value\r\n }];\r\n case 3:\r\n error_1 = _c.sent();\r\n return [2 /*return*/, {\r\n status: error_1 instanceof TaskAbortError ? \"cancelled\" : \"rejected\",\r\n error: error_1\r\n }];\r\n case 4:\r\n cleanUp == null ? void 0 : cleanUp();\r\n return [7 /*endfinally*/];\r\n case 5: return [2 /*return*/];\r\n }\r\n });\r\n}); };\r\nvar createPause = function (signal) {\r\n return function (promise) {\r\n return catchRejection(Promise.race([promisifyAbortSignal(signal), promise]).then(function (output) {\r\n validateActive(signal);\r\n return output;\r\n }));\r\n };\r\n};\r\nvar createDelay = function (signal) {\r\n var pause = createPause(signal);\r\n return function (timeoutMs) {\r\n return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); }));\r\n };\r\n};\r\n// src/listenerMiddleware/index.ts\r\nvar assign = Object.assign;\r\nvar INTERNAL_NIL_TOKEN = {};\r\nvar alm = \"listenerMiddleware\";\r\nvar createFork = function (parentAbortSignal) {\r\n var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); };\r\n return function (taskExecutor) {\r\n assertFunction(taskExecutor, \"taskExecutor\");\r\n var childAbortController = new AbortController();\r\n linkControllers(childAbortController);\r\n var result = runTask(function () { return __async(void 0, null, function () {\r\n var result2;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n validateActive(parentAbortSignal);\r\n validateActive(childAbortController.signal);\r\n return [4 /*yield*/, taskExecutor({\r\n pause: createPause(childAbortController.signal),\r\n delay: createDelay(childAbortController.signal),\r\n signal: childAbortController.signal\r\n })];\r\n case 1:\r\n result2 = _c.sent();\r\n validateActive(childAbortController.signal);\r\n return [2 /*return*/, result2];\r\n }\r\n });\r\n }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); });\r\n return {\r\n result: createPause(parentAbortSignal)(result),\r\n cancel: function () {\r\n abortControllerWithReason(childAbortController, taskCancelled);\r\n }\r\n };\r\n };\r\n};\r\nvar createTakePattern = function (startListening, signal) {\r\n var take = function (predicate, timeout) { return __async(void 0, null, function () {\r\n var unsubscribe, tuplePromise, promises, output;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n validateActive(signal);\r\n unsubscribe = function () {\r\n };\r\n tuplePromise = new Promise(function (resolve) {\r\n unsubscribe = startListening({\r\n predicate: predicate,\r\n effect: function (action, listenerApi) {\r\n listenerApi.unsubscribe();\r\n resolve([\r\n action,\r\n listenerApi.getState(),\r\n listenerApi.getOriginalState()\r\n ]);\r\n }\r\n });\r\n });\r\n promises = [\r\n promisifyAbortSignal(signal),\r\n tuplePromise\r\n ];\r\n if (timeout != null) {\r\n promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); }));\r\n }\r\n _c.label = 1;\r\n case 1:\r\n _c.trys.push([1, , 3, 4]);\r\n return [4 /*yield*/, Promise.race(promises)];\r\n case 2:\r\n output = _c.sent();\r\n validateActive(signal);\r\n return [2 /*return*/, output];\r\n case 3:\r\n unsubscribe();\r\n return [7 /*endfinally*/];\r\n case 4: return [2 /*return*/];\r\n }\r\n });\r\n }); };\r\n return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); };\r\n};\r\nvar getListenerEntryPropsFrom = function (options) {\r\n var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect;\r\n if (type) {\r\n predicate = createAction(type).match;\r\n }\r\n else if (actionCreator) {\r\n type = actionCreator.type;\r\n predicate = actionCreator.match;\r\n }\r\n else if (matcher) {\r\n predicate = matcher;\r\n }\r\n else if (predicate) {\r\n }\r\n else {\r\n throw new Error(\"Creating or removing a listener requires one of the known fields for matching an action\");\r\n }\r\n assertFunction(effect, \"options.listener\");\r\n return { predicate: predicate, type: type, effect: effect };\r\n};\r\nvar createListenerEntry = function (options) {\r\n var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect;\r\n var id = nanoid();\r\n var entry = {\r\n id: id,\r\n effect: effect,\r\n type: type,\r\n predicate: predicate,\r\n pending: new Set(),\r\n unsubscribe: function () {\r\n throw new Error(\"Unsubscribe not initialized\");\r\n }\r\n };\r\n return entry;\r\n};\r\nvar createClearListenerMiddleware = function (listenerMap) {\r\n return function () {\r\n listenerMap.forEach(cancelActiveListeners);\r\n listenerMap.clear();\r\n };\r\n};\r\nvar safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) {\r\n try {\r\n errorHandler(errorToNotify, errorInfo);\r\n }\r\n catch (errorHandlerError) {\r\n setTimeout(function () {\r\n throw errorHandlerError;\r\n }, 0);\r\n }\r\n};\r\nvar addListener = createAction(alm + \"/add\");\r\nvar clearAllListeners = createAction(alm + \"/removeAll\");\r\nvar removeListener = createAction(alm + \"/remove\");\r\nvar defaultErrorHandler = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n console.error.apply(console, __spreadArray([alm + \"/error\"], args));\r\n};\r\nvar cancelActiveListeners = function (entry) {\r\n entry.pending.forEach(function (controller) {\r\n abortControllerWithReason(controller, listenerCancelled);\r\n });\r\n};\r\nfunction createListenerMiddleware(middlewareOptions) {\r\n var _this = this;\r\n if (middlewareOptions === void 0) { middlewareOptions = {}; }\r\n var listenerMap = new Map();\r\n var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c;\r\n assertFunction(onError, \"onError\");\r\n var insertEntry = function (entry) {\r\n entry.unsubscribe = function () { return listenerMap.delete(entry.id); };\r\n listenerMap.set(entry.id, entry);\r\n return function (cancelOptions) {\r\n entry.unsubscribe();\r\n if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) {\r\n cancelActiveListeners(entry);\r\n }\r\n };\r\n };\r\n var findListenerEntry = function (comparator) {\r\n for (var _i = 0, _c = listenerMap.values(); _i < _c.length; _i++) {\r\n var entry = _c[_i];\r\n if (comparator(entry)) {\r\n return entry;\r\n }\r\n }\r\n return void 0;\r\n };\r\n var startListening = function (options) {\r\n var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; });\r\n if (!entry) {\r\n entry = createListenerEntry(options);\r\n }\r\n return insertEntry(entry);\r\n };\r\n var stopListening = function (options) {\r\n var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate;\r\n var entry = findListenerEntry(function (entry2) {\r\n var matchPredicateOrType = typeof type === \"string\" ? entry2.type === type : entry2.predicate === predicate;\r\n return matchPredicateOrType && entry2.effect === effect;\r\n });\r\n if (entry) {\r\n entry.unsubscribe();\r\n if (options.cancelActive) {\r\n cancelActiveListeners(entry);\r\n }\r\n }\r\n return !!entry;\r\n };\r\n var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () {\r\n var internalTaskController, take, listenerError_1;\r\n return __generator(this, function (_c) {\r\n switch (_c.label) {\r\n case 0:\r\n internalTaskController = new AbortController();\r\n take = createTakePattern(startListening, internalTaskController.signal);\r\n _c.label = 1;\r\n case 1:\r\n _c.trys.push([1, 3, 4, 5]);\r\n entry.pending.add(internalTaskController);\r\n return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, {\r\n getOriginalState: getOriginalState,\r\n condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); },\r\n take: take,\r\n delay: createDelay(internalTaskController.signal),\r\n pause: createPause(internalTaskController.signal),\r\n extra: extra,\r\n signal: internalTaskController.signal,\r\n fork: createFork(internalTaskController.signal),\r\n unsubscribe: entry.unsubscribe,\r\n subscribe: function () {\r\n listenerMap.set(entry.id, entry);\r\n },\r\n cancelActiveListeners: function () {\r\n entry.pending.forEach(function (controller, _, set) {\r\n if (controller !== internalTaskController) {\r\n abortControllerWithReason(controller, listenerCancelled);\r\n set.delete(controller);\r\n }\r\n });\r\n }\r\n })))];\r\n case 2:\r\n _c.sent();\r\n return [3 /*break*/, 5];\r\n case 3:\r\n listenerError_1 = _c.sent();\r\n if (!(listenerError_1 instanceof TaskAbortError)) {\r\n safelyNotifyError(onError, listenerError_1, {\r\n raisedBy: \"effect\"\r\n });\r\n }\r\n return [3 /*break*/, 5];\r\n case 4:\r\n abortControllerWithReason(internalTaskController, listenerCompleted);\r\n entry.pending.delete(internalTaskController);\r\n return [7 /*endfinally*/];\r\n case 5: return [2 /*return*/];\r\n }\r\n });\r\n }); };\r\n var clearListenerMiddleware = createClearListenerMiddleware(listenerMap);\r\n var middleware = function (api) { return function (next) { return function (action) {\r\n if (addListener.match(action)) {\r\n return startListening(action.payload);\r\n }\r\n if (clearAllListeners.match(action)) {\r\n clearListenerMiddleware();\r\n return;\r\n }\r\n if (removeListener.match(action)) {\r\n return stopListening(action.payload);\r\n }\r\n var originalState = api.getState();\r\n var getOriginalState = function () {\r\n if (originalState === INTERNAL_NIL_TOKEN) {\r\n throw new Error(alm + \": getOriginalState can only be called synchronously\");\r\n }\r\n return originalState;\r\n };\r\n var result;\r\n try {\r\n result = next(action);\r\n if (listenerMap.size > 0) {\r\n var currentState = api.getState();\r\n var listenerEntries = Array.from(listenerMap.values());\r\n for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) {\r\n var entry = listenerEntries_1[_i];\r\n var runListener = false;\r\n try {\r\n runListener = entry.predicate(action, currentState, originalState);\r\n }\r\n catch (predicateError) {\r\n runListener = false;\r\n safelyNotifyError(onError, predicateError, {\r\n raisedBy: \"predicate\"\r\n });\r\n }\r\n if (!runListener) {\r\n continue;\r\n }\r\n notifyListener(entry, action, api, getOriginalState);\r\n }\r\n }\r\n }\r\n finally {\r\n originalState = INTERNAL_NIL_TOKEN;\r\n }\r\n return result;\r\n }; }; };\r\n return {\r\n middleware: middleware,\r\n startListening: startListening,\r\n stopListening: stopListening,\r\n clearListeners: clearListenerMiddleware\r\n };\r\n}\r\n// src/index.ts\r\nenableES5();\r\nexport { MiddlewareArray, TaskAbortError, addListener, clearAllListeners, configureStore, createAction, createAsyncThunk, createDraftSafeSelector, createEntityAdapter, createImmutableStateInvariantMiddleware, createListenerMiddleware, default2 as createNextState, createReducer, createSelector2 as createSelector, createSerializableStateInvariantMiddleware, createSlice, current2 as current, findNonSerializableValue, freeze, getDefaultMiddleware, getType, isAllOf, isAnyOf, isAsyncThunkAction, isDraft4 as isDraft, isFulfilled, isImmutableDefault, isPending, isPlain, isPlainObject, isRejected, isRejectedWithValue, miniSerializeError, nanoid, original, removeListener, unwrapResult };\r\n//# sourceMappingURL=redux-toolkit.esm.js.map","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || defaults.transitional;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\naxios.VERSION = require('./env/data').version;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","module.exports = {\n \"version\": \"0.24.0\"\n};","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar VERSION = require('../env/data').version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/json/stringify\"), __esModule: true };","/*\n * JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\n\n/* global define */\n\n/* eslint-disable strict */\n\n;(function ($) {\n 'use strict'\n\n /**\n * Add integers, wrapping at 2^32.\n * This uses 16-bit operations internally to work around bugs in interpreters.\n *\n * @param {number} x First integer\n * @param {number} y Second integer\n * @returns {number} Sum\n */\n function safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff)\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16)\n return (msw << 16) | (lsw & 0xffff)\n }\n\n /**\n * Bitwise rotate a 32-bit number to the left.\n *\n * @param {number} num 32-bit number\n * @param {number} cnt Rotation count\n * @returns {number} Rotated number\n */\n function bitRotateLeft(num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }\n\n /**\n * Basic operation the algorithm uses.\n *\n * @param {number} q q\n * @param {number} a a\n * @param {number} b b\n * @param {number} x x\n * @param {number} s s\n * @param {number} t t\n * @returns {number} Result\n */\n function md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b)\n }\n /**\n * Basic operation the algorithm uses.\n *\n * @param {number} a a\n * @param {number} b b\n * @param {number} c c\n * @param {number} d d\n * @param {number} x x\n * @param {number} s s\n * @param {number} t t\n * @returns {number} Result\n */\n function md5ff(a, b, c, d, x, s, t) {\n return md5cmn((b & c) | (~b & d), a, b, x, s, t)\n }\n /**\n * Basic operation the algorithm uses.\n *\n * @param {number} a a\n * @param {number} b b\n * @param {number} c c\n * @param {number} d d\n * @param {number} x x\n * @param {number} s s\n * @param {number} t t\n * @returns {number} Result\n */\n function md5gg(a, b, c, d, x, s, t) {\n return md5cmn((b & d) | (c & ~d), a, b, x, s, t)\n }\n /**\n * Basic operation the algorithm uses.\n *\n * @param {number} a a\n * @param {number} b b\n * @param {number} c c\n * @param {number} d d\n * @param {number} x x\n * @param {number} s s\n * @param {number} t t\n * @returns {number} Result\n */\n function md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t)\n }\n /**\n * Basic operation the algorithm uses.\n *\n * @param {number} a a\n * @param {number} b b\n * @param {number} c c\n * @param {number} d d\n * @param {number} x x\n * @param {number} s s\n * @param {number} t t\n * @returns {number} Result\n */\n function md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t)\n }\n\n /**\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n *\n * @param {Array} x Array of little-endian words\n * @param {number} len Bit length\n * @returns {Array} MD5 Array\n */\n function binlMD5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32\n x[(((len + 64) >>> 9) << 4) + 14] = len\n\n var i\n var olda\n var oldb\n var oldc\n var oldd\n var a = 1732584193\n var b = -271733879\n var c = -1732584194\n var d = 271733878\n\n for (i = 0; i < x.length; i += 16) {\n olda = a\n oldb = b\n oldc = c\n oldd = d\n\n a = md5ff(a, b, c, d, x[i], 7, -680876936)\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063)\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)\n\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)\n b = md5gg(b, c, d, a, x[i], 20, -373897302)\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)\n\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558)\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)\n d = md5hh(d, a, b, c, x[i], 11, -358537222)\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)\n\n a = md5ii(a, b, c, d, x[i], 6, -198630844)\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)\n\n a = safeAdd(a, olda)\n b = safeAdd(b, oldb)\n c = safeAdd(c, oldc)\n d = safeAdd(d, oldd)\n }\n return [a, b, c, d]\n }\n\n /**\n * Convert an array of little-endian words to a string\n *\n * @param {Array} input MD5 Array\n * @returns {string} MD5 string\n */\n function binl2rstr(input) {\n var i\n var output = ''\n var length32 = input.length * 32\n for (i = 0; i < length32; i += 8) {\n output += String.fromCharCode((input[i >> 5] >>> i % 32) & 0xff)\n }\n return output\n }\n\n /**\n * Convert a raw string to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n *\n * @param {string} input Raw input string\n * @returns {Array} Array of little-endian words\n */\n function rstr2binl(input) {\n var i\n var output = []\n output[(input.length >> 2) - 1] = undefined\n for (i = 0; i < output.length; i += 1) {\n output[i] = 0\n }\n var length8 = input.length * 8\n for (i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << i % 32\n }\n return output\n }\n\n /**\n * Calculate the MD5 of a raw string\n *\n * @param {string} s Input string\n * @returns {string} Raw MD5 string\n */\n function rstrMD5(s) {\n return binl2rstr(binlMD5(rstr2binl(s), s.length * 8))\n }\n\n /**\n * Calculates the HMAC-MD5 of a key and some data (raw strings)\n *\n * @param {string} key HMAC key\n * @param {string} data Raw input string\n * @returns {string} Raw MD5 string\n */\n function rstrHMACMD5(key, data) {\n var i\n var bkey = rstr2binl(key)\n var ipad = []\n var opad = []\n var hash\n ipad[15] = opad[15] = undefined\n if (bkey.length > 16) {\n bkey = binlMD5(bkey, key.length * 8)\n }\n for (i = 0; i < 16; i += 1) {\n ipad[i] = bkey[i] ^ 0x36363636\n opad[i] = bkey[i] ^ 0x5c5c5c5c\n }\n hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8)\n return binl2rstr(binlMD5(opad.concat(hash), 512 + 128))\n }\n\n /**\n * Convert a raw string to a hex string\n *\n * @param {string} input Raw input string\n * @returns {string} Hex encoded string\n */\n function rstr2hex(input) {\n var hexTab = '0123456789abcdef'\n var output = ''\n var x\n var i\n for (i = 0; i < input.length; i += 1) {\n x = input.charCodeAt(i)\n output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f)\n }\n return output\n }\n\n /**\n * Encode a string as UTF-8\n *\n * @param {string} input Input string\n * @returns {string} UTF8 string\n */\n function str2rstrUTF8(input) {\n return unescape(encodeURIComponent(input))\n }\n\n /**\n * Encodes input string as raw MD5 string\n *\n * @param {string} s Input string\n * @returns {string} Raw MD5 string\n */\n function rawMD5(s) {\n return rstrMD5(str2rstrUTF8(s))\n }\n /**\n * Encodes input string as Hex encoded string\n *\n * @param {string} s Input string\n * @returns {string} Hex encoded string\n */\n function hexMD5(s) {\n return rstr2hex(rawMD5(s))\n }\n /**\n * Calculates the raw HMAC-MD5 for the given key and data\n *\n * @param {string} k HMAC key\n * @param {string} d Input string\n * @returns {string} Raw MD5 string\n */\n function rawHMACMD5(k, d) {\n return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d))\n }\n /**\n * Calculates the Hex encoded HMAC-MD5 for the given key and data\n *\n * @param {string} k HMAC key\n * @param {string} d Input string\n * @returns {string} Raw MD5 string\n */\n function hexHMACMD5(k, d) {\n return rstr2hex(rawHMACMD5(k, d))\n }\n\n /**\n * Calculates MD5 value for a given string.\n * If a key is provided, calculates the HMAC-MD5 value.\n * Returns a Hex encoded string unless the raw argument is given.\n *\n * @param {string} string Input string\n * @param {string} [key] HMAC key\n * @param {boolean} [raw] Raw output switch\n * @returns {string} MD5 output\n */\n function md5(string, key, raw) {\n if (!key) {\n if (!raw) {\n return hexMD5(string)\n }\n return rawMD5(string)\n }\n if (!raw) {\n return hexHMACMD5(key, string)\n }\n return rawHMACMD5(key, string)\n }\n\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return md5\n })\n } else if (typeof module === 'object' && module.exports) {\n module.exports = md5\n } else {\n $.md5 = md5\n }\n})(this)\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\nvar setFunctionLength = require('set-function-length');\n\nvar $TypeError = require('es-errors/type');\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $defineProperty = require('es-define-property');\nvar $max = GetIntrinsic('%Math.max%');\n\nmodule.exports = function callBind(originalFunction) {\n\tif (typeof originalFunction !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\tvar func = $reflectApply(bind, $call, arguments);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + $max(0, originalFunction.length - (arguments.length - 1)),\n\t\ttrue\n\t);\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","/*!\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\tvar nativeCodeString = '[native code]';\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) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\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","function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\nexport default function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n}\n","/*!\n * content-type\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * RegExp to match *( \";\" parameter ) in RFC 7231 sec 3.1.1.1\n *\n * parameter = token \"=\" ( token / quoted-string )\n * token = 1*tchar\n * tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n * / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\n * / DIGIT / ALPHA\n * ; any VCHAR, except delimiters\n * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE\n * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text\n * obs-text = %x80-FF\n * quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n */\nvar PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *(\"(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*\"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g // eslint-disable-line no-control-regex\nvar TEXT_REGEXP = /^[\\u000b\\u0020-\\u007e\\u0080-\\u00ff]+$/ // eslint-disable-line no-control-regex\nvar TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/\n\n/**\n * RegExp to match quoted-pair in RFC 7230 sec 3.2.6\n *\n * quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n * obs-text = %x80-FF\n */\nvar QESC_REGEXP = /\\\\([\\u000b\\u0020-\\u00ff])/g // eslint-disable-line no-control-regex\n\n/**\n * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6\n */\nvar QUOTE_REGEXP = /([\\\\\"])/g\n\n/**\n * RegExp to match type in RFC 7231 sec 3.1.1.1\n *\n * media-type = type \"/\" subtype\n * type = token\n * subtype = token\n */\nvar TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/\n\n/**\n * Module exports.\n * @public\n */\n\nexports.format = format\nexports.parse = parse\n\n/**\n * Format object to media type.\n *\n * @param {object} obj\n * @return {string}\n * @public\n */\n\nfunction format (obj) {\n if (!obj || typeof obj !== 'object') {\n throw new TypeError('argument obj is required')\n }\n\n var parameters = obj.parameters\n var type = obj.type\n\n if (!type || !TYPE_REGEXP.test(type)) {\n throw new TypeError('invalid type')\n }\n\n var string = type\n\n // append parameters\n if (parameters && typeof parameters === 'object') {\n var param\n var params = Object.keys(parameters).sort()\n\n for (var i = 0; i < params.length; i++) {\n param = params[i]\n\n if (!TOKEN_REGEXP.test(param)) {\n throw new TypeError('invalid parameter name')\n }\n\n string += '; ' + param + '=' + qstring(parameters[param])\n }\n }\n\n return string\n}\n\n/**\n * Parse media type to object.\n *\n * @param {string|object} string\n * @return {Object}\n * @public\n */\n\nfunction parse (string) {\n if (!string) {\n throw new TypeError('argument string is required')\n }\n\n // support req/res-like objects as argument\n var header = typeof string === 'object'\n ? getcontenttype(string)\n : string\n\n if (typeof header !== 'string') {\n throw new TypeError('argument string is required to be a string')\n }\n\n var index = header.indexOf(';')\n var type = index !== -1\n ? header.slice(0, index).trim()\n : header.trim()\n\n if (!TYPE_REGEXP.test(type)) {\n throw new TypeError('invalid media type')\n }\n\n var obj = new ContentType(type.toLowerCase())\n\n // parse parameters\n if (index !== -1) {\n var key\n var match\n var value\n\n PARAM_REGEXP.lastIndex = index\n\n while ((match = PARAM_REGEXP.exec(header))) {\n if (match.index !== index) {\n throw new TypeError('invalid parameter format')\n }\n\n index += match[0].length\n key = match[1].toLowerCase()\n value = match[2]\n\n if (value.charCodeAt(0) === 0x22 /* \" */) {\n // remove quotes\n value = value.slice(1, -1)\n\n // remove escapes\n if (value.indexOf('\\\\') !== -1) {\n value = value.replace(QESC_REGEXP, '$1')\n }\n }\n\n obj.parameters[key] = value\n }\n\n if (index !== header.length) {\n throw new TypeError('invalid parameter format')\n }\n }\n\n return obj\n}\n\n/**\n * Get content-type from req/res objects.\n *\n * @param {object}\n * @return {Object}\n * @private\n */\n\nfunction getcontenttype (obj) {\n var header\n\n if (typeof obj.getHeader === 'function') {\n // res-like\n header = obj.getHeader('content-type')\n } else if (typeof obj.headers === 'object') {\n // req-like\n header = obj.headers && obj.headers['content-type']\n }\n\n if (typeof header !== 'string') {\n throw new TypeError('content-type header is missing from object')\n }\n\n return header\n}\n\n/**\n * Quote a string if necessary.\n *\n * @param {string} val\n * @return {string}\n * @private\n */\n\nfunction qstring (val) {\n var str = String(val)\n\n // no need to quote tokens\n if (TOKEN_REGEXP.test(str)) {\n return str\n }\n\n if (str.length > 0 && !TEXT_REGEXP.test(str)) {\n throw new TypeError('invalid parameter value')\n }\n\n return '\"' + str.replace(QUOTE_REGEXP, '\\\\$1') + '\"'\n}\n\n/**\n * Class to represent a content type.\n * @private\n */\nfunction ContentType (type) {\n this.parameters = Object.create(null)\n this.type = type\n}\n","var core = require('../../modules/_core');\nvar $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });\nmodule.exports = function stringify(it) { // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n};\n","var core = module.exports = { version: '2.6.12' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","function dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n}\n\nfunction timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n}\n\nfunction dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/) || [];\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n var dateTimeFormat;\n\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n}\n\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\nexport default longFormatters;","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return date.getTime() - utcDate.getTime();\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getUTCISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function startOfUTCWeekYear(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);\n var year = getUTCWeekYear(dirtyDate, dirtyOptions);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, dirtyOptions);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCWeekYear(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, dirtyOptions);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n if (token === 'YYYY') {\n throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'YY') {\n throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'D') {\n throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'DD') {\n throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n }\n}","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","var roundingMap = {\n ceil: Math.ceil,\n round: Math.round,\n floor: Math.floor,\n trunc: function (value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n } // Math.trunc is not supported by IE\n\n};\nvar defaultRoundingMethod = 'trunc';\nexport function getRoundingMethod(method) {\n return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function startOfUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function startOfUTCWeek(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","export default function toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_HOUR = 3600000;\n/**\n * @name addHours\n * @category Hour Helpers\n * @summary Add the specified number of hours to the given date.\n *\n * @description\n * Add the specified number of hours to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of hours to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the hours added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 2 hours to 10 July 2014 23:00:00:\n * const result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n * //=> Fri Jul 11 2014 01:00:00\n */\n\nexport default function addHours(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_HOUR);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var timestamp = toDate(dirtyDate).getTime();\n var amount = toInteger(dirtyAmount);\n return new Date(timestamp + amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_MINUTE = 60000;\n/**\n * @name addMinutes\n * @category Minute Helpers\n * @summary Add the specified number of minutes to the given date.\n *\n * @description\n * Add the specified number of minutes to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the minutes added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 30 minutes to 10 July 2014 12:00:00:\n * const result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 12:30:00\n */\n\nexport default function addMinutes(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_MINUTE);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addQuarters\n * @category Quarter Helpers\n * @summary Add the specified number of year quarters to the given date.\n *\n * @description\n * Add the specified number of year quarters to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of quarters to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the quarters added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 1 quarter to 1 September 2014:\n * const result = addQuarters(new Date(2014, 8, 1), 1)\n * //=> Mon Dec 01 2014 00:00:00\n */\n\nexport default function addQuarters(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n var months = amount * 3;\n return addMonths(dirtyDate, months);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\n\nexport default function addWeeks(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n var days = amount * 7;\n return addDays(dirtyDate, days);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","/**\n * Days in 1 week.\n *\n * @name daysInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInWeek = 7;\n/**\n * Maximum allowed time.\n *\n * @name maxTime\n * @constant\n * @type {number}\n * @default\n */\n\nexport var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n/**\n * Milliseconds in 1 minute\n *\n * @name millisecondsInMinute\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInMinute = 60000;\n/**\n * Milliseconds in 1 hour\n *\n * @name millisecondsInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInHour = 3600000;\n/**\n * Milliseconds in 1 second\n *\n * @name millisecondsInSecond\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInSecond = 1000;\n/**\n * Minimum allowed time.\n *\n * @name minTime\n * @constant\n * @type {number}\n * @default\n */\n\nexport var minTime = -maxTime;\n/**\n * Minutes in 1 hour\n *\n * @name minutesInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var minutesInHour = 60;\n/**\n * Months in 1 quarter\n *\n * @name monthsInQuarter\n * @constant\n * @type {number}\n * @default\n */\n\nexport var monthsInQuarter = 3;\n/**\n * Months in 1 year\n *\n * @name monthsInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var monthsInYear = 12;\n/**\n * Quarters in 1 year\n *\n * @name quartersInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var quartersInYear = 4;\n/**\n * Seconds in 1 hour\n *\n * @name secondsInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInHour = 3600;\n/**\n * Seconds in 1 minute\n *\n * @name secondsInMinute\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInMinute = 60;","import getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\n\nexport default function differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var startOfDayLeft = startOfDay(dirtyDateLeft);\n var startOfDayRight = startOfDay(dirtyDateRight);\n var timestampLeft = startOfDayLeft.getTime() - getTimezoneOffsetInMilliseconds(startOfDayLeft);\n var timestampRight = startOfDayRight.getTime() - getTimezoneOffsetInMilliseconds(startOfDayRight); // Round the number of days to the nearest integer\n // because the number of milliseconds in a day is not constant\n // (e.g. it's different in the day of the daylight saving time clock shift)\n\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\n\nexport default function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}","import startOfWeek from \"../startOfWeek/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\n/**\n * @name differenceInCalendarWeeks\n * @category Week Helpers\n * @summary Get the number of calendar weeks between the given dates.\n *\n * @description\n * Get the number of calendar weeks between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Number} the number of calendar weeks\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // How many calendar weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5)\n * )\n * //=> 3\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5),\n * { weekStartsOn: 1 }\n * )\n * //=> 2\n */\n\nexport default function differenceInCalendarWeeks(dirtyDateLeft, dirtyDateRight, dirtyOptions) {\n requiredArgs(2, arguments);\n var startOfWeekLeft = startOfWeek(dirtyDateLeft, dirtyOptions);\n var startOfWeekRight = startOfWeek(dirtyDateRight, dirtyOptions);\n var timestampLeft = startOfWeekLeft.getTime() - getTimezoneOffsetInMilliseconds(startOfWeekLeft);\n var timestampRight = startOfWeekRight.getTime() - getTimezoneOffsetInMilliseconds(startOfWeekRight); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarYears\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar years\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInCalendarYears(\n * new Date(2015, 1, 11),\n * new Date(2013, 11, 31)\n * )\n * //=> 2\n */\n\nexport default function differenceInCalendarYears(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() - dateRight.getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarDays from \"../differenceInCalendarDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\"; // Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\n\nfunction compareLocalAsc(dateLeft, dateRight) {\n var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full days according to the local timezone\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 1)\n * )\n//=> 92\n */\n\n\nexport default function differenceInDays(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareLocalAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight));\n dateLeft.setDate(dateLeft.getDate() - sign * difference); // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign);\n var result = sign * (difference - isLastDayNotFull); // Prevent negative zero\n\n return result === 0 ? 0 : result;\n}","import { millisecondsInHour } from \"../constants/index.js\";\nimport differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInHours\n * @category Hour Helpers\n * @summary Get the number of hours between the given dates.\n *\n * @description\n * Get the number of hours between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of hours\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?\n * const result = differenceInHours(\n * new Date(2014, 6, 2, 19, 0),\n * new Date(2014, 6, 2, 6, 50)\n * )\n * //=> 12\n */\n\nexport default function differenceInHours(dateLeft, dateRight, options) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dateLeft, dateRight) / millisecondsInHour;\n return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dateLeft, dateRight) {\n requiredArgs(2, arguments);\n return toDate(dateLeft).getTime() - toDate(dateRight).getTime();\n}","import { millisecondsInMinute } from \"../constants/index.js\";\nimport differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInMinutes\n * @category Minute Helpers\n * @summary Get the number of minutes between the given dates.\n *\n * @description\n * Get the signed number of full (rounded towards 0) minutes between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of minutes\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\n * const result = differenceInMinutes(\n * new Date(2014, 6, 2, 12, 20, 0),\n * new Date(2014, 6, 2, 12, 7, 59)\n * )\n * //=> 12\n *\n * @example\n * // How many minutes are between 10:01:59 and 10:00:00\n * const result = differenceInMinutes(\n * new Date(2000, 0, 1, 10, 0, 0),\n * new Date(2000, 0, 1, 10, 1, 59)\n * )\n * //=> -1\n */\n\nexport default function differenceInMinutes(dateLeft, dateRight, options) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dateLeft, dateRight) / millisecondsInMinute;\n return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\n\nexport default function endOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport default function endOfWeek(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n date.setDate(date.getDate() + diff);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * var result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\n\nexport default function endOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n date.setFullYear(year + 1, 0, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCDayOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","export default function addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nvar formatters = {\n // Year\n y: function (date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function (date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n // Day of the month\n d: function (date, token) {\n return addLeadingZeros(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function (date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return dayPeriodEnumValue.toUpperCase();\n\n case 'aaa':\n return dayPeriodEnumValue;\n\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function (date, token) {\n return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function (date, token) {\n return addLeadingZeros(date.getUTCHours(), token.length);\n },\n // Minute\n m: function (date, token) {\n return addLeadingZeros(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function (date, token) {\n return addLeadingZeros(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function (date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return addLeadingZeros(fractionalSeconds, token.length);\n }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n};\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nvar formatters = {\n // Era\n G: function (date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n\n return lightFormatters.y(date, token);\n },\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n } // Ordinal number\n\n\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n } // Padding\n\n\n return addLeadingZeros(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function (date, token) {\n var isoWeekYear = getUTCISOWeekYear(date); // Padding\n\n return addLeadingZeros(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n var year = date.getUTCFullYear();\n return addLeadingZeros(year, token.length);\n },\n // Quarter\n Q: function (date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'QQ':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function (date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'qq':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function (date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n case 'M':\n case 'MM':\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function (date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n\n case 'LL':\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function (date, token, localize, options) {\n var week = getUTCWeek(date, options);\n\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(week, token.length);\n },\n // ISO week of year\n I: function (date, token, localize) {\n var isoWeek = getUTCISOWeek(date);\n\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n // Day of the month\n d: function (date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n\n return lightFormatters.d(date, token);\n },\n // Day of year\n D: function (date, token, localize) {\n var dayOfYear = getUTCDayOfYear(date);\n\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n // Day of week\n E: function (date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'ee':\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'cc':\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function (date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n\n case 'ii':\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n\n switch (token) {\n case 'b':\n case 'bb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return lightFormatters.h(date, token);\n },\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n\n return lightFormatters.H(date, token);\n },\n // Hour [0-11]\n K: function (date, token, localize) {\n var hours = date.getUTCHours() % 12;\n\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Hour [1-24]\n k: function (date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Minute\n m: function (date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n\n return lightFormatters.m(date, token);\n },\n // Second\n s: function (date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n\n return lightFormatters.s(date, token);\n },\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return 'Z';\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return addLeadingZeros(timestamp, token.length);\n }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n\n if (minutes === 0) {\n return sign + String(hours);\n }\n\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n\n return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n\nexport default formatters;","import isValid from \"../isValid/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The second argument is now required for the sake of explicitness.\n *\n * ```javascript\n * // Before v2.0.0\n * format(new Date(2016, 0, 1))\n *\n * // v2.0.0 onward\n * format(new Date(2016, 0, 1), \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\")\n * ```\n *\n * - New format string API for `format` function\n * which is based on [Unicode Technical Standard #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).\n * See [this post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.\n *\n * - Characters are now escaped using single quote symbols (`'`) instead of square brackets.\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://git.io/fxCyr\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://git.io/fxCyr\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * var result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * var result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, dirtyOptions) {\n requiredArgs(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var options = dirtyOptions || {};\n var locale = options.locale || defaultLocale;\n var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n\n var originalDate = toDate(dirtyDate);\n\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n var utcDate = subMilliseconds(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong, formatterOptions);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n\n var firstCharacter = substring[0];\n\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n\n var formatter = formatters[firstCharacter];\n\n if (formatter) {\n if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, dirtyDate);\n }\n\n if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, dirtyDate);\n }\n\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n return substring;\n }).join('');\n return result;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDate\n * @category Day Helpers\n * @summary Get the day of the month of the given date.\n *\n * @description\n * Get the day of the month of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the day of month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which day of the month is 29 February 2012?\n * const result = getDate(new Date(2012, 1, 29))\n * //=> 29\n */\n\nexport default function getDate(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var dayOfMonth = date.getDate();\n return dayOfMonth;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {0|1|2|3|4|5|6} the day of week, 0 represents Sunday\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\n\nexport default function getDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var day = date.getDay();\n return day;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getHours\n * @category Hour Helpers\n * @summary Get the hours of the given date.\n *\n * @description\n * Get the hours of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the hours\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the hours of 29 February 2012 11:45:00:\n * const result = getHours(new Date(2012, 1, 29, 11, 45))\n * //=> 11\n */\n\nexport default function getHours(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var hours = date.getHours();\n return hours;\n}","import startOfWeek from \"../startOfWeek/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of an ISO week\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n return startOfWeek(dirtyDate, {\n weekStartsOn: 1\n });\n}","import toDate from \"../toDate/index.js\";\nimport startOfISOWeek from \"../startOfISOWeek/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `getISOYear` to `getISOWeekYear`.\n * \"ISO week year\" is short for [ISO week-numbering year](https://en.wikipedia.org/wiki/ISO_week_date).\n * This change makes the name consistent with\n * locale-dependent week-numbering year helpers, e.g., `getWeekYear`.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the ISO week-numbering year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\n\nexport default function getISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getISOWeekYear from \"../getISOWeekYear/index.js\";\nimport startOfISOWeek from \"../startOfISOWeek/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of an ISO week-numbering year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\n\nexport default function startOfISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n var date = startOfISOWeek(fourthOfJanuary);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport startOfISOWeek from \"../startOfISOWeek/index.js\";\nimport startOfISOWeekYear from \"../startOfISOWeekYear/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the ISO week\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\n\nexport default function getISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfISOWeek(date).getTime() - startOfISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getMinutes\n * @category Minute Helpers\n * @summary Get the minutes of the given date.\n *\n * @description\n * Get the minutes of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the minutes\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the minutes of 29 February 2012 11:45:05:\n * const result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 45\n */\n\nexport default function getMinutes(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var minutes = date.getMinutes();\n return minutes;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\n\nexport default function getMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n return month;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getQuarter\n * @category Quarter Helpers\n * @summary Get the year quarter of the given date.\n *\n * @description\n * Get the year quarter of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the quarter\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which quarter is 2 July 2014?\n * const result = getQuarter(new Date(2014, 6, 2))\n * //=> 3\n */\n\nexport default function getQuarter(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var quarter = Math.floor(date.getMonth() / 3) + 1;\n return quarter;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getSeconds\n * @category Second Helpers\n * @summary Get the seconds of the given date.\n *\n * @description\n * Get the seconds of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the seconds\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the seconds of 29 February 2012 11:45:05.123:\n * const result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 5\n */\n\nexport default function getSeconds(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var seconds = date.getSeconds();\n return seconds;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getTime\n * @category Timestamp Helpers\n * @summary Get the milliseconds timestamp of the given date.\n *\n * @description\n * Get the milliseconds timestamp of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the timestamp\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05.123:\n * const result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 1330515905123\n */\n\nexport default function getTime(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n return timestamp;\n}","import startOfWeek from \"../startOfWeek/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @returns {Number} the local week-numbering year\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport default function getWeekYear(dirtyDate, options) {\n var _options$locale, _options$locale$optio;\n\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var localeFirstWeekContainsDate = options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = (options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n var startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n var startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getWeekYear from \"../getWeekYear/index.js\";\nimport startOfWeek from \"../startOfWeek/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @returns {Date} the start of a week-numbering year\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport default function startOfWeekYear(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);\n var year = getWeekYear(dirtyDate, dirtyOptions);\n var firstWeek = new Date(0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n var date = startOfWeek(firstWeek, dirtyOptions);\n return date;\n}","import startOfWeek from \"../startOfWeek/index.js\";\nimport startOfWeekYear from \"../startOfWeekYear/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @returns {Number} the week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\n\nexport default function getWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfWeek(date, options).getTime() - startOfWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\n\nexport default function getYear(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be after the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\n\nexport default function isAfter(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() > dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be before the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\n\nexport default function isBefore(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() < dateToCompare.getTime();\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\n\nexport default function isDate(value) {\n requiredArgs(1, arguments);\n return value instanceof Date || typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\n\nexport default function isEqual(dirtyLeftDate, dirtyRightDate) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyLeftDate);\n var dateRight = toDate(dirtyRightDate);\n return dateLeft.getTime() === dateRight.getTime();\n}","import startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day (and year and month)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n * \n * @example\n * // Are 4 September and 4 October in the same day?\n * var result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n * \n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * var result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\n\nexport default function isSameDay(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft);\n var dateRightStartOfDay = startOfDay(dirtyDateRight);\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * var result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * var result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\n\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import startOfQuarter from \"../startOfQuarter/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameQuarter\n * @category Quarter Helpers\n * @summary Are the given dates in the same quarter (and year)?\n *\n * @description\n * Are the given dates in the same quarter (and year)?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same quarter (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 1 January 2014 and 8 March 2014 in the same quarter?\n * var result = isSameQuarter(new Date(2014, 0, 1), new Date(2014, 2, 8))\n * //=> true\n * \n * @example\n * // Are 1 January 2014 and 1 January 2015 in the same quarter?\n * var result = isSameQuarter(new Date(2014, 0, 1), new Date(2015, 0, 1))\n * //=> false\n */\n\nexport default function isSameQuarter(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfQuarter = startOfQuarter(dirtyDateLeft);\n var dateRightStartOfQuarter = startOfQuarter(dirtyDateRight);\n return dateLeftStartOfQuarter.getTime() === dateRightStartOfQuarter.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * var result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\n\nexport default function isSameYear(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear();\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - Now `isValid` doesn't throw an exception\n * if the first argument is not an instance of Date.\n * Instead, argument is converted beforehand using `toDate`.\n *\n * Examples:\n *\n * | `isValid` argument | Before v2.0.0 | v2.0.0 onward |\n * |---------------------------|---------------|---------------|\n * | `new Date()` | `true` | `true` |\n * | `new Date('2016-01-01')` | `true` | `true` |\n * | `new Date('')` | `false` | `false` |\n * | `new Date(1488370835081)` | `true` | `true` |\n * | `new Date(NaN)` | `false` | `false` |\n * | `'2016-01-01'` | `TypeError` | `false` |\n * | `''` | `TypeError` | `false` |\n * | `1488370835081` | `TypeError` | `true` |\n * | `NaN` | `TypeError` | `false` |\n *\n * We introduce this change to make *date-fns* consistent with ECMAScript behavior\n * that try to coerce arguments to the expected type\n * (which is also the case with other *date-fns* functions).\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\n\nexport default function isValid(dirtyDate) {\n requiredArgs(1, arguments);\n\n if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n return false;\n }\n\n var date = toDate(dirtyDate);\n return !isNaN(Number(date));\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name isWithinInterval\n * @category Interval Helpers\n * @summary Is the given date within the interval?\n *\n * @description\n * Is the given date within the interval? (Including start and end.)\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `isWithinRange` to `isWithinInterval`.\n * This change was made to mirror the use of the word \"interval\" in standard ISO 8601:2004 terminology:\n *\n * ```\n * 2.1.3\n * time interval\n * part of the time axis limited by two instants\n * ```\n *\n * Also, this function now accepts an object with `start` and `end` properties\n * instead of two arguments as an interval.\n * This function now throws `RangeError` if the start of the interval is after its end\n * or if any date in the interval is `Invalid Date`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * isWithinRange(\n * new Date(2014, 0, 3),\n * new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n *\n * // v2.0.0 onward\n *\n * isWithinInterval(\n * new Date(2014, 0, 3),\n * { start: new Date(2014, 0, 1), end: new Date(2014, 0, 7) }\n * )\n * ```\n *\n * @param {Date|Number} date - the date to check\n * @param {Interval} interval - the interval to check\n * @returns {Boolean} the date is within the interval\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // For the date within the interval:\n * isWithinInterval(new Date(2014, 0, 3), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * //=> true\n *\n * @example\n * // For the date outside of the interval:\n * isWithinInterval(new Date(2014, 0, 10), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * //=> false\n *\n * @example\n * // For date equal to interval start:\n * isWithinInterval(date, { start, end: date }) // => true\n *\n * @example\n * // For date equal to interval end:\n * isWithinInterval(date, { start: date, end }) // => true\n */\nexport default function isWithinInterval(dirtyDate, interval) {\n requiredArgs(2, arguments);\n var time = toDate(dirtyDate).getTime();\n var startTime = toDate(interval.start).getTime();\n var endTime = toDate(interval.end).getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date`\n\n if (!(startTime <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n\n return time >= startTime && time <= endTime;\n}","export default function buildFormatLongFn(args) {\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // TODO: Remove String()\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}","export default function buildLocalizeFn(args) {\n return function (dirtyIndex, dirtyOptions) {\n var options = dirtyOptions || {};\n var context = options.context ? String(options.context) : 'standalone';\n var valuesArray;\n\n if (context === 'formatting' && args.formattingValues) {\n var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n var width = options.width ? String(options.width) : defaultWidth;\n valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n var _defaultWidth = args.defaultWidth;\n\n var _width = options.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[_width] || args.values[_defaultWidth];\n }\n\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n\n return valuesArray[index];\n };\n}","export default function buildMatchFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var width = options.width;\n var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n\n var matchedString = matchResult[0];\n var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n }) : findKey(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n var value;\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}\n\nfunction findKey(object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key;\n }\n }\n\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (var key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n\n return undefined;\n}","export default function buildMatchPatternFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n var matchedString = matchResult[0];\n var parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\n\nvar formatDistance = function (token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', count.toString());\n }\n\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n\n return result;\n};\n\nexport default formatDistance;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\n\nvar formatRelative = function (token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n};\n\nexport default formatRelative;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n}; // Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\n\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\n\nvar ordinalNumber = function (dirtyNumber, _options) {\n var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n var rem100 = number % 100;\n\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n\n case 2:\n return number + 'nd';\n\n case 3:\n return number + 'rd';\n }\n }\n\n return number + 'th';\n};\n\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function (quarter) {\n return quarter - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nexport default localize;","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function (value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function (index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n code: 'en-US',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0\n /* Sunday */\n ,\n firstWeekContainsDate: 1\n }\n};\nexport default locale;","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name max\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - `max` function now accepts an array of dates rather than spread arguments.\n *\n * ```javascript\n * // Before v2.0.0\n * var date1 = new Date(1989, 6, 10)\n * var date2 = new Date(1987, 1, 11)\n * var maxDate = max(date1, date2)\n *\n * // v2.0.0 onward:\n * var dates = [new Date(1989, 6, 10), new Date(1987, 1, 11)]\n * var maxDate = max(dates)\n * ```\n *\n * @param {Date[]|Number[]} datesArray - the dates to compare\n * @returns {Date} the latest of the dates\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which of these dates is the latest?\n * var result = max([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Sun Jul 02 1995 00:00:00\n */\n\nexport default function max(dirtyDatesArray) {\n requiredArgs(1, arguments);\n var datesArray; // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method\n\n if (dirtyDatesArray && typeof dirtyDatesArray.forEach === 'function') {\n datesArray = dirtyDatesArray; // If `dirtyDatesArray` is Array-like Object, convert to Array.\n } else if (typeof dirtyDatesArray === 'object' && dirtyDatesArray !== null) {\n datesArray = Array.prototype.slice.call(dirtyDatesArray);\n } else {\n // `dirtyDatesArray` is non-iterable, return Invalid Date\n return new Date(NaN);\n }\n\n var result;\n datesArray.forEach(function (dirtyDate) {\n var currentDate = toDate(dirtyDate);\n\n if (result === undefined || result < currentDate || isNaN(Number(currentDate))) {\n result = currentDate;\n }\n });\n return result || new Date(NaN);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name min\n * @category Common Helpers\n * @summary Returns the earliest of the given dates.\n *\n * @description\n * Returns the earliest of the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - `min` function now accepts an array of dates rather than spread arguments.\n *\n * ```javascript\n * // Before v2.0.0\n * const date1 = new Date(1989, 6, 10)\n * const date2 = new Date(1987, 1, 11)\n * const minDate = min(date1, date2)\n *\n * // v2.0.0 onward:\n * const dates = [new Date(1989, 6, 10), new Date(1987, 1, 11)]\n * const minDate = min(dates)\n * ```\n *\n * @param {Date[]|Number[]} datesArray - the dates to compare\n * @returns {Date} - the earliest of the dates\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which of these dates is the earliest?\n * const result = min([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Wed Feb 11 1987 00:00:00\n */\n\nexport default function min(dirtyDatesArray) {\n requiredArgs(1, arguments);\n var datesArray; // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method\n\n if (dirtyDatesArray && typeof dirtyDatesArray.forEach === 'function') {\n datesArray = dirtyDatesArray; // If `dirtyDatesArray` is Array-like Object, convert to Array.\n } else if (typeof dirtyDatesArray === 'object' && dirtyDatesArray !== null) {\n datesArray = Array.prototype.slice.call(dirtyDatesArray);\n } else {\n // `dirtyDatesArray` is non-iterable, return Invalid Date\n return new Date(NaN);\n }\n\n var result;\n datesArray.forEach(function (dirtyDate) {\n var currentDate = toDate(dirtyDate);\n\n if (result === undefined || result > currentDate || isNaN(currentDate.getDate())) {\n result = currentDate;\n }\n });\n return result || new Date(NaN);\n}","export default function assign(target, dirtyObject) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n\n dirtyObject = dirtyObject || {};\n\n for (var property in dirtyObject) {\n if (Object.prototype.hasOwnProperty.call(dirtyObject, property)) {\n target[property] = dirtyObject[property];\n }\n }\n\n return target;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function setUTCDay(dirtyDate, dirtyDay, dirtyOptions) {\n requiredArgs(2, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = toInteger(dirtyDay);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function setUTCISODay(dirtyDate, dirtyDay) {\n requiredArgs(2, arguments);\n var day = toInteger(dirtyDay);\n\n if (day % 7 === 0) {\n day = day - 7;\n }\n\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCISOWeek from \"../getUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function setUTCISOWeek(dirtyDate, dirtyISOWeek) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var isoWeek = toInteger(dirtyISOWeek);\n var diff = getUTCISOWeek(date) - isoWeek;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCWeek from \"../getUTCWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function setUTCWeek(dirtyDate, dirtyWeek, options) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var week = toInteger(dirtyWeek);\n var diff = getUTCWeek(date, options) - week;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","import getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\";\nimport setUTCISODay from \"../../../_lib/setUTCISODay/index.js\";\nimport setUTCISOWeek from \"../../../_lib/setUTCISOWeek/index.js\";\nimport setUTCWeek from \"../../../_lib/setUTCWeek/index.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\";\nvar MILLISECONDS_IN_HOUR = 3600000;\nvar MILLISECONDS_IN_MINUTE = 60000;\nvar MILLISECONDS_IN_SECOND = 1000;\nvar numericPatterns = {\n month: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n date: /^(3[0-1]|[0-2]?\\d)/,\n // 0 to 31\n dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/,\n // 0 to 366\n week: /^(5[0-3]|[0-4]?\\d)/,\n // 0 to 53\n hour23h: /^(2[0-3]|[0-1]?\\d)/,\n // 0 to 23\n hour24h: /^(2[0-4]|[0-1]?\\d)/,\n // 0 to 24\n hour11h: /^(1[0-1]|0?\\d)/,\n // 0 to 11\n hour12h: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n minute: /^[0-5]?\\d/,\n // 0 to 59\n second: /^[0-5]?\\d/,\n // 0 to 59\n singleDigit: /^\\d/,\n // 0 to 9\n twoDigits: /^\\d{1,2}/,\n // 0 to 99\n threeDigits: /^\\d{1,3}/,\n // 0 to 999\n fourDigits: /^\\d{1,4}/,\n // 0 to 9999\n anyDigitsSigned: /^-?\\d+/,\n singleDigitSigned: /^-?\\d/,\n // 0 to 9, -0 to -9\n twoDigitsSigned: /^-?\\d{1,2}/,\n // 0 to 99, -0 to -99\n threeDigitsSigned: /^-?\\d{1,3}/,\n // 0 to 999, -0 to -999\n fourDigitsSigned: /^-?\\d{1,4}/ // 0 to 9999, -0 to -9999\n\n};\nvar timezonePatterns = {\n basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/\n};\n\nfunction parseNumericPattern(pattern, string, valueCallback) {\n var matchResult = string.match(pattern);\n\n if (!matchResult) {\n return null;\n }\n\n var value = parseInt(matchResult[0], 10);\n return {\n value: valueCallback ? valueCallback(value) : value,\n rest: string.slice(matchResult[0].length)\n };\n}\n\nfunction parseTimezonePattern(pattern, string) {\n var matchResult = string.match(pattern);\n\n if (!matchResult) {\n return null;\n } // Input is 'Z'\n\n\n if (matchResult[0] === 'Z') {\n return {\n value: 0,\n rest: string.slice(1)\n };\n }\n\n var sign = matchResult[1] === '+' ? 1 : -1;\n var hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n var minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n var seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n return {\n value: sign * (hours * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * MILLISECONDS_IN_SECOND),\n rest: string.slice(matchResult[0].length)\n };\n}\n\nfunction parseAnyDigitsSigned(string, valueCallback) {\n return parseNumericPattern(numericPatterns.anyDigitsSigned, string, valueCallback);\n}\n\nfunction parseNDigits(n, string, valueCallback) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigit, string, valueCallback);\n\n case 2:\n return parseNumericPattern(numericPatterns.twoDigits, string, valueCallback);\n\n case 3:\n return parseNumericPattern(numericPatterns.threeDigits, string, valueCallback);\n\n case 4:\n return parseNumericPattern(numericPatterns.fourDigits, string, valueCallback);\n\n default:\n return parseNumericPattern(new RegExp('^\\\\d{1,' + n + '}'), string, valueCallback);\n }\n}\n\nfunction parseNDigitsSigned(n, string, valueCallback) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigitSigned, string, valueCallback);\n\n case 2:\n return parseNumericPattern(numericPatterns.twoDigitsSigned, string, valueCallback);\n\n case 3:\n return parseNumericPattern(numericPatterns.threeDigitsSigned, string, valueCallback);\n\n case 4:\n return parseNumericPattern(numericPatterns.fourDigitsSigned, string, valueCallback);\n\n default:\n return parseNumericPattern(new RegExp('^-?\\\\d{1,' + n + '}'), string, valueCallback);\n }\n}\n\nfunction dayPeriodEnumToHours(enumValue) {\n switch (enumValue) {\n case 'morning':\n return 4;\n\n case 'evening':\n return 17;\n\n case 'pm':\n case 'noon':\n case 'afternoon':\n return 12;\n\n case 'am':\n case 'midnight':\n case 'night':\n default:\n return 0;\n }\n}\n\nfunction normalizeTwoDigitYear(twoDigitYear, currentYear) {\n var isCommonEra = currentYear > 0; // Absolute number of the current year:\n // 1 -> 1 AC\n // 0 -> 1 BC\n // -1 -> 2 BC\n\n var absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n var result;\n\n if (absCurrentYear <= 50) {\n result = twoDigitYear || 100;\n } else {\n var rangeEnd = absCurrentYear + 50;\n var rangeEndCentury = Math.floor(rangeEnd / 100) * 100;\n var isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n }\n\n return isCommonEra ? result : 1 - result;\n}\n\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; // User for validation\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O* | Timezone (GMT) |\n * | p | | P | |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n */\n\n\nvar parsers = {\n // Era\n G: {\n priority: 140,\n parse: function (string, token, match, _options) {\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return match.era(string, {\n width: 'abbreviated'\n }) || match.era(string, {\n width: 'narrow'\n });\n // A, B\n\n case 'GGGGG':\n return match.era(string, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return match.era(string, {\n width: 'wide'\n }) || match.era(string, {\n width: 'abbreviated'\n }) || match.era(string, {\n width: 'narrow'\n });\n }\n },\n set: function (date, flags, value, _options) {\n flags.era = value;\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['R', 'u', 't', 'T']\n },\n // Year\n y: {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n priority: 130,\n parse: function (string, token, match, _options) {\n var valueCallback = function (year) {\n return {\n year: year,\n isTwoDigitYear: token === 'yy'\n };\n };\n\n switch (token) {\n case 'y':\n return parseNDigits(4, string, valueCallback);\n\n case 'yo':\n return match.ordinalNumber(string, {\n unit: 'year',\n valueCallback: valueCallback\n });\n\n default:\n return parseNDigits(token.length, string, valueCallback);\n }\n },\n validate: function (_date, value, _options) {\n return value.isTwoDigitYear || value.year > 0;\n },\n set: function (date, flags, value, _options) {\n var currentYear = date.getUTCFullYear();\n\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'u', 'w', 'I', 'i', 'e', 'c', 't', 'T']\n },\n // Local week-numbering year\n Y: {\n priority: 130,\n parse: function (string, token, match, _options) {\n var valueCallback = function (year) {\n return {\n year: year,\n isTwoDigitYear: token === 'YY'\n };\n };\n\n switch (token) {\n case 'Y':\n return parseNDigits(4, string, valueCallback);\n\n case 'Yo':\n return match.ordinalNumber(string, {\n unit: 'year',\n valueCallback: valueCallback\n });\n\n default:\n return parseNDigits(token.length, string, valueCallback);\n }\n },\n validate: function (_date, value, _options) {\n return value.isTwoDigitYear || value.year > 0;\n },\n set: function (date, flags, value, options) {\n var currentYear = getUTCWeekYear(date, options);\n\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n }\n\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n },\n incompatibleTokens: ['y', 'R', 'u', 'Q', 'q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']\n },\n // ISO week-numbering year\n R: {\n priority: 130,\n parse: function (string, token, _match, _options) {\n if (token === 'R') {\n return parseNDigitsSigned(4, string);\n }\n\n return parseNDigitsSigned(token.length, string);\n },\n set: function (_date, _flags, value, _options) {\n var firstWeekOfYear = new Date(0);\n firstWeekOfYear.setUTCFullYear(value, 0, 4);\n firstWeekOfYear.setUTCHours(0, 0, 0, 0);\n return startOfUTCISOWeek(firstWeekOfYear);\n },\n incompatibleTokens: ['G', 'y', 'Y', 'u', 'Q', 'q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']\n },\n // Extended year\n u: {\n priority: 130,\n parse: function (string, token, _match, _options) {\n if (token === 'u') {\n return parseNDigitsSigned(4, string);\n }\n\n return parseNDigitsSigned(token.length, string);\n },\n set: function (date, _flags, value, _options) {\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['G', 'y', 'Y', 'R', 'w', 'I', 'i', 'e', 'c', 't', 'T']\n },\n // Quarter\n Q: {\n priority: 120,\n parse: function (string, token, match, _options) {\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n case 'QQ':\n // 01, 02, 03, 04\n return parseNDigits(token.length, string);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return match.ordinalNumber(string, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return match.quarter(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return match.quarter(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return match.quarter(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.quarter(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 4;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']\n },\n // Stand-alone quarter\n q: {\n priority: 120,\n parse: function (string, token, match, _options) {\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n case 'qq':\n // 01, 02, 03, 04\n return parseNDigits(token.length, string);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return match.ordinalNumber(string, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return match.quarter(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return match.quarter(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return match.quarter(string, {\n width: 'wide',\n context: 'standalone'\n }) || match.quarter(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(string, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 4;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'Q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']\n },\n // Month\n M: {\n priority: 110,\n parse: function (string, token, match, _options) {\n var valueCallback = function (value) {\n return value - 1;\n };\n\n switch (token) {\n // 1, 2, ..., 12\n case 'M':\n return parseNumericPattern(numericPatterns.month, string, valueCallback);\n // 01, 02, ..., 12\n\n case 'MM':\n return parseNDigits(2, string, valueCallback);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return match.ordinalNumber(string, {\n unit: 'month',\n valueCallback: valueCallback\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return match.month(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return match.month(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return match.month(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.month(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 11;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'q', 'Q', 'L', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']\n },\n // Stand-alone month\n L: {\n priority: 110,\n parse: function (string, token, match, _options) {\n var valueCallback = function (value) {\n return value - 1;\n };\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return parseNumericPattern(numericPatterns.month, string, valueCallback);\n // 01, 02, ..., 12\n\n case 'LL':\n return parseNDigits(2, string, valueCallback);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return match.ordinalNumber(string, {\n unit: 'month',\n valueCallback: valueCallback\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return match.month(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return match.month(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return match.month(string, {\n width: 'wide',\n context: 'standalone'\n }) || match.month(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(string, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 11;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'q', 'Q', 'M', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']\n },\n // Local week of year\n w: {\n priority: 100,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'w':\n return parseNumericPattern(numericPatterns.week, string);\n\n case 'wo':\n return match.ordinalNumber(string, {\n unit: 'week'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 53;\n },\n set: function (date, _flags, value, options) {\n return startOfUTCWeek(setUTCWeek(date, value, options), options);\n },\n incompatibleTokens: ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']\n },\n // ISO week of year\n I: {\n priority: 100,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'I':\n return parseNumericPattern(numericPatterns.week, string);\n\n case 'Io':\n return match.ordinalNumber(string, {\n unit: 'week'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 53;\n },\n set: function (date, _flags, value, options) {\n return startOfUTCISOWeek(setUTCISOWeek(date, value, options), options);\n },\n incompatibleTokens: ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']\n },\n // Day of the month\n d: {\n priority: 90,\n subPriority: 1,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'd':\n return parseNumericPattern(numericPatterns.date, string);\n\n case 'do':\n return match.ordinalNumber(string, {\n unit: 'date'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (date, value, _options) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n var month = date.getUTCMonth();\n\n if (isLeapYear) {\n return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];\n } else {\n return value >= 1 && value <= DAYS_IN_MONTH[month];\n }\n },\n set: function (date, _flags, value, _options) {\n date.setUTCDate(value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'q', 'Q', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']\n },\n // Day of year\n D: {\n priority: 90,\n subPriority: 1,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'D':\n case 'DD':\n return parseNumericPattern(numericPatterns.dayOfYear, string);\n\n case 'Do':\n return match.ordinalNumber(string, {\n unit: 'date'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (date, value, _options) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n\n if (isLeapYear) {\n return value >= 1 && value <= 366;\n } else {\n return value >= 1 && value <= 365;\n }\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMonth(0, value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['Y', 'R', 'q', 'Q', 'M', 'L', 'w', 'I', 'd', 'E', 'i', 'e', 'c', 't', 'T']\n },\n // Day of week\n E: {\n priority: 90,\n parse: function (string, token, match, _options) {\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return match.day(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return match.day(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 6;\n },\n set: function (date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['D', 'i', 'e', 'c', 't', 'T']\n },\n // Local day of week\n e: {\n priority: 90,\n parse: function (string, token, match, options) {\n var valueCallback = function (value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case 'e':\n case 'ee':\n // 03\n return parseNDigits(token.length, string, valueCallback);\n // 3rd\n\n case 'eo':\n return match.ordinalNumber(string, {\n unit: 'day',\n valueCallback: valueCallback\n });\n // Tue\n\n case 'eee':\n return match.day(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return match.day(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(string, {\n width: 'short',\n context: 'formatting'\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 6;\n },\n set: function (date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'c', 't', 'T']\n },\n // Stand-alone local day of week\n c: {\n priority: 90,\n parse: function (string, token, match, options) {\n var valueCallback = function (value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case 'c':\n case 'cc':\n // 03\n return parseNDigits(token.length, string, valueCallback);\n // 3rd\n\n case 'co':\n return match.ordinalNumber(string, {\n unit: 'day',\n valueCallback: valueCallback\n });\n // Tue\n\n case 'ccc':\n return match.day(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(string, {\n width: 'short',\n context: 'standalone'\n }) || match.day(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return match.day(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return match.day(string, {\n width: 'short',\n context: 'standalone'\n }) || match.day(string, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return match.day(string, {\n width: 'wide',\n context: 'standalone'\n }) || match.day(string, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(string, {\n width: 'short',\n context: 'standalone'\n }) || match.day(string, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 6;\n },\n set: function (date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'e', 't', 'T']\n },\n // ISO day of week\n i: {\n priority: 90,\n parse: function (string, token, match, _options) {\n var valueCallback = function (value) {\n if (value === 0) {\n return 7;\n }\n\n return value;\n };\n\n switch (token) {\n // 2\n case 'i':\n case 'ii':\n // 02\n return parseNDigits(token.length, string);\n // 2nd\n\n case 'io':\n return match.ordinalNumber(string, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return match.day(string, {\n width: 'abbreviated',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'short',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting',\n valueCallback: valueCallback\n });\n // T\n\n case 'iiiii':\n return match.day(string, {\n width: 'narrow',\n context: 'formatting',\n valueCallback: valueCallback\n });\n // Tu\n\n case 'iiiiii':\n return match.day(string, {\n width: 'short',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting',\n valueCallback: valueCallback\n });\n // Tuesday\n\n case 'iiii':\n default:\n return match.day(string, {\n width: 'wide',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'abbreviated',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'short',\n context: 'formatting',\n valueCallback: valueCallback\n }) || match.day(string, {\n width: 'narrow',\n context: 'formatting',\n valueCallback: valueCallback\n });\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 7;\n },\n set: function (date, _flags, value, options) {\n date = setUTCISODay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'E', 'e', 'c', 't', 'T']\n },\n // AM or PM\n a: {\n priority: 80,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'a':\n case 'aa':\n case 'aaa':\n return match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaaa':\n return match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return match.dayPeriod(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n set: function (date, _flags, value, _options) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['b', 'B', 'H', 'k', 't', 'T']\n },\n // AM, PM, midnight\n b: {\n priority: 80,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'b':\n case 'bb':\n case 'bbb':\n return match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbbb':\n return match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return match.dayPeriod(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n set: function (date, _flags, value, _options) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['a', 'B', 'H', 'k', 't', 'T']\n },\n // in the morning, in the afternoon, in the evening, at night\n B: {\n priority: 80,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return match.dayPeriod(string, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(string, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n },\n set: function (date, _flags, value, _options) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['a', 'b', 't', 'T']\n },\n // Hour [1-12]\n h: {\n priority: 70,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'h':\n return parseNumericPattern(numericPatterns.hour12h, string);\n\n case 'ho':\n return match.ordinalNumber(string, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 12;\n },\n set: function (date, _flags, value, _options) {\n var isPM = date.getUTCHours() >= 12;\n\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else if (!isPM && value === 12) {\n date.setUTCHours(0, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n\n return date;\n },\n incompatibleTokens: ['H', 'K', 'k', 't', 'T']\n },\n // Hour [0-23]\n H: {\n priority: 70,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'H':\n return parseNumericPattern(numericPatterns.hour23h, string);\n\n case 'Ho':\n return match.ordinalNumber(string, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 23;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCHours(value, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['a', 'b', 'h', 'K', 'k', 't', 'T']\n },\n // Hour [0-11]\n K: {\n priority: 70,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'K':\n return parseNumericPattern(numericPatterns.hour11h, string);\n\n case 'Ko':\n return match.ordinalNumber(string, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 11;\n },\n set: function (date, _flags, value, _options) {\n var isPM = date.getUTCHours() >= 12;\n\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n\n return date;\n },\n incompatibleTokens: ['h', 'H', 'k', 't', 'T']\n },\n // Hour [1-24]\n k: {\n priority: 70,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'k':\n return parseNumericPattern(numericPatterns.hour24h, string);\n\n case 'ko':\n return match.ordinalNumber(string, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 1 && value <= 24;\n },\n set: function (date, _flags, value, _options) {\n var hours = value <= 24 ? value % 24 : value;\n date.setUTCHours(hours, 0, 0, 0);\n return date;\n },\n incompatibleTokens: ['a', 'b', 'h', 'H', 'K', 't', 'T']\n },\n // Minute\n m: {\n priority: 60,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 'm':\n return parseNumericPattern(numericPatterns.minute, string);\n\n case 'mo':\n return match.ordinalNumber(string, {\n unit: 'minute'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 59;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMinutes(value, 0, 0);\n return date;\n },\n incompatibleTokens: ['t', 'T']\n },\n // Second\n s: {\n priority: 50,\n parse: function (string, token, match, _options) {\n switch (token) {\n case 's':\n return parseNumericPattern(numericPatterns.second, string);\n\n case 'so':\n return match.ordinalNumber(string, {\n unit: 'second'\n });\n\n default:\n return parseNDigits(token.length, string);\n }\n },\n validate: function (_date, value, _options) {\n return value >= 0 && value <= 59;\n },\n set: function (date, _flags, value, _options) {\n date.setUTCSeconds(value, 0);\n return date;\n },\n incompatibleTokens: ['t', 'T']\n },\n // Fraction of second\n S: {\n priority: 30,\n parse: function (string, token, _match, _options) {\n var valueCallback = function (value) {\n return Math.floor(value * Math.pow(10, -token.length + 3));\n };\n\n return parseNDigits(token.length, string, valueCallback);\n },\n set: function (date, _flags, value, _options) {\n date.setUTCMilliseconds(value);\n return date;\n },\n incompatibleTokens: ['t', 'T']\n },\n // Timezone (ISO-8601. +00:00 is `'Z'`)\n X: {\n priority: 10,\n parse: function (string, token, _match, _options) {\n switch (token) {\n case 'X':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, string);\n\n case 'XX':\n return parseTimezonePattern(timezonePatterns.basic, string);\n\n case 'XXXX':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, string);\n\n case 'XXXXX':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, string);\n\n case 'XXX':\n default:\n return parseTimezonePattern(timezonePatterns.extended, string);\n }\n },\n set: function (date, flags, value, _options) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n return new Date(date.getTime() - value);\n },\n incompatibleTokens: ['t', 'T', 'x']\n },\n // Timezone (ISO-8601)\n x: {\n priority: 10,\n parse: function (string, token, _match, _options) {\n switch (token) {\n case 'x':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, string);\n\n case 'xx':\n return parseTimezonePattern(timezonePatterns.basic, string);\n\n case 'xxxx':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, string);\n\n case 'xxxxx':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, string);\n\n case 'xxx':\n default:\n return parseTimezonePattern(timezonePatterns.extended, string);\n }\n },\n set: function (date, flags, value, _options) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n return new Date(date.getTime() - value);\n },\n incompatibleTokens: ['t', 'T', 'X']\n },\n // Seconds timestamp\n t: {\n priority: 40,\n parse: function (string, _token, _match, _options) {\n return parseAnyDigitsSigned(string);\n },\n set: function (_date, _flags, value, _options) {\n return [new Date(value * 1000), {\n timestampIsSet: true\n }];\n },\n incompatibleTokens: '*'\n },\n // Milliseconds timestamp\n T: {\n priority: 20,\n parse: function (string, _token, _match, _options) {\n return parseAnyDigitsSigned(string);\n },\n set: function (_date, _flags, value, _options) {\n return [new Date(value), {\n timestampIsSet: true\n }];\n },\n incompatibleTokens: '*'\n }\n};\nexport default parsers;","import defaultLocale from \"../locale/en-US/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport assign from \"../_lib/assign/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport parsers from \"./_lib/parsers/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar TIMEZONE_UNIT_PRIORITY = 10; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar notWhitespaceRegExp = /\\S/;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format string.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited\n * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:\n *\n * ```javascript\n * parse('23 AM', 'HH a', new Date())\n * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time\n * ```\n *\n * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true\n *\n * Accepted format string patterns:\n * | Unit |Prior| Pattern | Result examples | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era | 140 | G..GGG | AD, BC | |\n * | | | GGGG | Anno Domini, Before Christ | 2 |\n * | | | GGGGG | A, B | |\n * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |\n * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | yy | 44, 01, 00, 17 | 4 |\n * | | | yyy | 044, 001, 123, 999 | 4 |\n * | | | yyyy | 0044, 0001, 1900, 2017 | 4 |\n * | | | yyyyy | ... | 2,4 |\n * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |\n * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | YY | 44, 01, 00, 17 | 4,6 |\n * | | | YYY | 044, 001, 123, 999 | 4 |\n * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |\n * | | | YYYYY | ... | 2,4 |\n * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |\n * | | | RR | -43, 01, 00, 17 | 4,5 |\n * | | | RRR | -043, 001, 123, 999, -999 | 4,5 |\n * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |\n * | | | RRRRR | ... | 2,4,5 |\n * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |\n * | | | uu | -43, 01, 99, -99 | 4 |\n * | | | uuu | -043, 001, 123, 999, -999 | 4 |\n * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |\n * | | | uuuuu | ... | 2,4 |\n * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |\n * | | | Qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | QQ | 01, 02, 03, 04 | |\n * | | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |\n * | | | qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | qq | 01, 02, 03, 04 | |\n * | | | qqq | Q1, Q2, Q3, Q4 | |\n * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | | qqqqq | 1, 2, 3, 4 | 3 |\n * | Month (formatting) | 110 | M | 1, 2, ..., 12 | |\n * | | | Mo | 1st, 2nd, ..., 12th | 5 |\n * | | | MM | 01, 02, ..., 12 | |\n * | | | MMM | Jan, Feb, ..., Dec | |\n * | | | MMMM | January, February, ..., December | 2 |\n * | | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |\n * | | | Lo | 1st, 2nd, ..., 12th | 5 |\n * | | | LL | 01, 02, ..., 12 | |\n * | | | LLL | Jan, Feb, ..., Dec | |\n * | | | LLLL | January, February, ..., December | 2 |\n * | | | LLLLL | J, F, ..., D | |\n * | Local week of year | 100 | w | 1, 2, ..., 53 | |\n * | | | wo | 1st, 2nd, ..., 53th | 5 |\n * | | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |\n * | | | Io | 1st, 2nd, ..., 53th | 5 |\n * | | | II | 01, 02, ..., 53 | 5 |\n * | Day of month | 90 | d | 1, 2, ..., 31 | |\n * | | | do | 1st, 2nd, ..., 31st | 5 |\n * | | | dd | 01, 02, ..., 31 | |\n * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |\n * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |\n * | | | DD | 01, 02, ..., 365, 366 | 7 |\n * | | | DDD | 001, 002, ..., 365, 366 | |\n * | | | DDDD | ... | 2 |\n * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | | EEEEE | M, T, W, T, F, S, S | |\n * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |\n * | | | io | 1st, 2nd, ..., 7th | 5 |\n * | | | ii | 01, 02, ..., 07 | 5 |\n * | | | iii | Mon, Tue, Wed, ..., Sun | 5 |\n * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |\n * | | | iiiii | M, T, W, T, F, S, S | 5 |\n * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |\n * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |\n * | | | eo | 2nd, 3rd, ..., 1st | 5 |\n * | | | ee | 02, 03, ..., 01 | |\n * | | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | | eeeee | M, T, W, T, F, S, S | |\n * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |\n * | | | co | 2nd, 3rd, ..., 1st | 5 |\n * | | | cc | 02, 03, ..., 01 | |\n * | | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | | ccccc | M, T, W, T, F, S, S | |\n * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | 80 | a..aaa | AM, PM | |\n * | | | aaaa | a.m., p.m. | 2 |\n * | | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |\n * | | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | | bbbbb | a, p, n, mi | |\n * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |\n * | | | BBBB | at night, in the morning, ... | 2 |\n * | | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |\n * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |\n * | | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |\n * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |\n * | | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |\n * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |\n * | | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |\n * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |\n * | | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | 60 | m | 0, 1, ..., 59 | |\n * | | | mo | 0th, 1st, ..., 59th | 5 |\n * | | | mm | 00, 01, ..., 59 | |\n * | Second | 50 | s | 0, 1, ..., 59 | |\n * | | | so | 0th, 1st, ..., 59th | 5 |\n * | | | ss | 00, 01, ..., 59 | |\n * | Seconds timestamp | 40 | t | 512969520 | |\n * | | | tt | ... | 2 |\n * | Fraction of second | 30 | S | 0, 1, ..., 9 | |\n * | | | SS | 00, 01, ..., 99 | |\n * | | | SSS | 000, 001, ..., 999 | |\n * | | | SSSS | ... | 2 |\n * | Milliseconds timestamp | 20 | T | 512969520900 | |\n * | | | TT | ... | 2 |\n * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |\n * | | | XX | -0800, +0530, Z | |\n * | | | XXX | -08:00, +05:30, Z | |\n * | | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |\n * | | | xx | -0800, +0530, +0000 | |\n * | | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Long localized date | NA | P | 05/29/1453 | 5,8 |\n * | | | PP | May 29, 1453 | |\n * | | | PPP | May 29th, 1453 | |\n * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |\n * | Long localized time | NA | p | 12:00 AM | 5,8 |\n * | | | pp | 12:00:00 AM | |\n * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |\n * | | | PPpp | May 29, 1453, 12:00:00 AM | |\n * | | | PPPpp | May 29th, 1453 at ... | |\n * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular.\n * In `format` function, they will produce different result:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * `parse` will try to match both formatting and stand-alone units interchangably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table:\n * - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n * as wide as the sequence\n * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n * These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:\n *\n * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n * while `uu` will just assign the year as is:\n *\n * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [setISOWeekYear]{@link https://date-fns.org/docs/setISOWeekYear}\n * and [setWeekYear]{@link https://date-fns.org/docs/setWeekYear}).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr\n *\n * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr\n *\n * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based\n * on the given locale.\n *\n * using `en-US` locale: `P` => `MM/dd/yyyy`\n * using `en-US` locale: `p` => `hh:mm a`\n * using `pt-BR` locale: `P` => `dd/MM/yyyy`\n * using `pt-BR` locale: `p` => `HH:mm`\n *\n * Values will be assigned to the date in the descending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.\n *\n * `referenceDate` must be passed for correct work of the function.\n * If you're not sure which `referenceDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/dd/yyyy', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - Old `parse` was renamed to `toDate`.\n * Now `parse` is a new function which parses a string using a provided format.\n *\n * ```javascript\n * // Before v2.0.0\n * parse('2016-01-01')\n *\n * // v2.0.0 onward (toDate no longer accepts a string)\n * toDate(1392098430000) // Unix to timestamp\n * toDate(new Date(2014, 1, 11, 11, 30, 30)) // Cloning the date\n * parse('2016-01-01', 'yyyy-MM-dd', new Date())\n * ```\n *\n * @param {String} dateString - the string to parse\n * @param {String} formatString - the string of tokens\n * @param {Date|Number} referenceDate - defines values missing from the parsed dateString\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://git.io/fxCyr\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://git.io/fxCyr\n * @returns {Date} the parsed date\n * @throws {TypeError} 3 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.locale` must contain `match` property\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in Esperanto locale in the context of 2010 year:\n * import eo from 'date-fns/locale/eo'\n * var result = parse('28-a de februaro', \"do 'de' MMMM\", new Date(2010, 0, 1), {\n * locale: eo\n * })\n * //=> Sun Feb 28 2010 00:00:00\n */\n\nexport default function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, dirtyOptions) {\n requiredArgs(3, arguments);\n var dateString = String(dirtyDateString);\n var formatString = String(dirtyFormatString);\n var options = dirtyOptions || {};\n var locale = options.locale || defaultLocale;\n\n if (!locale.match) {\n throw new RangeError('locale must contain match property');\n }\n\n var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (formatString === '') {\n if (dateString === '') {\n return toDate(dirtyReferenceDate);\n } else {\n return new Date(NaN);\n }\n }\n\n var subFnOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale\n }; // If timezone isn't specified, it will be set to the system timezone\n\n var setters = [{\n priority: TIMEZONE_UNIT_PRIORITY,\n subPriority: -1,\n set: dateToSystemTimezone,\n index: 0\n }];\n var i;\n var tokens = formatString.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong, subFnOptions);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp);\n var usedTokens = [];\n\n for (i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n\n if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n\n var firstCharacter = token[0];\n var parser = parsers[firstCharacter];\n\n if (parser) {\n var incompatibleTokens = parser.incompatibleTokens;\n\n if (Array.isArray(incompatibleTokens)) {\n var incompatibleToken = void 0;\n\n for (var _i = 0; _i < usedTokens.length; _i++) {\n var usedToken = usedTokens[_i].token;\n\n if (incompatibleTokens.indexOf(usedToken) !== -1 || usedToken === firstCharacter) {\n incompatibleToken = usedTokens[_i];\n break;\n }\n }\n\n if (incompatibleToken) {\n throw new RangeError(\"The format string mustn't contain `\".concat(incompatibleToken.fullToken, \"` and `\").concat(token, \"` at the same time\"));\n }\n } else if (parser.incompatibleTokens === '*' && usedTokens.length) {\n throw new RangeError(\"The format string mustn't contain `\".concat(token, \"` and any other token at the same time\"));\n }\n\n usedTokens.push({\n token: firstCharacter,\n fullToken: token\n });\n var parseResult = parser.parse(dateString, token, locale.match, subFnOptions);\n\n if (!parseResult) {\n return new Date(NaN);\n }\n\n setters.push({\n priority: parser.priority,\n subPriority: parser.subPriority || 0,\n set: parser.set,\n validate: parser.validate,\n value: parseResult.value,\n index: setters.length\n });\n dateString = parseResult.rest;\n } else {\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n } // Replace two single quote characters with one single quote character\n\n\n if (token === \"''\") {\n token = \"'\";\n } else if (firstCharacter === \"'\") {\n token = cleanEscapedString(token);\n } // Cut token from string, or, if string doesn't match the token, return Invalid Date\n\n\n if (dateString.indexOf(token) === 0) {\n dateString = dateString.slice(token.length);\n } else {\n return new Date(NaN);\n }\n }\n } // Check if the remaining input contains something other than whitespace\n\n\n if (dateString.length > 0 && notWhitespaceRegExp.test(dateString)) {\n return new Date(NaN);\n }\n\n var uniquePrioritySetters = setters.map(function (setter) {\n return setter.priority;\n }).sort(function (a, b) {\n return b - a;\n }).filter(function (priority, index, array) {\n return array.indexOf(priority) === index;\n }).map(function (priority) {\n return setters.filter(function (setter) {\n return setter.priority === priority;\n }).sort(function (a, b) {\n return b.subPriority - a.subPriority;\n });\n }).map(function (setterArray) {\n return setterArray[0];\n });\n var date = toDate(dirtyReferenceDate);\n\n if (isNaN(date)) {\n return new Date(NaN);\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/37\n\n\n var utcDate = subMilliseconds(date, getTimezoneOffsetInMilliseconds(date));\n var flags = {};\n\n for (i = 0; i < uniquePrioritySetters.length; i++) {\n var setter = uniquePrioritySetters[i];\n\n if (setter.validate && !setter.validate(utcDate, setter.value, subFnOptions)) {\n return new Date(NaN);\n }\n\n var result = setter.set(utcDate, flags, setter.value, subFnOptions); // Result is tuple (date, flags)\n\n if (result[0]) {\n utcDate = result[0];\n assign(flags, result[1]); // Result is date\n } else {\n utcDate = result;\n }\n }\n\n return utcDate;\n}\n\nfunction dateToSystemTimezone(date, flags) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n var convertedDate = new Date(0);\n convertedDate.setFullYear(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n convertedDate.setHours(date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());\n return convertedDate;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}","import { millisecondsInHour, millisecondsInMinute } from \"../constants/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name parseISO\n * @category Common Helpers\n * @summary Parse ISO string\n *\n * @description\n * Parse the given string in ISO 8601 format and return an instance of Date.\n *\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument isn't a string, the function cannot parse the string or\n * the values are invalid, it returns Invalid Date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The previous `parse` implementation was renamed to `parseISO`.\n *\n * ```javascript\n * // Before v2.0.0\n * parse('2016-01-01')\n *\n * // v2.0.0 onward\n * parseISO('2016-01-01')\n * ```\n *\n * - `parseISO` now validates separate date and time values in ISO-8601 strings\n * and returns `Invalid Date` if the date is invalid.\n *\n * ```javascript\n * parseISO('2018-13-32')\n * //=> Invalid Date\n * ```\n *\n * - `parseISO` now doesn't fall back to `new Date` constructor\n * if it fails to parse a string argument. Instead, it returns `Invalid Date`.\n *\n * @param {String} argument - the value to convert\n * @param {Object} [options] - an object with options.\n * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = parseISO('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = parseISO('+02014101', { additionalDigits: 1 })\n * //=> Fri Apr 11 2014 00:00:00\n */\n\nexport default function parseISO(argument, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var additionalDigits = options.additionalDigits == null ? 2 : toInteger(options.additionalDigits);\n\n if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n throw new RangeError('additionalDigits must be 0, 1 or 2');\n }\n\n if (!(typeof argument === 'string' || Object.prototype.toString.call(argument) === '[object String]')) {\n return new Date(NaN);\n }\n\n var dateStrings = splitDateString(argument);\n var date;\n\n if (dateStrings.date) {\n var parseYearResult = parseYear(dateStrings.date, additionalDigits);\n date = parseDate(parseYearResult.restDateString, parseYearResult.year);\n }\n\n if (!date || isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n var timestamp = date.getTime();\n var time = 0;\n var offset;\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n\n if (isNaN(time)) {\n return new Date(NaN);\n }\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone);\n\n if (isNaN(offset)) {\n return new Date(NaN);\n }\n } else {\n var dirtyDate = new Date(timestamp + time); // js parsed string assuming it's in UTC timezone\n // but we need it to be parsed in our timezone\n // so we use utc values to build date in our timezone.\n // Year values from 0 to 99 map to the years 1900 to 1999\n // so set year explicitly with setFullYear.\n\n var result = new Date(0);\n result.setFullYear(dirtyDate.getUTCFullYear(), dirtyDate.getUTCMonth(), dirtyDate.getUTCDate());\n result.setHours(dirtyDate.getUTCHours(), dirtyDate.getUTCMinutes(), dirtyDate.getUTCSeconds(), dirtyDate.getUTCMilliseconds());\n return result;\n }\n\n return new Date(timestamp + time + offset);\n}\nvar patterns = {\n dateTimeDelimiter: /[T ]/,\n timeZoneDelimiter: /[Z ]/i,\n timezone: /([Z+-].*)$/\n};\nvar dateRegex = /^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/;\nvar timeRegex = /^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/;\nvar timezoneRegex = /^([+-])(\\d{2})(?::?(\\d{2}))?$/;\n\nfunction splitDateString(dateString) {\n var dateStrings = {};\n var array = dateString.split(patterns.dateTimeDelimiter);\n var timeString; // The regex match should only return at maximum two array elements.\n // [date], [time], or [date, time].\n\n if (array.length > 2) {\n return dateStrings;\n }\n\n if (/:/.test(array[0])) {\n timeString = array[0];\n } else {\n dateStrings.date = array[0];\n timeString = array[1];\n\n if (patterns.timeZoneDelimiter.test(dateStrings.date)) {\n dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];\n timeString = dateString.substr(dateStrings.date.length, dateString.length);\n }\n }\n\n if (timeString) {\n var token = patterns.timezone.exec(timeString);\n\n if (token) {\n dateStrings.time = timeString.replace(token[1], '');\n dateStrings.timezone = token[1];\n } else {\n dateStrings.time = timeString;\n }\n }\n\n return dateStrings;\n}\n\nfunction parseYear(dateString, additionalDigits) {\n var regex = new RegExp('^(?:(\\\\d{4}|[+-]\\\\d{' + (4 + additionalDigits) + '})|(\\\\d{2}|[+-]\\\\d{' + (2 + additionalDigits) + '})$)');\n var captures = dateString.match(regex); // Invalid ISO-formatted year\n\n if (!captures) return {\n year: NaN,\n restDateString: ''\n };\n var year = captures[1] ? parseInt(captures[1]) : null;\n var century = captures[2] ? parseInt(captures[2]) : null; // either year or century is null, not both\n\n return {\n year: century === null ? year : century * 100,\n restDateString: dateString.slice((captures[1] || captures[2]).length)\n };\n}\n\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) return new Date(NaN);\n var captures = dateString.match(dateRegex); // Invalid ISO-formatted string\n\n if (!captures) return new Date(NaN);\n var isWeekDate = !!captures[4];\n var dayOfYear = parseDateUnit(captures[1]);\n var month = parseDateUnit(captures[2]) - 1;\n var day = parseDateUnit(captures[3]);\n var week = parseDateUnit(captures[4]);\n var dayOfWeek = parseDateUnit(captures[5]) - 1;\n\n if (isWeekDate) {\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN);\n }\n\n return dayOfISOWeekYear(year, week, dayOfWeek);\n } else {\n var date = new Date(0);\n\n if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) {\n return new Date(NaN);\n }\n\n date.setUTCFullYear(year, month, Math.max(dayOfYear, day));\n return date;\n }\n}\n\nfunction parseDateUnit(value) {\n return value ? parseInt(value) : 1;\n}\n\nfunction parseTime(timeString) {\n var captures = timeString.match(timeRegex);\n if (!captures) return NaN; // Invalid ISO-formatted time\n\n var hours = parseTimeUnit(captures[1]);\n var minutes = parseTimeUnit(captures[2]);\n var seconds = parseTimeUnit(captures[3]);\n\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n\n return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1000;\n}\n\nfunction parseTimeUnit(value) {\n return value && parseFloat(value.replace(',', '.')) || 0;\n}\n\nfunction parseTimezone(timezoneString) {\n if (timezoneString === 'Z') return 0;\n var captures = timezoneString.match(timezoneRegex);\n if (!captures) return 0;\n var sign = captures[1] === '+' ? -1 : 1;\n var hours = parseInt(captures[2]);\n var minutes = captures[3] && parseInt(captures[3]) || 0;\n\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n\n return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);\n}\n\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n var date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n var fourthOfJanuaryDay = date.getUTCDay() || 7;\n var diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n} // Validation functions\n// February is null to handle the leap year (using ||)\n\n\nvar daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}\n\nfunction validateDate(year, month, date) {\n return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28));\n}\n\nfunction validateDayOfYearDate(year, dayOfYear) {\n return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);\n}\n\nfunction validateWeekDate(_year, week, day) {\n return week >= 1 && week <= 53 && day >= 0 && day <= 6;\n}\n\nfunction validateTime(hours, minutes, seconds) {\n if (hours === 24) {\n return minutes === 0 && seconds === 0;\n }\n\n return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25;\n}\n\nfunction validateTimezone(_hours, minutes) {\n return minutes >= 0 && minutes <= 59;\n}","import toDate from \"../toDate/index.js\";\nimport setMonth from \"../setMonth/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Object} values - an object with options\n * @param {Number} [values.year] - the number of years to be set\n * @param {Number} [values.month] - the number of months to be set\n * @param {Number} [values.date] - the number of days to be set\n * @param {Number} [values.hours] - the number of hours to be set\n * @param {Number} [values.minutes] - the number of minutes to be set\n * @param {Number} [values.seconds] - the number of seconds to be set\n * @param {Number} [values.milliseconds] - the number of milliseconds to be set\n * @returns {Date} the new date with options set\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `values` must be an object\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * var result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * var result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\nexport default function set(dirtyDate, values) {\n requiredArgs(2, arguments);\n\n if (typeof values !== 'object' || values === null) {\n throw new RangeError('values parameter must be an object');\n }\n\n var date = toDate(dirtyDate); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n if (values.year != null) {\n date.setFullYear(values.year);\n }\n\n if (values.month != null) {\n date = setMonth(date, values.month);\n }\n\n if (values.date != null) {\n date.setDate(toInteger(values.date));\n }\n\n if (values.hours != null) {\n date.setHours(toInteger(values.hours));\n }\n\n if (values.minutes != null) {\n date.setMinutes(toInteger(values.minutes));\n }\n\n if (values.seconds != null) {\n date.setSeconds(toInteger(values.seconds));\n }\n\n if (values.milliseconds != null) {\n date.setMilliseconds(toInteger(values.milliseconds));\n }\n\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setHours\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} hours - the hours of the new date\n * @returns {Date} the new date with the hours set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * var result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\n\nexport default function setHours(dirtyDate, dirtyHours) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var hours = toInteger(dirtyHours);\n date.setHours(hours);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMinutes\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} minutes - the minutes of the new date\n * @returns {Date} the new date with the minutes set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\n\nexport default function setMinutes(dirtyDate, dirtyMinutes) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var minutes = toInteger(dirtyMinutes);\n date.setMinutes(minutes);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport setMonth from \"../setMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setQuarter\n * @category Quarter Helpers\n * @summary Set the year quarter to the given date.\n *\n * @description\n * Set the year quarter to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} quarter - the quarter of the new date\n * @returns {Date} the new date with the quarter set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set the 2nd quarter to 2 July 2014:\n * const result = setQuarter(new Date(2014, 6, 2), 2)\n * //=> Wed Apr 02 2014 00:00:00\n */\n\nexport default function setQuarter(dirtyDate, dirtyQuarter) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var quarter = toInteger(dirtyQuarter);\n var oldQuarter = Math.floor(date.getMonth() / 3) + 1;\n var diff = quarter - oldQuarter;\n return setMonth(date, date.getMonth() + diff * 3);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setSeconds\n * @category Second Helpers\n * @summary Set the seconds to the given date.\n *\n * @description\n * Set the seconds to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} seconds - the seconds of the new date\n * @returns {Date} the new date with the seconds set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\n\nexport default function setSeconds(dirtyDate, dirtySeconds) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var seconds = toInteger(dirtySeconds);\n date.setSeconds(seconds);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\n\nexport default function setYear(dirtyDate, dirtyYear) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var year = toInteger(dirtyYear); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n date.setFullYear(year);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\n\nexport default function startOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfQuarter\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a quarter\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\n\nexport default function startOfQuarter(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var currentMonth = date.getMonth();\n var month = currentMonth - currentMonth % 3;\n date.setMonth(month, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfWeek(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setDate(date.getDate() - diff);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\n\nexport default function startOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var cleanDate = toDate(dirtyDate);\n var date = new Date(0);\n date.setFullYear(cleanDate.getFullYear(), 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the days subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\n\nexport default function subDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addDays(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addHours from \"../addHours/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subHours\n * @category Hour Helpers\n * @summary Subtract the specified number of hours from the given date.\n *\n * @description\n * Subtract the specified number of hours from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of hours to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the hours subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 2 hours from 11 July 2014 01:00:00:\n * const result = subHours(new Date(2014, 6, 11, 1, 0), 2)\n * //=> Thu Jul 10 2014 23:00:00\n */\n\nexport default function subHours(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addHours(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMinutes from \"../addMinutes/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMinutes\n * @category Minute Helpers\n * @summary Subtract the specified number of minutes from the given date.\n *\n * @description\n * Subtract the specified number of minutes from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the minutes subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 30 minutes from 10 July 2014 12:00:00:\n * const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 11:30:00\n */\n\nexport default function subMinutes(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMinutes(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function subMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addQuarters from \"../addQuarters/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subQuarters\n * @category Quarter Helpers\n * @summary Subtract the specified number of year quarters from the given date.\n *\n * @description\n * Subtract the specified number of year quarters from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of quarters to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the quarters subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 3 quarters from 1 September 2014:\n * const result = subQuarters(new Date(2014, 8, 1), 3)\n * //=> Sun Dec 01 2013 00:00:00\n */\n\nexport default function subQuarters(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addQuarters(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addWeeks from \"../addWeeks/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subWeeks\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * const result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\n\nexport default function subWeeks(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addWeeks(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addYears from \"../addYears/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\n\nexport default function subYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addYears(dirtyDate, -amount);\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}","var objectKeys = require('object-keys');\nvar isArguments = require('is-arguments');\nvar is = require('object-is');\nvar isRegex = require('is-regex');\nvar flags = require('regexp.prototype.flags');\nvar isDate = require('is-date-object');\n\nvar getTime = Date.prototype.getTime;\n\nfunction deepEqual(actual, expected, options) {\n var opts = options || {};\n\n // 7.1. All identical values are equivalent, as determined by ===.\n if (opts.strict ? is(actual, expected) : actual === expected) {\n return true;\n }\n\n // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.\n if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {\n return opts.strict ? is(actual, expected) : actual == expected;\n }\n\n /*\n * 7.4. For all other Object pairs, including Array objects, equivalence is\n * determined by having the same number of owned properties (as verified\n * with Object.prototype.hasOwnProperty.call), the same set of keys\n * (although not necessarily the same order), equivalent values for every\n * corresponding key, and an identical 'prototype' property. Note: this\n * accounts for both named and indexed properties on Arrays.\n */\n // eslint-disable-next-line no-use-before-define\n return objEquiv(actual, expected, opts);\n}\n\nfunction isUndefinedOrNull(value) {\n return value === null || value === undefined;\n}\n\nfunction isBuffer(x) {\n if (!x || typeof x !== 'object' || typeof x.length !== 'number') {\n return false;\n }\n if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {\n return false;\n }\n if (x.length > 0 && typeof x[0] !== 'number') {\n return false;\n }\n return true;\n}\n\nfunction objEquiv(a, b, opts) {\n /* eslint max-statements: [2, 50] */\n var i, key;\n if (typeof a !== typeof b) { return false; }\n if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) { return false; }\n\n // an identical 'prototype' property.\n if (a.prototype !== b.prototype) { return false; }\n\n if (isArguments(a) !== isArguments(b)) { return false; }\n\n var aIsRegex = isRegex(a);\n var bIsRegex = isRegex(b);\n if (aIsRegex !== bIsRegex) { return false; }\n if (aIsRegex || bIsRegex) {\n return a.source === b.source && flags(a) === flags(b);\n }\n\n if (isDate(a) && isDate(b)) {\n return getTime.call(a) === getTime.call(b);\n }\n\n var aIsBuffer = isBuffer(a);\n var bIsBuffer = isBuffer(b);\n if (aIsBuffer !== bIsBuffer) { return false; }\n if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here\n if (a.length !== b.length) { return false; }\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) { return false; }\n }\n return true;\n }\n\n if (typeof a !== typeof b) { return false; }\n\n try {\n var ka = objectKeys(a);\n var kb = objectKeys(b);\n } catch (e) { // happens when one is a string literal and the other isn't\n return false;\n }\n // having the same number of owned properties (keys incorporates hasOwnProperty)\n if (ka.length !== kb.length) { return false; }\n\n // the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n // ~~~cheap key test\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] != kb[i]) { return false; }\n }\n // equivalent values for every corresponding key, and ~~~possibly expensive deep test\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], opts)) { return false; }\n }\n\n return true;\n}\n\nmodule.exports = deepEqual;\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\n\nvar gopd = require('gopd');\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","module.exports = require('./lib/dom-scroll-into-view');\n","var util = require('./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 var allowHorizontalScroll = config.allowHorizontalScroll;\n var onlyScrollIfNeeded = config.onlyScrollIfNeeded;\n var alignWithTop = config.alignWithTop;\n var alignWithLeft = config.alignWithLeft;\n\n allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll;\n\n var isWin = util.isWindow(container);\n var elemOffset = util.offset(elem);\n var eh = util.outerHeight(elem);\n var ew = util.outerWidth(elem);\n var containerOffset, ch, cw, containerScroll,\n diffTop, diffBottom, win,\n winScroll, ww, 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,\n top: elemOffset.top - winScroll.top\n };\n diffBottom = {\n left: elemOffset.left + ew - (winScroll.left + ww),\n top: elemOffset.top + eh - (winScroll.top + wh)\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: elemOffset.left - (containerOffset.left +\n (parseFloat(util.css(container, 'borderLeftWidth')) || 0)),\n top: elemOffset.top - (containerOffset.top +\n (parseFloat(util.css(container, 'borderTopWidth')) || 0))\n };\n diffBottom = {\n left: elemOffset.left + ew -\n (containerOffset.left + cw +\n (parseFloat(util.css(container, 'borderRightWidth')) || 0)),\n top: elemOffset.top + eh -\n (containerOffset.top + ch +\n (parseFloat(util.css(container, 'borderBottomWidth')) || 0))\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\nmodule.exports = scrollIntoView;\n","var RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\n\nfunction getClientPosition(elem) {\n var box, x, y;\n var doc = elem.ownerDocument;\n var body = doc.body;\n var 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 {left: x, top: y};\n}\n\nfunction getScroll(w, top) {\n var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];\n var method = 'scroll' + (top ? 'Top' : 'Left');\n if (typeof ret !== 'number') {\n var 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 var pos = getClientPosition(el);\n var doc = el.ownerDocument;\n var 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 var val = '';\n var d = elem.ownerDocument;\n\n // https://github.com/kissyteam/kissy/issues/61\n if ((computedStyle = (computedStyle || d.defaultView.getComputedStyle(elem, null)))) {\n val = computedStyle.getPropertyValue(name) || computedStyle[name];\n }\n\n return val;\n}\n\nvar _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');\nvar RE_POS = /^(top|right|bottom|left)$/,\n CURRENT_STYLE = 'currentStyle',\n RUNTIME_STYLE = 'runtimeStyle',\n LEFT = 'left',\n PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n // currentStyle maybe null\n // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n var 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 var style = elem.style,\n left = style[LEFT],\n 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\nvar getComputedStyleX;\nif (typeof window !== 'undefined') {\n getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;\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 var old = getOffset(elem),\n ret = {},\n current, key;\n\n for (key in offset) {\n current = parseFloat(css(elem, key)) || 0;\n ret[key] = current + offset[key] - old[key];\n }\n css(elem, ret);\n}\n\nfunction each(arr, fn) {\n for (var 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\nvar BOX_MODELS = ['margin', 'border', 'padding'],\n CONTENT_INDEX = -1,\n PADDING_INDEX = 2,\n BORDER_INDEX = 1,\n MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n var old = {},\n style = elem.style,\n name;\n\n // Remember the old values, and insert the new ones\n for (name in options) {\n old[name] = style[name];\n style[name] = options[name];\n }\n\n callback.call(elem);\n\n // Revert the old values\n for (name in options) {\n style[name] = old[name];\n }\n}\n\nfunction getPBMWidth(elem, props, which) {\n var value = 0, prop, j, 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 var 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 /*jshint eqeqeq:false*/\n return obj != null && obj == obj.window;\n}\n\nvar domUtils = {};\n\neach(['Width', 'Height'], function (name) {\n domUtils['doc' + name] = function (refWin) {\n var 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 domUtils['viewport' + name] = function (win) {\n // pc browser includes scrollbar in window.innerWidth\n var prop = 'client' + name,\n doc = win.document,\n body = doc.body,\n documentElement = doc.documentElement,\n documentElementProp = documentElement[prop];\n // 标准模式取 documentElement\n // backcompat 取 body\n return doc.compatMode === 'CSS1Compat' && documentElementProp ||\n body && body[prop] || documentElementProp;\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' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);\n } else if (elem.nodeType === 9) {\n return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);\n }\n var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'],\n borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;\n var computedStyle = getComputedStyleX(elem);\n var isBorderBox = isBorderBoxFn(elem, computedStyle);\n var 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 var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;\n var val = borderBoxValue || cssBoxValue;\n if (extra === CONTENT_INDEX) {\n if (borderBoxValueOrIsBorderBox) {\n return val - getPBMWidth(elem, ['border', 'padding'],\n which, computedStyle);\n } else {\n return cssBoxValue;\n }\n } else if (borderBoxValueOrIsBorderBox) {\n return val + (extra === BORDER_INDEX ? 0 :\n (extra === PADDING_INDEX ?\n -getPBMWidth(elem, ['border'], which, computedStyle) :\n getPBMWidth(elem, ['margin'], which, computedStyle)));\n } else {\n return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra),\n which, computedStyle);\n }\n}\n\nvar cssShow = {position: 'absolute', visibility: 'hidden', display: 'block'};\n\n// fix #119 : https://github.com/kissyteam/kissy/issues/119\nfunction getWHIgnoreDisplay(elem) {\n var val, 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, function () {\n val = getWH.apply(undefined, args);\n });\n }\n return val;\n}\n\neach(['width', 'height'], function (name) {\n var first = name.charAt(0).toUpperCase() + name.slice(1);\n domUtils['outer' + first] = function (el, includeMargin) {\n return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);\n };\n var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n domUtils[name] = function (elem, val) {\n if (val !== undefined) {\n if (elem) {\n var computedStyle = getComputedStyleX(elem);\n var isBorderBox = isBorderBoxFn(elem);\n if (isBorderBox) {\n val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);\n }\n return css(elem, name, val);\n }\n return;\n }\n return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n };\n});\n\nfunction css(el, name, value) {\n if (typeof name === 'object') {\n for (var i in name) {\n css(el, i, name[i]);\n }\n return;\n }\n if (typeof value !== 'undefined') {\n if (typeof value === 'number') {\n value = value + 'px';\n }\n el.style[name] = value;\n } else {\n return getComputedStyleX(el, name);\n }\n}\n\nfunction mix(to, from) {\n for (var i in from) {\n to[i] = from[i];\n }\n return to;\n}\n\nvar utils = module.exports = {\n getWindow: function (node) {\n var doc = node.ownerDocument || node;\n return doc.defaultView || doc.parentWindow;\n },\n offset: function (el, value) {\n if (typeof value !== 'undefined') {\n setOffset(el, value);\n } else {\n return getOffset(el);\n }\n },\n isWindow: isWindow,\n each: each,\n css: css,\n clone: function (obj) {\n var ret = {};\n for (var i in obj) {\n ret[i] = obj[i];\n }\n var overflow = obj.overflow;\n if (overflow) {\n for (i in obj) {\n ret.overflow[i] = obj.overflow[i];\n }\n }\n return ret;\n },\n mix: mix,\n scrollLeft: function (w, v) {\n if (isWindow(w)) {\n if (v === undefined) {\n return getScrollLeft(w);\n } else {\n window.scrollTo(v, getScrollTop(w));\n }\n } else {\n if (v === undefined) {\n return w.scrollLeft;\n } else {\n w.scrollLeft = v;\n }\n }\n },\n scrollTop: function (w, v) {\n if (isWindow(w)) {\n if (v === undefined) {\n return getScrollTop(w);\n } else {\n window.scrollTo(getScrollLeft(w), v);\n }\n } else {\n if (v === undefined) {\n return w.scrollTop;\n } else {\n w.scrollTop = v;\n }\n }\n },\n merge: function () {\n var ret = {};\n for (var i = 0; i < arguments.length; i++) {\n utils.mix(ret, arguments[i]);\n }\n return ret;\n },\n viewportWidth: 0,\n viewportHeight: 0\n};\n\nmix(utils, domUtils);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.attributeNames = exports.elementNames = void 0;\nexports.elementNames = new Map([\n [\"altglyph\", \"altGlyph\"],\n [\"altglyphdef\", \"altGlyphDef\"],\n [\"altglyphitem\", \"altGlyphItem\"],\n [\"animatecolor\", \"animateColor\"],\n [\"animatemotion\", \"animateMotion\"],\n [\"animatetransform\", \"animateTransform\"],\n [\"clippath\", \"clipPath\"],\n [\"feblend\", \"feBlend\"],\n [\"fecolormatrix\", \"feColorMatrix\"],\n [\"fecomponenttransfer\", \"feComponentTransfer\"],\n [\"fecomposite\", \"feComposite\"],\n [\"feconvolvematrix\", \"feConvolveMatrix\"],\n [\"fediffuselighting\", \"feDiffuseLighting\"],\n [\"fedisplacementmap\", \"feDisplacementMap\"],\n [\"fedistantlight\", \"feDistantLight\"],\n [\"fedropshadow\", \"feDropShadow\"],\n [\"feflood\", \"feFlood\"],\n [\"fefunca\", \"feFuncA\"],\n [\"fefuncb\", \"feFuncB\"],\n [\"fefuncg\", \"feFuncG\"],\n [\"fefuncr\", \"feFuncR\"],\n [\"fegaussianblur\", \"feGaussianBlur\"],\n [\"feimage\", \"feImage\"],\n [\"femerge\", \"feMerge\"],\n [\"femergenode\", \"feMergeNode\"],\n [\"femorphology\", \"feMorphology\"],\n [\"feoffset\", \"feOffset\"],\n [\"fepointlight\", \"fePointLight\"],\n [\"fespecularlighting\", \"feSpecularLighting\"],\n [\"fespotlight\", \"feSpotLight\"],\n [\"fetile\", \"feTile\"],\n [\"feturbulence\", \"feTurbulence\"],\n [\"foreignobject\", \"foreignObject\"],\n [\"glyphref\", \"glyphRef\"],\n [\"lineargradient\", \"linearGradient\"],\n [\"radialgradient\", \"radialGradient\"],\n [\"textpath\", \"textPath\"],\n]);\nexports.attributeNames = new Map([\n [\"definitionurl\", \"definitionURL\"],\n [\"attributename\", \"attributeName\"],\n [\"attributetype\", \"attributeType\"],\n [\"basefrequency\", \"baseFrequency\"],\n [\"baseprofile\", \"baseProfile\"],\n [\"calcmode\", \"calcMode\"],\n [\"clippathunits\", \"clipPathUnits\"],\n [\"diffuseconstant\", \"diffuseConstant\"],\n [\"edgemode\", \"edgeMode\"],\n [\"filterunits\", \"filterUnits\"],\n [\"glyphref\", \"glyphRef\"],\n [\"gradienttransform\", \"gradientTransform\"],\n [\"gradientunits\", \"gradientUnits\"],\n [\"kernelmatrix\", \"kernelMatrix\"],\n [\"kernelunitlength\", \"kernelUnitLength\"],\n [\"keypoints\", \"keyPoints\"],\n [\"keysplines\", \"keySplines\"],\n [\"keytimes\", \"keyTimes\"],\n [\"lengthadjust\", \"lengthAdjust\"],\n [\"limitingconeangle\", \"limitingConeAngle\"],\n [\"markerheight\", \"markerHeight\"],\n [\"markerunits\", \"markerUnits\"],\n [\"markerwidth\", \"markerWidth\"],\n [\"maskcontentunits\", \"maskContentUnits\"],\n [\"maskunits\", \"maskUnits\"],\n [\"numoctaves\", \"numOctaves\"],\n [\"pathlength\", \"pathLength\"],\n [\"patterncontentunits\", \"patternContentUnits\"],\n [\"patterntransform\", \"patternTransform\"],\n [\"patternunits\", \"patternUnits\"],\n [\"pointsatx\", \"pointsAtX\"],\n [\"pointsaty\", \"pointsAtY\"],\n [\"pointsatz\", \"pointsAtZ\"],\n [\"preservealpha\", \"preserveAlpha\"],\n [\"preserveaspectratio\", \"preserveAspectRatio\"],\n [\"primitiveunits\", \"primitiveUnits\"],\n [\"refx\", \"refX\"],\n [\"refy\", \"refY\"],\n [\"repeatcount\", \"repeatCount\"],\n [\"repeatdur\", \"repeatDur\"],\n [\"requiredextensions\", \"requiredExtensions\"],\n [\"requiredfeatures\", \"requiredFeatures\"],\n [\"specularconstant\", \"specularConstant\"],\n [\"specularexponent\", \"specularExponent\"],\n [\"spreadmethod\", \"spreadMethod\"],\n [\"startoffset\", \"startOffset\"],\n [\"stddeviation\", \"stdDeviation\"],\n [\"stitchtiles\", \"stitchTiles\"],\n [\"surfacescale\", \"surfaceScale\"],\n [\"systemlanguage\", \"systemLanguage\"],\n [\"tablevalues\", \"tableValues\"],\n [\"targetx\", \"targetX\"],\n [\"targety\", \"targetY\"],\n [\"textlength\", \"textLength\"],\n [\"viewbox\", \"viewBox\"],\n [\"viewtarget\", \"viewTarget\"],\n [\"xchannelselector\", \"xChannelSelector\"],\n [\"ychannelselector\", \"yChannelSelector\"],\n [\"zoomandpan\", \"zoomAndPan\"],\n]);\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Module dependencies\n */\nvar ElementType = __importStar(require(\"domelementtype\"));\nvar entities_1 = require(\"entities\");\n/**\n * Mixed-case SVG and MathML tags & attributes\n * recognized by the HTML parser.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign\n */\nvar foreignNames_1 = require(\"./foreignNames\");\nvar unencodedElements = new Set([\n \"style\",\n \"script\",\n \"xmp\",\n \"iframe\",\n \"noembed\",\n \"noframes\",\n \"plaintext\",\n \"noscript\",\n]);\n/**\n * Format attributes\n */\nfunction formatAttributes(attributes, opts) {\n if (!attributes)\n return;\n return Object.keys(attributes)\n .map(function (key) {\n var _a, _b;\n var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : \"\";\n if (opts.xmlMode === \"foreign\") {\n /* Fix up mixed-case attribute names */\n key = (_b = foreignNames_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;\n }\n if (!opts.emptyAttrs && !opts.xmlMode && value === \"\") {\n return key;\n }\n return key + \"=\\\"\" + (opts.decodeEntities !== false\n ? entities_1.encodeXML(value)\n : value.replace(/\"/g, \""\")) + \"\\\"\";\n })\n .join(\" \");\n}\n/**\n * Self-enclosing tags\n */\nvar singleTag = new Set([\n \"area\",\n \"base\",\n \"basefont\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"frame\",\n \"hr\",\n \"img\",\n \"input\",\n \"isindex\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\n/**\n * Renders a DOM node or an array of DOM nodes to a string.\n *\n * Can be thought of as the equivalent of the `outerHTML` of the passed node(s).\n *\n * @param node Node to be rendered.\n * @param options Changes serialization behavior\n */\nfunction render(node, options) {\n if (options === void 0) { options = {}; }\n var nodes = \"length\" in node ? node : [node];\n var output = \"\";\n for (var i = 0; i < nodes.length; i++) {\n output += renderNode(nodes[i], options);\n }\n return output;\n}\nexports.default = render;\nfunction renderNode(node, options) {\n switch (node.type) {\n case ElementType.Root:\n return render(node.children, options);\n case ElementType.Directive:\n case ElementType.Doctype:\n return renderDirective(node);\n case ElementType.Comment:\n return renderComment(node);\n case ElementType.CDATA:\n return renderCdata(node);\n case ElementType.Script:\n case ElementType.Style:\n case ElementType.Tag:\n return renderTag(node, options);\n case ElementType.Text:\n return renderText(node, options);\n }\n}\nvar foreignModeIntegrationPoints = new Set([\n \"mi\",\n \"mo\",\n \"mn\",\n \"ms\",\n \"mtext\",\n \"annotation-xml\",\n \"foreignObject\",\n \"desc\",\n \"title\",\n]);\nvar foreignElements = new Set([\"svg\", \"math\"]);\nfunction renderTag(elem, opts) {\n var _a;\n // Handle SVG / MathML in HTML\n if (opts.xmlMode === \"foreign\") {\n /* Fix up mixed-case element names */\n elem.name = (_a = foreignNames_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;\n /* Exit foreign mode at integration points */\n if (elem.parent &&\n foreignModeIntegrationPoints.has(elem.parent.name)) {\n opts = __assign(__assign({}, opts), { xmlMode: false });\n }\n }\n if (!opts.xmlMode && foreignElements.has(elem.name)) {\n opts = __assign(__assign({}, opts), { xmlMode: \"foreign\" });\n }\n var tag = \"<\" + elem.name;\n var attribs = formatAttributes(elem.attribs, opts);\n if (attribs) {\n tag += \" \" + attribs;\n }\n if (elem.children.length === 0 &&\n (opts.xmlMode\n ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags\n opts.selfClosingTags !== false\n : // User explicitly asked for self-closing tags, even in HTML mode\n opts.selfClosingTags && singleTag.has(elem.name))) {\n if (!opts.xmlMode)\n tag += \" \";\n tag += \"/>\";\n }\n else {\n tag += \">\";\n if (elem.children.length > 0) {\n tag += render(elem.children, opts);\n }\n if (opts.xmlMode || !singleTag.has(elem.name)) {\n tag += \"\";\n }\n }\n return tag;\n}\nfunction renderDirective(elem) {\n return \"<\" + elem.data + \">\";\n}\nfunction renderText(elem, opts) {\n var data = elem.data || \"\";\n // If entities weren't decoded, no need to encode them back\n if (opts.decodeEntities !== false &&\n !(!opts.xmlMode &&\n elem.parent &&\n unencodedElements.has(elem.parent.name))) {\n data = entities_1.encodeXML(data);\n }\n return data;\n}\nfunction renderCdata(elem) {\n return \"\";\n}\nfunction renderComment(elem) {\n return \"\";\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.attributeNames = exports.elementNames = void 0;\nexports.elementNames = new Map([\n \"altGlyph\",\n \"altGlyphDef\",\n \"altGlyphItem\",\n \"animateColor\",\n \"animateMotion\",\n \"animateTransform\",\n \"clipPath\",\n \"feBlend\",\n \"feColorMatrix\",\n \"feComponentTransfer\",\n \"feComposite\",\n \"feConvolveMatrix\",\n \"feDiffuseLighting\",\n \"feDisplacementMap\",\n \"feDistantLight\",\n \"feDropShadow\",\n \"feFlood\",\n \"feFuncA\",\n \"feFuncB\",\n \"feFuncG\",\n \"feFuncR\",\n \"feGaussianBlur\",\n \"feImage\",\n \"feMerge\",\n \"feMergeNode\",\n \"feMorphology\",\n \"feOffset\",\n \"fePointLight\",\n \"feSpecularLighting\",\n \"feSpotLight\",\n \"feTile\",\n \"feTurbulence\",\n \"foreignObject\",\n \"glyphRef\",\n \"linearGradient\",\n \"radialGradient\",\n \"textPath\",\n].map(function (val) { return [val.toLowerCase(), val]; }));\nexports.attributeNames = new Map([\n \"definitionURL\",\n \"attributeName\",\n \"attributeType\",\n \"baseFrequency\",\n \"baseProfile\",\n \"calcMode\",\n \"clipPathUnits\",\n \"diffuseConstant\",\n \"edgeMode\",\n \"filterUnits\",\n \"glyphRef\",\n \"gradientTransform\",\n \"gradientUnits\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keyPoints\",\n \"keySplines\",\n \"keyTimes\",\n \"lengthAdjust\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerUnits\",\n \"markerWidth\",\n \"maskContentUnits\",\n \"maskUnits\",\n \"numOctaves\",\n \"pathLength\",\n \"patternContentUnits\",\n \"patternTransform\",\n \"patternUnits\",\n \"pointsAtX\",\n \"pointsAtY\",\n \"pointsAtZ\",\n \"preserveAlpha\",\n \"preserveAspectRatio\",\n \"primitiveUnits\",\n \"refX\",\n \"refY\",\n \"repeatCount\",\n \"repeatDur\",\n \"requiredExtensions\",\n \"requiredFeatures\",\n \"specularConstant\",\n \"specularExponent\",\n \"spreadMethod\",\n \"startOffset\",\n \"stdDeviation\",\n \"stitchTiles\",\n \"surfaceScale\",\n \"systemLanguage\",\n \"tableValues\",\n \"targetX\",\n \"targetY\",\n \"textLength\",\n \"viewBox\",\n \"viewTarget\",\n \"xChannelSelector\",\n \"yChannelSelector\",\n \"zoomAndPan\",\n].map(function (val) { return [val.toLowerCase(), val]; }));\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.render = void 0;\n/*\n * Module dependencies\n */\nvar ElementType = __importStar(require(\"domelementtype\"));\nvar entities_1 = require(\"entities\");\n/**\n * Mixed-case SVG and MathML tags & attributes\n * recognized by the HTML parser.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign\n */\nvar foreignNames_js_1 = require(\"./foreignNames.js\");\nvar unencodedElements = new Set([\n \"style\",\n \"script\",\n \"xmp\",\n \"iframe\",\n \"noembed\",\n \"noframes\",\n \"plaintext\",\n \"noscript\",\n]);\nfunction replaceQuotes(value) {\n return value.replace(/\"/g, \""\");\n}\n/**\n * Format attributes\n */\nfunction formatAttributes(attributes, opts) {\n var _a;\n if (!attributes)\n return;\n var encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false\n ? replaceQuotes\n : opts.xmlMode || opts.encodeEntities !== \"utf8\"\n ? entities_1.encodeXML\n : entities_1.escapeAttribute;\n return Object.keys(attributes)\n .map(function (key) {\n var _a, _b;\n var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : \"\";\n if (opts.xmlMode === \"foreign\") {\n /* Fix up mixed-case attribute names */\n key = (_b = foreignNames_js_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;\n }\n if (!opts.emptyAttrs && !opts.xmlMode && value === \"\") {\n return key;\n }\n return \"\".concat(key, \"=\\\"\").concat(encode(value), \"\\\"\");\n })\n .join(\" \");\n}\n/**\n * Self-enclosing tags\n */\nvar singleTag = new Set([\n \"area\",\n \"base\",\n \"basefont\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"frame\",\n \"hr\",\n \"img\",\n \"input\",\n \"isindex\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\n/**\n * Renders a DOM node or an array of DOM nodes to a string.\n *\n * Can be thought of as the equivalent of the `outerHTML` of the passed node(s).\n *\n * @param node Node to be rendered.\n * @param options Changes serialization behavior\n */\nfunction render(node, options) {\n if (options === void 0) { options = {}; }\n var nodes = \"length\" in node ? node : [node];\n var output = \"\";\n for (var i = 0; i < nodes.length; i++) {\n output += renderNode(nodes[i], options);\n }\n return output;\n}\nexports.render = render;\nexports.default = render;\nfunction renderNode(node, options) {\n switch (node.type) {\n case ElementType.Root:\n return render(node.children, options);\n // @ts-expect-error We don't use `Doctype` yet\n case ElementType.Doctype:\n case ElementType.Directive:\n return renderDirective(node);\n case ElementType.Comment:\n return renderComment(node);\n case ElementType.CDATA:\n return renderCdata(node);\n case ElementType.Script:\n case ElementType.Style:\n case ElementType.Tag:\n return renderTag(node, options);\n case ElementType.Text:\n return renderText(node, options);\n }\n}\nvar foreignModeIntegrationPoints = new Set([\n \"mi\",\n \"mo\",\n \"mn\",\n \"ms\",\n \"mtext\",\n \"annotation-xml\",\n \"foreignObject\",\n \"desc\",\n \"title\",\n]);\nvar foreignElements = new Set([\"svg\", \"math\"]);\nfunction renderTag(elem, opts) {\n var _a;\n // Handle SVG / MathML in HTML\n if (opts.xmlMode === \"foreign\") {\n /* Fix up mixed-case element names */\n elem.name = (_a = foreignNames_js_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;\n /* Exit foreign mode at integration points */\n if (elem.parent &&\n foreignModeIntegrationPoints.has(elem.parent.name)) {\n opts = __assign(__assign({}, opts), { xmlMode: false });\n }\n }\n if (!opts.xmlMode && foreignElements.has(elem.name)) {\n opts = __assign(__assign({}, opts), { xmlMode: \"foreign\" });\n }\n var tag = \"<\".concat(elem.name);\n var attribs = formatAttributes(elem.attribs, opts);\n if (attribs) {\n tag += \" \".concat(attribs);\n }\n if (elem.children.length === 0 &&\n (opts.xmlMode\n ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags\n opts.selfClosingTags !== false\n : // User explicitly asked for self-closing tags, even in HTML mode\n opts.selfClosingTags && singleTag.has(elem.name))) {\n if (!opts.xmlMode)\n tag += \" \";\n tag += \"/>\";\n }\n else {\n tag += \">\";\n if (elem.children.length > 0) {\n tag += render(elem.children, opts);\n }\n if (opts.xmlMode || !singleTag.has(elem.name)) {\n tag += \"\");\n }\n }\n return tag;\n}\nfunction renderDirective(elem) {\n return \"<\".concat(elem.data, \">\");\n}\nfunction renderText(elem, opts) {\n var _a;\n var data = elem.data || \"\";\n // If entities weren't decoded, no need to encode them back\n if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false &&\n !(!opts.xmlMode &&\n elem.parent &&\n unencodedElements.has(elem.parent.name))) {\n data =\n opts.xmlMode || opts.encodeEntities !== \"utf8\"\n ? (0, entities_1.encodeXML)(data)\n : (0, entities_1.escapeText)(data);\n }\n return data;\n}\nfunction renderCdata(elem) {\n return \"\");\n}\nfunction renderComment(elem) {\n return \"\");\n}\n","(function(global) {\n 'use strict';\n\n var util = newUtil();\n var inliner = newInliner();\n var fontFaces = newFontFaces();\n var images = newImages();\n\n // Default impl options\n var defaultOptions = {\n // Default is to fail on error, no placeholder\n imagePlaceholder: undefined,\n // Default cache bust is false, it will use the cache\n cacheBust: false,\n // Use (existing) authentication credentials for external URIs (CORS requests)\n useCredentials: false\n };\n\n var domtoimage = {\n toSvg: toSvg,\n toPng: toPng,\n toJpeg: toJpeg,\n toBlob: toBlob,\n toPixelData: toPixelData,\n toCanvas: toCanvas,\n impl: {\n fontFaces: fontFaces,\n images: images,\n util: util,\n inliner: inliner,\n options: {}\n }\n };\n\n if (typeof exports === \"object\" && typeof module === \"object\")\n module.exports = domtoimage;\n else\n global.domtoimage = domtoimage;\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options\n * @param {Function} options.filter - Should return true if passed node should be included in the output\n * (excluding node means excluding it's children as well). Not called on the root node.\n * @param {String} options.bgcolor - color for the background, any valid CSS color value.\n * @param {Number} options.width - width to be applied to node before rendering.\n * @param {Number} options.height - height to be applied to node before rendering.\n * @param {Object} options.style - an object whose properties to be copied to node's style before rendering.\n * @param {Number} options.quality - a Number between 0 and 1 indicating image quality (applicable to JPEG only),\n defaults to 1.0.\n * @param {Number} options.scale - a Number multiplier to scale up the canvas before rendering to reduce fuzzy images, defaults to 1.0.\n * @param {String} options.imagePlaceholder - dataURL to use as a placeholder for failed images, default behaviour is to fail fast on images we can't fetch\n * @param {Boolean} options.cacheBust - set to true to cache bust by appending the time to the request url\n * @return {Promise} - A promise that is fulfilled with a SVG image data URL\n * */\n function toSvg(node, options) {\n options = options || {};\n copyOptions(options);\n return Promise.resolve(node)\n .then(function(node) {\n return cloneNode(node, options.filter, true);\n })\n .then(embedFonts)\n .then(inlineImages)\n .then(applyOptions)\n .then(function(clone) {\n return makeSvgDataUri(clone,\n options.width || util.width(node),\n options.height || util.height(node)\n );\n });\n\n function applyOptions(clone) {\n if (options.bgcolor) clone.style.backgroundColor = options.bgcolor;\n if (options.width) clone.style.width = options.width + 'px';\n if (options.height) clone.style.height = options.height + 'px';\n\n if (options.style)\n Object.keys(options.style).forEach(function(property) {\n clone.style[property] = options.style[property];\n });\n\n return clone;\n }\n }\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options, @see {@link toSvg}\n * @return {Promise} - A promise that is fulfilled with a Uint8Array containing RGBA pixel data.\n * */\n function toPixelData(node, options) {\n return draw(node, options || {})\n .then(function(canvas) {\n return canvas.getContext('2d').getImageData(\n 0,\n 0,\n util.width(node),\n util.height(node)\n ).data;\n });\n }\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options, @see {@link toSvg}\n * @return {Promise} - A promise that is fulfilled with a PNG image data URL\n * */\n function toPng(node, options) {\n return draw(node, options || {})\n .then(function(canvas) {\n return canvas.toDataURL();\n });\n }\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options, @see {@link toSvg}\n * @return {Promise} - A promise that is fulfilled with a JPEG image data URL\n * */\n function toJpeg(node, options) {\n options = options || {};\n return draw(node, options)\n .then(function(canvas) {\n return canvas.toDataURL('image/jpeg', options.quality || 1.0);\n });\n }\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options, @see {@link toSvg}\n * @return {Promise} - A promise that is fulfilled with a PNG image blob\n * */\n function toBlob(node, options) {\n return draw(node, options || {})\n .then(util.canvasToBlob);\n }\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options, @see {@link toSvg}\n * @return {Promise} - A promise that is fulfilled with a canvas object\n * */\n function toCanvas(node, options) {\n return draw(node, options || {});\n }\n\n function copyOptions(options) {\n // Copy options to impl options for use in impl\n if (typeof(options.imagePlaceholder) === 'undefined') {\n domtoimage.impl.options.imagePlaceholder = defaultOptions.imagePlaceholder;\n } else {\n domtoimage.impl.options.imagePlaceholder = options.imagePlaceholder;\n }\n\n if (typeof(options.cacheBust) === 'undefined') {\n domtoimage.impl.options.cacheBust = defaultOptions.cacheBust;\n } else {\n domtoimage.impl.options.cacheBust = options.cacheBust;\n }\n\n if(typeof(options.useCredentials) === 'undefined') {\n domtoimage.impl.options.useCredentials = defaultOptions.useCredentials;\n } else {\n domtoimage.impl.options.useCredentials = options.useCredentials;\n }\n }\n\n function draw(domNode, options) {\n return toSvg(domNode, options)\n .then(util.makeImage)\n .then(util.delay(100))\n .then(function(image) {\n var scale = typeof(options.scale) !== 'number' ? 1 : options.scale;\n var canvas = newCanvas(domNode, scale);\n var ctx = canvas.getContext('2d');\n if (image) {\n ctx.scale(scale, scale);\n ctx.drawImage(image, 0, 0);\n }\n return canvas;\n });\n\n function newCanvas(domNode, scale) {\n var canvas = document.createElement('canvas');\n canvas.width = (options.width || util.width(domNode)) * scale;\n canvas.height = (options.height || util.height(domNode)) * scale;\n\n if (options.bgcolor) {\n var ctx = canvas.getContext('2d');\n ctx.fillStyle = options.bgcolor;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n\n return canvas;\n }\n }\n\n function cloneNode(node, filter, root) {\n if (!root && filter && !filter(node)) return Promise.resolve();\n\n return Promise.resolve(node)\n .then(makeNodeCopy)\n .then(function(clone) {\n return cloneChildren(node, clone, filter);\n })\n .then(function(clone) {\n return processClone(node, clone);\n });\n\n function makeNodeCopy(node) {\n if (node instanceof HTMLCanvasElement) return util.makeImage(node.toDataURL());\n return node.cloneNode(false);\n }\n\n function cloneChildren(original, clone, filter) {\n var children = original.childNodes;\n if (children.length === 0) return Promise.resolve(clone);\n\n return cloneChildrenInOrder(clone, util.asArray(children), filter)\n .then(function() {\n return clone;\n });\n\n function cloneChildrenInOrder(parent, children, filter) {\n var done = Promise.resolve();\n children.forEach(function(child) {\n done = done\n .then(function() {\n return cloneNode(child, filter);\n })\n .then(function(childClone) {\n if (childClone) parent.appendChild(childClone);\n });\n });\n return done;\n }\n }\n\n function processClone(original, clone) {\n if (!(clone instanceof Element)) return clone;\n\n return Promise.resolve()\n .then(cloneStyle)\n .then(clonePseudoElements)\n .then(copyUserInput)\n .then(fixSvg)\n .then(function() {\n return clone;\n });\n\n function cloneStyle() {\n copyStyle(window.getComputedStyle(original), clone.style);\n\n function copyStyle(source, target) {\n if (source.cssText) {\n target.cssText = source.cssText;\n target.font = source.font; // here, we re-assign the font prop.\n } else copyProperties(source, target);\n\n function copyProperties(source, target) {\n util.asArray(source).forEach(function(name) {\n target.setProperty(\n name,\n source.getPropertyValue(name),\n source.getPropertyPriority(name)\n );\n });\n }\n }\n }\n\n function clonePseudoElements() {\n [':before', ':after'].forEach(function(element) {\n clonePseudoElement(element);\n });\n\n function clonePseudoElement(element) {\n var style = window.getComputedStyle(original, element);\n var content = style.getPropertyValue('content');\n\n if (content === '' || content === 'none') return;\n\n var className = util.uid();\n var currentClass = clone.getAttribute('class');\n if (currentClass) {\n clone.setAttribute('class', currentClass + ' ' + className);\n }\n\n var styleElement = document.createElement('style');\n styleElement.appendChild(formatPseudoElementStyle(className, element, style));\n clone.appendChild(styleElement);\n\n function formatPseudoElementStyle(className, element, style) {\n var selector = '.' + className + ':' + element;\n var cssText = style.cssText ? formatCssText(style) : formatCssProperties(style);\n return document.createTextNode(selector + '{' + cssText + '}');\n\n function formatCssText(style) {\n var content = style.getPropertyValue('content');\n return style.cssText + ' content: ' + content + ';';\n }\n\n function formatCssProperties(style) {\n\n return util.asArray(style)\n .map(formatProperty)\n .join('; ') + ';';\n\n function formatProperty(name) {\n return name + ': ' +\n style.getPropertyValue(name) +\n (style.getPropertyPriority(name) ? ' !important' : '');\n }\n }\n }\n }\n }\n\n function copyUserInput() {\n if (original instanceof HTMLTextAreaElement) clone.innerHTML = original.value;\n if (original instanceof HTMLInputElement) clone.setAttribute(\"value\", original.value);\n }\n\n function fixSvg() {\n if (!(clone instanceof SVGElement)) return;\n clone.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\n if (!(clone instanceof SVGRectElement)) return;\n ['width', 'height'].forEach(function(attribute) {\n var value = clone.getAttribute(attribute);\n if (!value) return;\n\n clone.style.setProperty(attribute, value);\n });\n }\n }\n }\n\n function embedFonts(node) {\n return fontFaces.resolveAll()\n .then(function(cssText) {\n var styleNode = document.createElement('style');\n node.appendChild(styleNode);\n styleNode.appendChild(document.createTextNode(cssText));\n return node;\n });\n }\n\n function inlineImages(node) {\n return images.inlineAll(node)\n .then(function() {\n return node;\n });\n }\n\n function makeSvgDataUri(node, width, height) {\n return Promise.resolve(node)\n .then(function(node) {\n node.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');\n return new XMLSerializer().serializeToString(node);\n })\n .then(util.escapeXhtml)\n .then(function(xhtml) {\n return '' + xhtml + '';\n })\n .then(function(foreignObject) {\n return '' +\n foreignObject + '';\n })\n .then(function(svg) {\n return 'data:image/svg+xml;charset=utf-8,' + svg;\n });\n }\n\n function newUtil() {\n return {\n escape: escape,\n parseExtension: parseExtension,\n mimeType: mimeType,\n dataAsUrl: dataAsUrl,\n isDataUrl: isDataUrl,\n canvasToBlob: canvasToBlob,\n resolveUrl: resolveUrl,\n getAndEncode: getAndEncode,\n uid: uid(),\n delay: delay,\n asArray: asArray,\n escapeXhtml: escapeXhtml,\n makeImage: makeImage,\n width: width,\n height: height\n };\n\n function mimes() {\n /*\n * Only WOFF and EOT mime types for fonts are 'real'\n * see http://www.iana.org/assignments/media-types/media-types.xhtml\n */\n var WOFF = 'application/font-woff';\n var JPEG = 'image/jpeg';\n\n return {\n 'woff': WOFF,\n 'woff2': WOFF,\n 'ttf': 'application/font-truetype',\n 'eot': 'application/vnd.ms-fontobject',\n 'png': 'image/png',\n 'jpg': JPEG,\n 'jpeg': JPEG,\n 'gif': 'image/gif',\n 'tiff': 'image/tiff',\n 'svg': 'image/svg+xml'\n };\n }\n\n function parseExtension(url) {\n var match = /\\.([^\\.\\/]*?)(\\?|$)/g.exec(url);\n if (match) return match[1];\n else return '';\n }\n\n function mimeType(url) {\n var extension = parseExtension(url).toLowerCase();\n return mimes()[extension] || '';\n }\n\n function isDataUrl(url) {\n return url.search(/^(data:)/) !== -1;\n }\n\n function toBlob(canvas) {\n return new Promise(function(resolve) {\n var binaryString = window.atob(canvas.toDataURL().split(',')[1]);\n var length = binaryString.length;\n var binaryArray = new Uint8Array(length);\n\n for (var i = 0; i < length; i++)\n binaryArray[i] = binaryString.charCodeAt(i);\n\n resolve(new Blob([binaryArray], {\n type: 'image/png'\n }));\n });\n }\n\n function canvasToBlob(canvas) {\n if (canvas.toBlob)\n return new Promise(function(resolve) {\n canvas.toBlob(resolve);\n });\n\n return toBlob(canvas);\n }\n\n function resolveUrl(url, baseUrl) {\n var doc = document.implementation.createHTMLDocument();\n var base = doc.createElement('base');\n doc.head.appendChild(base);\n var a = doc.createElement('a');\n doc.body.appendChild(a);\n base.href = baseUrl;\n a.href = url;\n return a.href;\n }\n\n function uid() {\n var index = 0;\n\n return function() {\n return 'u' + fourRandomChars() + index++;\n\n function fourRandomChars() {\n /* see http://stackoverflow.com/a/6248722/2519373 */\n return ('0000' + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4);\n }\n };\n }\n\n function makeImage(uri) {\n if (uri === 'data:,') return Promise.resolve();\n return new Promise(function(resolve, reject) {\n var image = new Image();\n if(domtoimage.impl.options.useCredentials) {\n image.crossOrigin = 'use-credentials';\n }\n image.onload = function() {\n resolve(image);\n };\n image.onerror = reject;\n image.src = uri;\n });\n }\n\n function getAndEncode(url) {\n var TIMEOUT = 30000;\n if (domtoimage.impl.options.cacheBust) {\n // Cache bypass so we dont have CORS issues with cached images\n // Source: https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache\n url += ((/\\?/).test(url) ? \"&\" : \"?\") + (new Date()).getTime();\n }\n\n return new Promise(function(resolve) {\n var request = new XMLHttpRequest();\n\n request.onreadystatechange = done;\n request.ontimeout = timeout;\n request.responseType = 'blob';\n request.timeout = TIMEOUT;\n if(domtoimage.impl.options.useCredentials) {\n request.withCredentials = true;\n }\n request.open('GET', url, true);\n request.send();\n\n var placeholder;\n if (domtoimage.impl.options.imagePlaceholder) {\n var split = domtoimage.impl.options.imagePlaceholder.split(/,/);\n if (split && split[1]) {\n placeholder = split[1];\n }\n }\n\n function done() {\n if (request.readyState !== 4) return;\n\n if (request.status !== 200) {\n if (placeholder) {\n resolve(placeholder);\n } else {\n fail('cannot fetch resource: ' + url + ', status: ' + request.status);\n }\n\n return;\n }\n\n var encoder = new FileReader();\n encoder.onloadend = function() {\n var content = encoder.result.split(/,/)[1];\n resolve(content);\n };\n encoder.readAsDataURL(request.response);\n }\n\n function timeout() {\n if (placeholder) {\n resolve(placeholder);\n } else {\n fail('timeout of ' + TIMEOUT + 'ms occured while fetching resource: ' + url);\n }\n }\n\n function fail(message) {\n console.error(message);\n resolve('');\n }\n });\n }\n\n function dataAsUrl(content, type) {\n return 'data:' + type + ';base64,' + content;\n }\n\n function escape(string) {\n return string.replace(/([.*+?^${}()|\\[\\]\\/\\\\])/g, '\\\\$1');\n }\n\n function delay(ms) {\n return function(arg) {\n return new Promise(function(resolve) {\n setTimeout(function() {\n resolve(arg);\n }, ms);\n });\n };\n }\n\n function asArray(arrayLike) {\n var array = [];\n var length = arrayLike.length;\n for (var i = 0; i < length; i++) array.push(arrayLike[i]);\n return array;\n }\n\n function escapeXhtml(string) {\n return string.replace(/#/g, '%23').replace(/\\n/g, '%0A');\n }\n\n function width(node) {\n var leftBorder = px(node, 'border-left-width');\n var rightBorder = px(node, 'border-right-width');\n return node.scrollWidth + leftBorder + rightBorder;\n }\n\n function height(node) {\n var topBorder = px(node, 'border-top-width');\n var bottomBorder = px(node, 'border-bottom-width');\n return node.scrollHeight + topBorder + bottomBorder;\n }\n\n function px(node, styleProperty) {\n var value = window.getComputedStyle(node).getPropertyValue(styleProperty);\n return parseFloat(value.replace('px', ''));\n }\n }\n\n function newInliner() {\n var URL_REGEX = /url\\(['\"]?([^'\"]+?)['\"]?\\)/g;\n\n return {\n inlineAll: inlineAll,\n shouldProcess: shouldProcess,\n impl: {\n readUrls: readUrls,\n inline: inline\n }\n };\n\n function shouldProcess(string) {\n return string.search(URL_REGEX) !== -1;\n }\n\n function readUrls(string) {\n var result = [];\n var match;\n while ((match = URL_REGEX.exec(string)) !== null) {\n result.push(match[1]);\n }\n return result.filter(function(url) {\n return !util.isDataUrl(url);\n });\n }\n\n function inline(string, url, baseUrl, get) {\n return Promise.resolve(url)\n .then(function(url) {\n return baseUrl ? util.resolveUrl(url, baseUrl) : url;\n })\n .then(get || util.getAndEncode)\n .then(function(data) {\n return util.dataAsUrl(data, util.mimeType(url));\n })\n .then(function(dataUrl) {\n return string.replace(urlAsRegex(url), '$1' + dataUrl + '$3');\n });\n\n function urlAsRegex(url) {\n return new RegExp('(url\\\\([\\'\"]?)(' + util.escape(url) + ')([\\'\"]?\\\\))', 'g');\n }\n }\n\n function inlineAll(string, baseUrl, get) {\n if (nothingToInline()) return Promise.resolve(string);\n\n return Promise.resolve(string)\n .then(readUrls)\n .then(function(urls) {\n var done = Promise.resolve(string);\n urls.forEach(function(url) {\n done = done.then(function(string) {\n return inline(string, url, baseUrl, get);\n });\n });\n return done;\n });\n\n function nothingToInline() {\n return !shouldProcess(string);\n }\n }\n }\n\n function newFontFaces() {\n return {\n resolveAll: resolveAll,\n impl: {\n readAll: readAll\n }\n };\n\n function resolveAll() {\n return readAll(document)\n .then(function(webFonts) {\n return Promise.all(\n webFonts.map(function(webFont) {\n return webFont.resolve();\n })\n );\n })\n .then(function(cssStrings) {\n return cssStrings.join('\\n');\n });\n }\n\n function readAll() {\n return Promise.resolve(util.asArray(document.styleSheets))\n .then(getCssRules)\n .then(selectWebFontRules)\n .then(function(rules) {\n return rules.map(newWebFont);\n });\n\n function selectWebFontRules(cssRules) {\n return cssRules\n .filter(function(rule) {\n return rule.type === CSSRule.FONT_FACE_RULE;\n })\n .filter(function(rule) {\n return inliner.shouldProcess(rule.style.getPropertyValue('src'));\n });\n }\n\n function getCssRules(styleSheets) {\n var cssRules = [];\n styleSheets.forEach(function(sheet) {\n if (sheet.hasOwnProperty(\"cssRules\")) {\n try {\n util.asArray(sheet.cssRules || []).forEach(cssRules.push.bind(cssRules));\n } catch (e) {\n console.log('Error while reading CSS rules from ' + sheet.href, e.toString());\n }\n }\n });\n return cssRules;\n }\n\n function newWebFont(webFontRule) {\n return {\n resolve: function resolve() {\n var baseUrl = (webFontRule.parentStyleSheet || {}).href;\n return inliner.inlineAll(webFontRule.cssText, baseUrl);\n },\n src: function() {\n return webFontRule.style.getPropertyValue('src');\n }\n };\n }\n }\n }\n\n function newImages() {\n return {\n inlineAll: inlineAll,\n impl: {\n newImage: newImage\n }\n };\n\n function newImage(element) {\n return {\n inline: inline\n };\n\n function inline(get) {\n if (util.isDataUrl(element.src)) return Promise.resolve();\n\n return Promise.resolve(element.src)\n .then(get || util.getAndEncode)\n .then(function(data) {\n return util.dataAsUrl(data, util.mimeType(element.src));\n })\n .then(function(dataUrl) {\n return new Promise(function(resolve, reject) {\n element.onload = resolve;\n // for any image with invalid src(such as ), just ignore it\n element.onerror = resolve;\n element.src = dataUrl;\n });\n });\n }\n }\n\n function inlineAll(node) {\n if (!(node instanceof Element)) return Promise.resolve(node);\n\n return inlineBackground(node)\n .then(function() {\n if (node instanceof HTMLImageElement)\n return newImage(node).inline();\n else\n return Promise.all(\n util.asArray(node.childNodes).map(function(child) {\n return inlineAll(child);\n })\n );\n });\n\n function inlineBackground(node) {\n var background = node.style.getPropertyValue('background');\n\n if (!background) return Promise.resolve(node);\n\n return inliner.inlineAll(background)\n .then(function(inlined) {\n node.style.setProperty(\n 'background',\n inlined,\n node.style.getPropertyPriority('background')\n );\n })\n .then(function() {\n return node;\n });\n }\n }\n }\n})(this);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;\n/** Types of elements found in htmlparser2's DOM */\nvar ElementType;\n(function (ElementType) {\n /** Type for the root element of a document */\n ElementType[\"Root\"] = \"root\";\n /** Type for Text */\n ElementType[\"Text\"] = \"text\";\n /** Type for */\n ElementType[\"Directive\"] = \"directive\";\n /** Type for */\n ElementType[\"Comment\"] = \"comment\";\n /** Type for `.\n this.sequenceIndex = Number(c === CharCodes.Lt);\n }\n };\n Tokenizer.prototype.stateCDATASequence = function (c) {\n if (c === Sequences.Cdata[this.sequenceIndex]) {\n if (++this.sequenceIndex === Sequences.Cdata.length) {\n this.state = State.InCommentLike;\n this.currentSequence = Sequences.CdataEnd;\n this.sequenceIndex = 0;\n this.sectionStart = this.index + 1;\n }\n }\n else {\n this.sequenceIndex = 0;\n this.state = State.InDeclaration;\n this.stateInDeclaration(c); // Reconsume the character\n }\n };\n /**\n * When we wait for one specific character, we can speed things up\n * by skipping through the buffer until we find it.\n *\n * @returns Whether the character was found.\n */\n Tokenizer.prototype.fastForwardTo = function (c) {\n while (++this.index < this.buffer.length + this.offset) {\n if (this.buffer.charCodeAt(this.index - this.offset) === c) {\n return true;\n }\n }\n /*\n * We increment the index at the end of the `parse` loop,\n * so set it to `buffer.length - 1` here.\n *\n * TODO: Refactor `parse` to increment index before calling states.\n */\n this.index = this.buffer.length + this.offset - 1;\n return false;\n };\n /**\n * Comments and CDATA end with `-->` and `]]>`.\n *\n * Their common qualities are:\n * - Their end sequences have a distinct character they start with.\n * - That character is then repeated, so we have to check multiple repeats.\n * - All characters but the start character of the sequence can be skipped.\n */\n Tokenizer.prototype.stateInCommentLike = function (c) {\n if (c === this.currentSequence[this.sequenceIndex]) {\n if (++this.sequenceIndex === this.currentSequence.length) {\n if (this.currentSequence === Sequences.CdataEnd) {\n this.cbs.oncdata(this.sectionStart, this.index, 2);\n }\n else {\n this.cbs.oncomment(this.sectionStart, this.index, 2);\n }\n this.sequenceIndex = 0;\n this.sectionStart = this.index + 1;\n this.state = State.Text;\n }\n }\n else if (this.sequenceIndex === 0) {\n // Fast-forward to the first character of the sequence\n if (this.fastForwardTo(this.currentSequence[0])) {\n this.sequenceIndex = 1;\n }\n }\n else if (c !== this.currentSequence[this.sequenceIndex - 1]) {\n // Allow long sequences, eg. --->, ]]]>\n this.sequenceIndex = 0;\n }\n };\n /**\n * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n *\n * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n * We allow anything that wouldn't end the tag.\n */\n Tokenizer.prototype.isTagStartChar = function (c) {\n return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);\n };\n Tokenizer.prototype.startSpecial = function (sequence, offset) {\n this.isSpecial = true;\n this.currentSequence = sequence;\n this.sequenceIndex = offset;\n this.state = State.SpecialStartSequence;\n };\n Tokenizer.prototype.stateBeforeTagName = function (c) {\n if (c === CharCodes.ExclamationMark) {\n this.state = State.BeforeDeclaration;\n this.sectionStart = this.index + 1;\n }\n else if (c === CharCodes.Questionmark) {\n this.state = State.InProcessingInstruction;\n this.sectionStart = this.index + 1;\n }\n else if (this.isTagStartChar(c)) {\n var lower = c | 0x20;\n this.sectionStart = this.index;\n if (!this.xmlMode && lower === Sequences.TitleEnd[2]) {\n this.startSpecial(Sequences.TitleEnd, 3);\n }\n else {\n this.state =\n !this.xmlMode && lower === Sequences.ScriptEnd[2]\n ? State.BeforeSpecialS\n : State.InTagName;\n }\n }\n else if (c === CharCodes.Slash) {\n this.state = State.BeforeClosingTagName;\n }\n else {\n this.state = State.Text;\n this.stateText(c);\n }\n };\n Tokenizer.prototype.stateInTagName = function (c) {\n if (isEndOfTagSection(c)) {\n this.cbs.onopentagname(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n };\n Tokenizer.prototype.stateBeforeClosingTagName = function (c) {\n if (isWhitespace(c)) {\n // Ignore\n }\n else if (c === CharCodes.Gt) {\n this.state = State.Text;\n }\n else {\n this.state = this.isTagStartChar(c)\n ? State.InClosingTagName\n : State.InSpecialComment;\n this.sectionStart = this.index;\n }\n };\n Tokenizer.prototype.stateInClosingTagName = function (c) {\n if (c === CharCodes.Gt || isWhitespace(c)) {\n this.cbs.onclosetag(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.state = State.AfterClosingTagName;\n this.stateAfterClosingTagName(c);\n }\n };\n Tokenizer.prototype.stateAfterClosingTagName = function (c) {\n // Skip everything until \">\"\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.state = State.Text;\n this.baseState = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeName = function (c) {\n if (c === CharCodes.Gt) {\n this.cbs.onopentagend(this.index);\n if (this.isSpecial) {\n this.state = State.InSpecialTag;\n this.sequenceIndex = 0;\n }\n else {\n this.state = State.Text;\n }\n this.baseState = this.state;\n this.sectionStart = this.index + 1;\n }\n else if (c === CharCodes.Slash) {\n this.state = State.InSelfClosingTag;\n }\n else if (!isWhitespace(c)) {\n this.state = State.InAttributeName;\n this.sectionStart = this.index;\n }\n };\n Tokenizer.prototype.stateInSelfClosingTag = function (c) {\n if (c === CharCodes.Gt) {\n this.cbs.onselfclosingtag(this.index);\n this.state = State.Text;\n this.baseState = State.Text;\n this.sectionStart = this.index + 1;\n this.isSpecial = false; // Reset special state, in case of self-closing special tags\n }\n else if (!isWhitespace(c)) {\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n };\n Tokenizer.prototype.stateInAttributeName = function (c) {\n if (c === CharCodes.Eq || isEndOfTagSection(c)) {\n this.cbs.onattribname(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.state = State.AfterAttributeName;\n this.stateAfterAttributeName(c);\n }\n };\n Tokenizer.prototype.stateAfterAttributeName = function (c) {\n if (c === CharCodes.Eq) {\n this.state = State.BeforeAttributeValue;\n }\n else if (c === CharCodes.Slash || c === CharCodes.Gt) {\n this.cbs.onattribend(QuoteType.NoValue, this.index);\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n else if (!isWhitespace(c)) {\n this.cbs.onattribend(QuoteType.NoValue, this.index);\n this.state = State.InAttributeName;\n this.sectionStart = this.index;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeValue = function (c) {\n if (c === CharCodes.DoubleQuote) {\n this.state = State.InAttributeValueDq;\n this.sectionStart = this.index + 1;\n }\n else if (c === CharCodes.SingleQuote) {\n this.state = State.InAttributeValueSq;\n this.sectionStart = this.index + 1;\n }\n else if (!isWhitespace(c)) {\n this.sectionStart = this.index;\n this.state = State.InAttributeValueNq;\n this.stateInAttributeValueNoQuotes(c); // Reconsume token\n }\n };\n Tokenizer.prototype.handleInAttributeValue = function (c, quote) {\n if (c === quote ||\n (!this.decodeEntities && this.fastForwardTo(quote))) {\n this.cbs.onattribdata(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.cbs.onattribend(quote === CharCodes.DoubleQuote\n ? QuoteType.Double\n : QuoteType.Single, this.index);\n this.state = State.BeforeAttributeName;\n }\n else if (this.decodeEntities && c === CharCodes.Amp) {\n this.baseState = this.state;\n this.state = State.BeforeEntity;\n }\n };\n Tokenizer.prototype.stateInAttributeValueDoubleQuotes = function (c) {\n this.handleInAttributeValue(c, CharCodes.DoubleQuote);\n };\n Tokenizer.prototype.stateInAttributeValueSingleQuotes = function (c) {\n this.handleInAttributeValue(c, CharCodes.SingleQuote);\n };\n Tokenizer.prototype.stateInAttributeValueNoQuotes = function (c) {\n if (isWhitespace(c) || c === CharCodes.Gt) {\n this.cbs.onattribdata(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.cbs.onattribend(QuoteType.Unquoted, this.index);\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n else if (this.decodeEntities && c === CharCodes.Amp) {\n this.baseState = this.state;\n this.state = State.BeforeEntity;\n }\n };\n Tokenizer.prototype.stateBeforeDeclaration = function (c) {\n if (c === CharCodes.OpeningSquareBracket) {\n this.state = State.CDATASequence;\n this.sequenceIndex = 0;\n }\n else {\n this.state =\n c === CharCodes.Dash\n ? State.BeforeComment\n : State.InDeclaration;\n }\n };\n Tokenizer.prototype.stateInDeclaration = function (c) {\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.cbs.ondeclaration(this.sectionStart, this.index);\n this.state = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateInProcessingInstruction = function (c) {\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.cbs.onprocessinginstruction(this.sectionStart, this.index);\n this.state = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeComment = function (c) {\n if (c === CharCodes.Dash) {\n this.state = State.InCommentLike;\n this.currentSequence = Sequences.CommentEnd;\n // Allow short comments (eg. )\n this.sequenceIndex = 2;\n this.sectionStart = this.index + 1;\n }\n else {\n this.state = State.InDeclaration;\n }\n };\n Tokenizer.prototype.stateInSpecialComment = function (c) {\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.cbs.oncomment(this.sectionStart, this.index, 0);\n this.state = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeSpecialS = function (c) {\n var lower = c | 0x20;\n if (lower === Sequences.ScriptEnd[3]) {\n this.startSpecial(Sequences.ScriptEnd, 4);\n }\n else if (lower === Sequences.StyleEnd[3]) {\n this.startSpecial(Sequences.StyleEnd, 4);\n }\n else {\n this.state = State.InTagName;\n this.stateInTagName(c); // Consume the token again\n }\n };\n Tokenizer.prototype.stateBeforeEntity = function (c) {\n // Start excess with 1 to include the '&'\n this.entityExcess = 1;\n this.entityResult = 0;\n if (c === CharCodes.Number) {\n this.state = State.BeforeNumericEntity;\n }\n else if (c === CharCodes.Amp) {\n // We have two `&` characters in a row. Stay in the current state.\n }\n else {\n this.trieIndex = 0;\n this.trieCurrent = this.entityTrie[0];\n this.state = State.InNamedEntity;\n this.stateInNamedEntity(c);\n }\n };\n Tokenizer.prototype.stateInNamedEntity = function (c) {\n this.entityExcess += 1;\n this.trieIndex = (0, decode_js_1.determineBranch)(this.entityTrie, this.trieCurrent, this.trieIndex + 1, c);\n if (this.trieIndex < 0) {\n this.emitNamedEntity();\n this.index--;\n return;\n }\n this.trieCurrent = this.entityTrie[this.trieIndex];\n var masked = this.trieCurrent & decode_js_1.BinTrieFlags.VALUE_LENGTH;\n // If the branch is a value, store it and continue\n if (masked) {\n // The mask is the number of bytes of the value, including the current byte.\n var valueLength = (masked >> 14) - 1;\n // If we have a legacy entity while parsing strictly, just skip the number of bytes\n if (!this.allowLegacyEntity() && c !== CharCodes.Semi) {\n this.trieIndex += valueLength;\n }\n else {\n // Add 1 as we have already incremented the excess\n var entityStart = this.index - this.entityExcess + 1;\n if (entityStart > this.sectionStart) {\n this.emitPartial(this.sectionStart, entityStart);\n }\n // If this is a surrogate pair, consume the next two bytes\n this.entityResult = this.trieIndex;\n this.trieIndex += valueLength;\n this.entityExcess = 0;\n this.sectionStart = this.index + 1;\n if (valueLength === 0) {\n this.emitNamedEntity();\n }\n }\n }\n };\n Tokenizer.prototype.emitNamedEntity = function () {\n this.state = this.baseState;\n if (this.entityResult === 0) {\n return;\n }\n var valueLength = (this.entityTrie[this.entityResult] & decode_js_1.BinTrieFlags.VALUE_LENGTH) >>\n 14;\n switch (valueLength) {\n case 1: {\n this.emitCodePoint(this.entityTrie[this.entityResult] &\n ~decode_js_1.BinTrieFlags.VALUE_LENGTH);\n break;\n }\n case 2: {\n this.emitCodePoint(this.entityTrie[this.entityResult + 1]);\n break;\n }\n case 3: {\n this.emitCodePoint(this.entityTrie[this.entityResult + 1]);\n this.emitCodePoint(this.entityTrie[this.entityResult + 2]);\n }\n }\n };\n Tokenizer.prototype.stateBeforeNumericEntity = function (c) {\n if ((c | 0x20) === CharCodes.LowerX) {\n this.entityExcess++;\n this.state = State.InHexEntity;\n }\n else {\n this.state = State.InNumericEntity;\n this.stateInNumericEntity(c);\n }\n };\n Tokenizer.prototype.emitNumericEntity = function (strict) {\n var entityStart = this.index - this.entityExcess - 1;\n var numberStart = entityStart + 2 + Number(this.state === State.InHexEntity);\n if (numberStart !== this.index) {\n // Emit leading data if any\n if (entityStart > this.sectionStart) {\n this.emitPartial(this.sectionStart, entityStart);\n }\n this.sectionStart = this.index + Number(strict);\n this.emitCodePoint((0, decode_js_1.replaceCodePoint)(this.entityResult));\n }\n this.state = this.baseState;\n };\n Tokenizer.prototype.stateInNumericEntity = function (c) {\n if (c === CharCodes.Semi) {\n this.emitNumericEntity(true);\n }\n else if (isNumber(c)) {\n this.entityResult = this.entityResult * 10 + (c - CharCodes.Zero);\n this.entityExcess++;\n }\n else {\n if (this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n }\n else {\n this.state = this.baseState;\n }\n this.index--;\n }\n };\n Tokenizer.prototype.stateInHexEntity = function (c) {\n if (c === CharCodes.Semi) {\n this.emitNumericEntity(true);\n }\n else if (isNumber(c)) {\n this.entityResult = this.entityResult * 16 + (c - CharCodes.Zero);\n this.entityExcess++;\n }\n else if (isHexDigit(c)) {\n this.entityResult =\n this.entityResult * 16 + ((c | 0x20) - CharCodes.LowerA + 10);\n this.entityExcess++;\n }\n else {\n if (this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n }\n else {\n this.state = this.baseState;\n }\n this.index--;\n }\n };\n Tokenizer.prototype.allowLegacyEntity = function () {\n return (!this.xmlMode &&\n (this.baseState === State.Text ||\n this.baseState === State.InSpecialTag));\n };\n /**\n * Remove data that has already been consumed from the buffer.\n */\n Tokenizer.prototype.cleanup = function () {\n // If we are inside of text or attributes, emit what we already have.\n if (this.running && this.sectionStart !== this.index) {\n if (this.state === State.Text ||\n (this.state === State.InSpecialTag && this.sequenceIndex === 0)) {\n this.cbs.ontext(this.sectionStart, this.index);\n this.sectionStart = this.index;\n }\n else if (this.state === State.InAttributeValueDq ||\n this.state === State.InAttributeValueSq ||\n this.state === State.InAttributeValueNq) {\n this.cbs.onattribdata(this.sectionStart, this.index);\n this.sectionStart = this.index;\n }\n }\n };\n Tokenizer.prototype.shouldContinue = function () {\n return this.index < this.buffer.length + this.offset && this.running;\n };\n /**\n * Iterates through the buffer, calling the function corresponding to the current state.\n *\n * States that are more likely to be hit are higher up, as a performance improvement.\n */\n Tokenizer.prototype.parse = function () {\n while (this.shouldContinue()) {\n var c = this.buffer.charCodeAt(this.index - this.offset);\n switch (this.state) {\n case State.Text: {\n this.stateText(c);\n break;\n }\n case State.SpecialStartSequence: {\n this.stateSpecialStartSequence(c);\n break;\n }\n case State.InSpecialTag: {\n this.stateInSpecialTag(c);\n break;\n }\n case State.CDATASequence: {\n this.stateCDATASequence(c);\n break;\n }\n case State.InAttributeValueDq: {\n this.stateInAttributeValueDoubleQuotes(c);\n break;\n }\n case State.InAttributeName: {\n this.stateInAttributeName(c);\n break;\n }\n case State.InCommentLike: {\n this.stateInCommentLike(c);\n break;\n }\n case State.InSpecialComment: {\n this.stateInSpecialComment(c);\n break;\n }\n case State.BeforeAttributeName: {\n this.stateBeforeAttributeName(c);\n break;\n }\n case State.InTagName: {\n this.stateInTagName(c);\n break;\n }\n case State.InClosingTagName: {\n this.stateInClosingTagName(c);\n break;\n }\n case State.BeforeTagName: {\n this.stateBeforeTagName(c);\n break;\n }\n case State.AfterAttributeName: {\n this.stateAfterAttributeName(c);\n break;\n }\n case State.InAttributeValueSq: {\n this.stateInAttributeValueSingleQuotes(c);\n break;\n }\n case State.BeforeAttributeValue: {\n this.stateBeforeAttributeValue(c);\n break;\n }\n case State.BeforeClosingTagName: {\n this.stateBeforeClosingTagName(c);\n break;\n }\n case State.AfterClosingTagName: {\n this.stateAfterClosingTagName(c);\n break;\n }\n case State.BeforeSpecialS: {\n this.stateBeforeSpecialS(c);\n break;\n }\n case State.InAttributeValueNq: {\n this.stateInAttributeValueNoQuotes(c);\n break;\n }\n case State.InSelfClosingTag: {\n this.stateInSelfClosingTag(c);\n break;\n }\n case State.InDeclaration: {\n this.stateInDeclaration(c);\n break;\n }\n case State.BeforeDeclaration: {\n this.stateBeforeDeclaration(c);\n break;\n }\n case State.BeforeComment: {\n this.stateBeforeComment(c);\n break;\n }\n case State.InProcessingInstruction: {\n this.stateInProcessingInstruction(c);\n break;\n }\n case State.InNamedEntity: {\n this.stateInNamedEntity(c);\n break;\n }\n case State.BeforeEntity: {\n this.stateBeforeEntity(c);\n break;\n }\n case State.InHexEntity: {\n this.stateInHexEntity(c);\n break;\n }\n case State.InNumericEntity: {\n this.stateInNumericEntity(c);\n break;\n }\n default: {\n // `this._state === State.BeforeNumericEntity`\n this.stateBeforeNumericEntity(c);\n }\n }\n this.index++;\n }\n this.cleanup();\n };\n Tokenizer.prototype.finish = function () {\n if (this.state === State.InNamedEntity) {\n this.emitNamedEntity();\n }\n // If there is remaining data, emit it in a reasonable way\n if (this.sectionStart < this.index) {\n this.handleTrailingData();\n }\n this.cbs.onend();\n };\n /** Handle any trailing data. */\n Tokenizer.prototype.handleTrailingData = function () {\n var endIndex = this.buffer.length + this.offset;\n if (this.state === State.InCommentLike) {\n if (this.currentSequence === Sequences.CdataEnd) {\n this.cbs.oncdata(this.sectionStart, endIndex, 0);\n }\n else {\n this.cbs.oncomment(this.sectionStart, endIndex, 0);\n }\n }\n else if (this.state === State.InNumericEntity &&\n this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n // All trailing data will have been consumed\n }\n else if (this.state === State.InHexEntity &&\n this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n // All trailing data will have been consumed\n }\n else if (this.state === State.InTagName ||\n this.state === State.BeforeAttributeName ||\n this.state === State.BeforeAttributeValue ||\n this.state === State.AfterAttributeName ||\n this.state === State.InAttributeName ||\n this.state === State.InAttributeValueSq ||\n this.state === State.InAttributeValueDq ||\n this.state === State.InAttributeValueNq ||\n this.state === State.InClosingTagName) {\n /*\n * If we are currently in an opening or closing tag, us not calling the\n * respective callback signals that the tag should be ignored.\n */\n }\n else {\n this.cbs.ontext(this.sectionStart, endIndex);\n }\n };\n Tokenizer.prototype.emitPartial = function (start, endIndex) {\n if (this.baseState !== State.Text &&\n this.baseState !== State.InSpecialTag) {\n this.cbs.onattribdata(start, endIndex);\n }\n else {\n this.cbs.ontext(start, endIndex);\n }\n };\n Tokenizer.prototype.emitCodePoint = function (cp) {\n if (this.baseState !== State.Text &&\n this.baseState !== State.InSpecialTag) {\n this.cbs.onattribentity(cp);\n }\n else {\n this.cbs.ontextentity(cp);\n }\n };\n return Tokenizer;\n}());\nexports.default = Tokenizer;\n//# sourceMappingURL=Tokenizer.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DomUtils = exports.parseFeed = exports.getFeed = exports.ElementType = exports.Tokenizer = exports.createDomStream = exports.parseDOM = exports.parseDocument = exports.DefaultHandler = exports.DomHandler = exports.Parser = void 0;\nvar Parser_js_1 = require(\"./Parser.js\");\nvar Parser_js_2 = require(\"./Parser.js\");\nObject.defineProperty(exports, \"Parser\", { enumerable: true, get: function () { return Parser_js_2.Parser; } });\nvar domhandler_1 = require(\"domhandler\");\nvar domhandler_2 = require(\"domhandler\");\nObject.defineProperty(exports, \"DomHandler\", { enumerable: true, get: function () { return domhandler_2.DomHandler; } });\n// Old name for DomHandler\nObject.defineProperty(exports, \"DefaultHandler\", { enumerable: true, get: function () { return domhandler_2.DomHandler; } });\n// Helper methods\n/**\n * Parses the data, returns the resulting document.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n */\nfunction parseDocument(data, options) {\n var handler = new domhandler_1.DomHandler(undefined, options);\n new Parser_js_1.Parser(handler, options).end(data);\n return handler.root;\n}\nexports.parseDocument = parseDocument;\n/**\n * Parses data, returns an array of the root nodes.\n *\n * Note that the root nodes still have a `Document` node as their parent.\n * Use `parseDocument` to get the `Document` node instead.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n * @deprecated Use `parseDocument` instead.\n */\nfunction parseDOM(data, options) {\n return parseDocument(data, options).children;\n}\nexports.parseDOM = parseDOM;\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param callback A callback that will be called once parsing has been completed.\n * @param options Optional options for the parser and DOM builder.\n * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM.\n */\nfunction createDomStream(callback, options, elementCallback) {\n var handler = new domhandler_1.DomHandler(callback, options, elementCallback);\n return new Parser_js_1.Parser(handler, options);\n}\nexports.createDomStream = createDomStream;\nvar Tokenizer_js_1 = require(\"./Tokenizer.js\");\nObject.defineProperty(exports, \"Tokenizer\", { enumerable: true, get: function () { return __importDefault(Tokenizer_js_1).default; } });\n/*\n * All of the following exports exist for backwards-compatibility.\n * They should probably be removed eventually.\n */\nexports.ElementType = __importStar(require(\"domelementtype\"));\nvar domutils_1 = require(\"domutils\");\nvar domutils_2 = require(\"domutils\");\nObject.defineProperty(exports, \"getFeed\", { enumerable: true, get: function () { return domutils_2.getFeed; } });\nvar parseFeedDefaultOptions = { xmlMode: true };\n/**\n * Parse a feed.\n *\n * @param feed The feed that should be parsed, as a string.\n * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`.\n */\nfunction parseFeed(feed, options) {\n if (options === void 0) { options = parseFeedDefaultOptions; }\n return (0, domutils_1.getFeed)(parseDOM(feed, options));\n}\nexports.parseFeed = parseFeed;\nexports.DomUtils = __importStar(require(\"domutils\"));\n//# sourceMappingURL=index.js.map","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.Immutable = factory());\n}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;\n\n function createClass(ctor, superClass) {\n if (superClass) {\n ctor.prototype = Object.create(superClass.prototype);\n }\n ctor.prototype.constructor = ctor;\n }\n\n function Iterable(value) {\n return isIterable(value) ? value : Seq(value);\n }\n\n\n createClass(KeyedIterable, Iterable);\n function KeyedIterable(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n\n\n createClass(IndexedIterable, Iterable);\n function IndexedIterable(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n\n\n createClass(SetIterable, Iterable);\n function SetIterable(value) {\n return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n\n\n\n function isIterable(maybeIterable) {\n return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n }\n\n function isKeyed(maybeKeyed) {\n return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n }\n\n function isIndexed(maybeIndexed) {\n return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n }\n\n function isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n }\n\n function isOrdered(maybeOrdered) {\n return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n }\n\n Iterable.isIterable = isIterable;\n Iterable.isKeyed = isKeyed;\n Iterable.isIndexed = isIndexed;\n Iterable.isAssociative = isAssociative;\n Iterable.isOrdered = isOrdered;\n\n Iterable.Keyed = KeyedIterable;\n Iterable.Indexed = IndexedIterable;\n Iterable.Set = SetIterable;\n\n\n var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n // Used for setting prototype methods that IE8 chokes on.\n var DELETE = 'delete';\n\n // Constants describing the size of trie nodes.\n var SHIFT = 5; // Resulted in best performance after ______?\n var SIZE = 1 << SHIFT;\n var MASK = SIZE - 1;\n\n // A consistent shared value representing \"not set\" which equals nothing other\n // than itself, and nothing that could be provided externally.\n var NOT_SET = {};\n\n // Boolean references, Rough equivalent of `bool &`.\n var CHANGE_LENGTH = { value: false };\n var DID_ALTER = { value: false };\n\n function MakeRef(ref) {\n ref.value = false;\n return ref;\n }\n\n function SetRef(ref) {\n ref && (ref.value = true);\n }\n\n // A function which returns a value representing an \"owner\" for transient writes\n // to tries. The return value will only ever equal itself, and will not equal\n // the return of any subsequent call of this function.\n function OwnerID() {}\n\n // http://jsperf.com/copy-array-inline\n function arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n }\n\n function ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n }\n\n function wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n }\n\n function returnTrue() {\n return true;\n }\n\n function wholeSlice(begin, end, size) {\n return (begin === 0 || (size !== undefined && begin <= -size)) &&\n (end === undefined || (size !== undefined && end >= size));\n }\n\n function resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n }\n\n function resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n }\n\n function resolveIndex(index, size, defaultIndex) {\n return index === undefined ?\n defaultIndex :\n index < 0 ?\n Math.max(0, size + index) :\n size === undefined ?\n index :\n Math.min(size, index);\n }\n\n /* global Symbol */\n\n var ITERATE_KEYS = 0;\n var ITERATE_VALUES = 1;\n var ITERATE_ENTRIES = 2;\n\n var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\n\n function Iterator(next) {\n this.next = next;\n }\n\n Iterator.prototype.toString = function() {\n return '[Iterator]';\n };\n\n\n Iterator.KEYS = ITERATE_KEYS;\n Iterator.VALUES = ITERATE_VALUES;\n Iterator.ENTRIES = ITERATE_ENTRIES;\n\n Iterator.prototype.inspect =\n Iterator.prototype.toSource = function () { return this.toString(); }\n Iterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n };\n\n\n function iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n value: value, done: false\n });\n return iteratorResult;\n }\n\n function iteratorDone() {\n return { value: undefined, done: true };\n }\n\n function hasIterator(maybeIterable) {\n return !!getIteratorFn(maybeIterable);\n }\n\n function isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n }\n\n function getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n }\n\n function getIteratorFn(iterable) {\n var iteratorFn = iterable && (\n (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n iterable[FAUX_ITERATOR_SYMBOL]\n );\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n function isArrayLike(value) {\n return value && typeof value.length === 'number';\n }\n\n createClass(Seq, Iterable);\n function Seq(value) {\n return value === null || value === undefined ? emptySequence() :\n isIterable(value) ? value.toSeq() : seqFromValue(value);\n }\n\n Seq.of = function(/*...values*/) {\n return Seq(arguments);\n };\n\n Seq.prototype.toSeq = function() {\n return this;\n };\n\n Seq.prototype.toString = function() {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function() {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, true);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, true);\n };\n\n\n\n createClass(KeyedSeq, Seq);\n function KeyedSeq(value) {\n return value === null || value === undefined ?\n emptySequence().toKeyedSeq() :\n isIterable(value) ?\n (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :\n keyedSeqFromValue(value);\n }\n\n KeyedSeq.prototype.toKeyedSeq = function() {\n return this;\n };\n\n\n\n createClass(IndexedSeq, Seq);\n function IndexedSeq(value) {\n return value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n }\n\n IndexedSeq.of = function(/*...values*/) {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function() {\n return this;\n };\n\n IndexedSeq.prototype.toString = function() {\n return this.__toString('Seq [', ']');\n };\n\n IndexedSeq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, false);\n };\n\n IndexedSeq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, false);\n };\n\n\n\n createClass(SetSeq, Seq);\n function SetSeq(value) {\n return (\n value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value\n ).toSetSeq();\n }\n\n SetSeq.of = function(/*...values*/) {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function() {\n return this;\n };\n\n\n\n Seq.isSeq = isSeq;\n Seq.Keyed = KeyedSeq;\n Seq.Set = SetSeq;\n Seq.Indexed = IndexedSeq;\n\n var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\n Seq.prototype[IS_SEQ_SENTINEL] = true;\n\n\n\n createClass(ArraySeq, IndexedSeq);\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n ArraySeq.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function(fn, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ArraySeq.prototype.__iterator = function(type, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n var ii = 0;\n return new Iterator(function() \n {return ii > maxIndex ?\n iteratorDone() :\n iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}\n );\n };\n\n\n\n createClass(ObjectSeq, KeyedSeq);\n function ObjectSeq(object) {\n var keys = Object.keys(object);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n ObjectSeq.prototype.get = function(key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function(key) {\n return this._object.hasOwnProperty(key);\n };\n\n ObjectSeq.prototype.__iterate = function(fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var key = keys[reverse ? maxIndex - ii : ii];\n if (fn(object[key], key, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ObjectSeq.prototype.__iterator = function(type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var key = keys[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, key, object[key]);\n });\n };\n\n ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(IterableSeq, IndexedSeq);\n function IterableSeq(iterable) {\n this._iterable = iterable;\n this.size = iterable.length || iterable.size;\n }\n\n IterableSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n\n IterableSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n\n\n createClass(IteratorSeq, IndexedSeq);\n function IteratorSeq(iterator) {\n this._iterator = iterator;\n this._iteratorCache = [];\n }\n\n IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n while (iterations < cache.length) {\n if (fn(cache[iterations], iterations++, this) === false) {\n return iterations;\n }\n }\n var step;\n while (!(step = iterator.next()).done) {\n var val = step.value;\n cache[iterations] = val;\n if (fn(val, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n\n IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n return new Iterator(function() {\n if (iterations >= cache.length) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n cache[iterations] = step.value;\n }\n return iteratorValue(type, iterations, cache[iterations++]);\n });\n };\n\n\n\n\n // # pragma Helper functions\n\n function isSeq(maybeSeq) {\n return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n }\n\n var EMPTY_SEQ;\n\n function emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n }\n\n function keyedSeqFromValue(value) {\n var seq =\n Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :\n isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :\n hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :\n typeof value === 'object' ? new ObjectSeq(value) :\n undefined;\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of [k, v] entries, '+\n 'or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values: ' + value\n );\n }\n return seq;\n }\n\n function seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value) ||\n (typeof value === 'object' && new ObjectSeq(value));\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values, or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function maybeIndexedSeqFromValue(value) {\n return (\n isArrayLike(value) ? new ArraySeq(value) :\n isIterator(value) ? new IteratorSeq(value) :\n hasIterator(value) ? new IterableSeq(value) :\n undefined\n );\n }\n\n function seqIterate(seq, fn, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var entry = cache[reverse ? maxIndex - ii : ii];\n if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n return ii + 1;\n }\n }\n return ii;\n }\n return seq.__iterateUncached(fn, reverse);\n }\n\n function seqIterator(seq, type, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var entry = cache[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n });\n }\n return seq.__iteratorUncached(type, reverse);\n }\n\n function fromJS(json, converter) {\n return converter ?\n fromJSWith(converter, json, '', {'': json}) :\n fromJSDefault(json);\n }\n\n function fromJSWith(converter, json, key, parentJSON) {\n if (Array.isArray(json)) {\n return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n if (isPlainObj(json)) {\n return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n return json;\n }\n\n function fromJSDefault(json) {\n if (Array.isArray(json)) {\n return IndexedSeq(json).map(fromJSDefault).toList();\n }\n if (isPlainObj(json)) {\n return KeyedSeq(json).map(fromJSDefault).toMap();\n }\n return json;\n }\n\n function isPlainObj(value) {\n return value && (value.constructor === Object || value.constructor === undefined);\n }\n\n /**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if the it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections implement `equals` and `hashCode`.\n *\n */\n function is(valueA, valueB) {\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (typeof valueA.valueOf === 'function' &&\n typeof valueB.valueOf === 'function') {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n if (typeof valueA.equals === 'function' &&\n typeof valueB.equals === 'function' &&\n valueA.equals(valueB)) {\n return true;\n }\n return false;\n }\n\n function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (\n !isIterable(b) ||\n a.size !== undefined && b.size !== undefined && a.size !== b.size ||\n a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||\n isKeyed(a) !== isKeyed(b) ||\n isIndexed(a) !== isIndexed(b) ||\n isOrdered(a) !== isOrdered(b)\n ) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return b.every(function(v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done;\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n var bSize = b.__iterate(function(v, k) {\n if (notAssociative ? !a.has(v) :\n flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n }\n\n createClass(Repeat, IndexedSeq);\n\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n\n Repeat.prototype.toString = function() {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function(searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function(begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size) ? this :\n new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n };\n\n Repeat.prototype.reverse = function() {\n return this;\n };\n\n Repeat.prototype.indexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n\n Repeat.prototype.__iterate = function(fn, reverse) {\n for (var ii = 0; ii < this.size; ii++) {\n if (fn(this._value, ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;\n var ii = 0;\n return new Iterator(function() \n {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}\n );\n };\n\n Repeat.prototype.equals = function(other) {\n return other instanceof Repeat ?\n is(this._value, other._value) :\n deepEqual(other);\n };\n\n\n var EMPTY_REPEAT;\n\n function invariant(condition, error) {\n if (!condition) throw new Error(error);\n }\n\n createClass(Range, IndexedSeq);\n\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n\n Range.prototype.toString = function() {\n if (this.size === 0) {\n return 'Range []';\n }\n return 'Range [ ' +\n this._start + '...' + this._end +\n (this._step !== 1 ? ' by ' + this._step : '') +\n ' ]';\n };\n\n Range.prototype.get = function(index, notSetValue) {\n return this.has(index) ?\n this._start + wrapIndex(this, index) * this._step :\n notSetValue;\n };\n\n Range.prototype.includes = function(searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return possibleIndex >= 0 &&\n possibleIndex < this.size &&\n possibleIndex === Math.floor(possibleIndex);\n };\n\n Range.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n };\n\n Range.prototype.indexOf = function(searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index\n }\n }\n return -1;\n };\n\n Range.prototype.lastIndexOf = function(searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function(fn, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(value, ii, this) === false) {\n return ii + 1;\n }\n value += reverse ? -step : step;\n }\n return ii;\n };\n\n Range.prototype.__iterator = function(type, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n var ii = 0;\n return new Iterator(function() {\n var v = value;\n value += reverse ? -step : step;\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n });\n };\n\n Range.prototype.equals = function(other) {\n return other instanceof Range ?\n this._start === other._start &&\n this._end === other._end &&\n this._step === other._step :\n deepEqual(this, other);\n };\n\n\n var EMPTY_RANGE;\n\n createClass(Collection, Iterable);\n function Collection() {\n throw TypeError('Abstract');\n }\n\n\n createClass(KeyedCollection, Collection);function KeyedCollection() {}\n\n createClass(IndexedCollection, Collection);function IndexedCollection() {}\n\n createClass(SetCollection, Collection);function SetCollection() {}\n\n\n Collection.Keyed = KeyedCollection;\n Collection.Indexed = IndexedCollection;\n Collection.Set = SetCollection;\n\n var imul =\n typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?\n Math.imul :\n function imul(a, b) {\n a = a | 0; // int\n b = b | 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int\n };\n\n // v8 has an optimization for storing 31-bit signed numbers.\n // Values which have either 00 or 11 as the high order bits qualify.\n // This function drops the highest order bit in a signed number, maintaining\n // the sign bit.\n function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }\n\n function hash(o) {\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n if (typeof o.valueOf === 'function') {\n o = o.valueOf();\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n }\n if (o === true) {\n return 1;\n }\n var type = typeof o;\n if (type === 'number') {\n if (o !== o || o === Infinity) {\n return 0;\n }\n var h = o | 0;\n if (h !== o) {\n h ^= o * 0xFFFFFFFF;\n }\n while (o > 0xFFFFFFFF) {\n o /= 0xFFFFFFFF;\n h ^= o;\n }\n return smi(h);\n }\n if (type === 'string') {\n return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n }\n if (typeof o.hashCode === 'function') {\n return o.hashCode();\n }\n if (type === 'object') {\n return hashJSObj(o);\n }\n if (typeof o.toString === 'function') {\n return hashString(o.toString());\n }\n throw new Error('Value type ' + type + ' cannot be hashed.');\n }\n\n function cachedHashString(string) {\n var hash = stringHashCache[string];\n if (hash === undefined) {\n hash = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hash;\n }\n return hash;\n }\n\n // http://jsperf.com/hashing-strings\n function hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hash = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hash = 31 * hash + string.charCodeAt(ii) | 0;\n }\n return smi(hash);\n }\n\n function hashJSObj(obj) {\n var hash;\n if (usingWeakMap) {\n hash = weakMap.get(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = obj[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n if (!canDefineProperty) {\n hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n hash = getIENodeHash(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = ++objHashUID;\n if (objHashUID & 0x40000000) {\n objHashUID = 0;\n }\n\n if (usingWeakMap) {\n weakMap.set(obj, hash);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n 'enumerable': false,\n 'configurable': false,\n 'writable': false,\n 'value': hash\n });\n } else if (obj.propertyIsEnumerable !== undefined &&\n obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function() {\n return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hash;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hash;\n }\n\n // Get references to ES5 object methods.\n var isExtensible = Object.isExtensible;\n\n // True if Object.defineProperty works as expected. IE8 fails this test.\n var canDefineProperty = (function() {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n }());\n\n // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n // and avoid memory leaks from the IE cloneNode bug.\n function getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1: // Element\n return node.uniqueID;\n case 9: // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n }\n\n // If possible, use a WeakMap.\n var usingWeakMap = typeof WeakMap === 'function';\n var weakMap;\n if (usingWeakMap) {\n weakMap = new WeakMap();\n }\n\n var objHashUID = 0;\n\n var UID_HASH_KEY = '__immutablehash__';\n if (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n }\n\n var STRING_HASH_CACHE_MIN_STRLEN = 16;\n var STRING_HASH_CACHE_MAX_SIZE = 255;\n var STRING_HASH_CACHE_SIZE = 0;\n var stringHashCache = {};\n\n function assertNotInfinite(size) {\n invariant(\n size !== Infinity,\n 'Cannot perform this action with an infinite size.'\n );\n }\n\n createClass(Map, KeyedCollection);\n\n // @pragma Construction\n\n function Map(value) {\n return value === null || value === undefined ? emptyMap() :\n isMap(value) && !isOrdered(value) ? value :\n emptyMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n Map.of = function() {var keyValues = SLICE$0.call(arguments, 0);\n return emptyMap().withMutations(function(map ) {\n for (var i = 0; i < keyValues.length; i += 2) {\n if (i + 1 >= keyValues.length) {\n throw new Error('Missing value for key: ' + keyValues[i]);\n }\n map.set(keyValues[i], keyValues[i + 1]);\n }\n });\n };\n\n Map.prototype.toString = function() {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function(k, notSetValue) {\n return this._root ?\n this._root.get(0, undefined, k, notSetValue) :\n notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function(k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.setIn = function(keyPath, v) {\n return this.updateIn(keyPath, NOT_SET, function() {return v});\n };\n\n Map.prototype.remove = function(k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteIn = function(keyPath) {\n return this.updateIn(keyPath, function() {return NOT_SET});\n };\n\n Map.prototype.update = function(k, notSetValue, updater) {\n return arguments.length === 1 ?\n k(this) :\n this.updateIn([k], notSetValue, updater);\n };\n\n Map.prototype.updateIn = function(keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeepMap(\n this,\n forceIterator(keyPath),\n notSetValue,\n updater\n );\n return updatedValue === NOT_SET ? undefined : updatedValue;\n };\n\n Map.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.merge = function(/*...iters*/) {\n return mergeIntoMapWith(this, undefined, arguments);\n };\n\n Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, merger, iters);\n };\n\n Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.merge === 'function' ?\n m.merge.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoMapWith(this, deepMerger, arguments);\n };\n\n Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n };\n\n Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.mergeDeep === 'function' ?\n m.mergeDeep.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.sort = function(comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n // @pragma Mutability\n\n Map.prototype.withMutations = function(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n };\n\n Map.prototype.asMutable = function() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n };\n\n Map.prototype.asImmutable = function() {\n return this.__ensureOwner();\n };\n\n Map.prototype.wasAltered = function() {\n return this.__altered;\n };\n\n Map.prototype.__iterator = function(type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n this._root && this._root.iterate(function(entry ) {\n iterations++;\n return fn(entry[1], entry[0], this$0);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n\n function isMap(maybeMap) {\n return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n }\n\n Map.isMap = isMap;\n\n var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\n var MapPrototype = Map.prototype;\n MapPrototype[IS_MAP_SENTINEL] = true;\n MapPrototype[DELETE] = MapPrototype.remove;\n MapPrototype.removeIn = MapPrototype.deleteIn;\n\n\n // #pragma Trie Nodes\n\n\n\n function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n }\n\n ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n };\n\n\n\n\n function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n }\n\n BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0 ? notSetValue :\n this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n };\n\n BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & (bit - 1));\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n var newNodes = exists ? newNode ?\n setIn(nodes, idx, newNode, isEditable) :\n spliceOut(nodes, idx, isEditable) :\n spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n };\n\n\n\n\n function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n }\n\n HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n };\n\n HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n };\n\n\n\n\n function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n }\n\n HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n };\n\n\n\n\n function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n }\n\n ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n };\n\n ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n };\n\n\n\n // #pragma Iterators\n\n ArrayMapNode.prototype.iterate =\n HashCollisionNode.prototype.iterate = function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n }\n\n BitmapIndexedNode.prototype.iterate =\n HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n }\n\n ValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n }\n\n createClass(MapIterator, Iterator);\n\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n MapIterator.prototype.next = function() {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex;\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n\n\n function mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n }\n\n function mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev\n };\n }\n\n function makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_MAP;\n function emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n }\n\n function updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef(CHANGE_LENGTH);\n var didAlter = MakeRef(DID_ALTER);\n newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n }\n\n function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n }\n\n function isLeafNode(node) {\n return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n }\n\n function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n var newNode;\n var nodes = idx1 === idx2 ?\n [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :\n ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n }\n\n function createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n }\n\n function packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n }\n\n function expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n }\n\n function mergeIntoMapWith(map, merger, iterables) {\n var iters = [];\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = KeyedIterable(value);\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n return mergeIntoCollectionWith(map, merger, iters);\n }\n\n function deepMerger(existing, value, key) {\n return existing && existing.mergeDeep && isIterable(value) ?\n existing.mergeDeep(value) :\n is(existing, value) ? existing : value;\n }\n\n function deepMergerWith(merger) {\n return function(existing, value, key) {\n if (existing && existing.mergeDeepWith && isIterable(value)) {\n return existing.mergeDeepWith(merger, value);\n }\n var nextValue = merger(existing, value, key);\n return is(existing, nextValue) ? existing : nextValue;\n };\n }\n\n function mergeIntoCollectionWith(collection, merger, iters) {\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return collection;\n }\n if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function(collection ) {\n var mergeIntoMap = merger ?\n function(value, key) {\n collection.update(key, NOT_SET, function(existing )\n {return existing === NOT_SET ? value : merger(existing, value, key)}\n );\n } :\n function(value, key) {\n collection.set(key, value);\n }\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoMap);\n }\n });\n }\n\n function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n var isNotSet = existing === NOT_SET;\n var step = keyPathIter.next();\n if (step.done) {\n var existingValue = isNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n invariant(\n isNotSet || (existing && existing.set),\n 'invalid keyPath'\n );\n var key = step.value;\n var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n var nextUpdated = updateInDeepMap(\n nextExisting,\n keyPathIter,\n notSetValue,\n updater\n );\n return nextUpdated === nextExisting ? existing :\n nextUpdated === NOT_SET ? existing.remove(key) :\n (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n }\n\n function popCount(x) {\n x = x - ((x >> 1) & 0x55555555);\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0f0f0f0f;\n x = x + (x >> 8);\n x = x + (x >> 16);\n return x & 0x7f;\n }\n\n function setIn(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n }\n\n function spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n }\n\n function spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n }\n\n var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\n createClass(List, IndexedCollection);\n\n // @pragma Construction\n\n function List(value) {\n var empty = emptyList();\n if (value === null || value === undefined) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedIterable(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function(list ) {\n list.setSize(size);\n iter.forEach(function(v, i) {return list.set(i, v)});\n });\n }\n\n List.of = function(/*...values*/) {\n return this(arguments);\n };\n\n List.prototype.toString = function() {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function(index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function(index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function(index) {\n return !this.has(index) ? this :\n index === 0 ? this.shift() :\n index === this.size - 1 ? this.pop() :\n this.splice(index, 1);\n };\n\n List.prototype.insert = function(index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n\n List.prototype.push = function(/*...values*/) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function(list ) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function() {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function(/*...values*/) {\n var values = arguments;\n return this.withMutations(function(list ) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function() {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.merge = function(/*...iters*/) {\n return mergeIntoListWith(this, undefined, arguments);\n };\n\n List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, merger, iters);\n };\n\n List.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoListWith(this, deepMerger, arguments);\n };\n\n List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, deepMergerWith(merger), iters);\n };\n\n List.prototype.setSize = function(size) {\n return setListBounds(this, 0, size);\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function(begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(\n this,\n resolveBegin(begin, size),\n resolveEnd(end, size)\n );\n };\n\n List.prototype.__iterator = function(type, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n return new Iterator(function() {\n var value = values();\n return value === DONE ?\n iteratorDone() :\n iteratorValue(type, index++, value);\n });\n };\n\n List.prototype.__iterate = function(fn, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, index++, this) === false) {\n break;\n }\n }\n return index;\n };\n\n List.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n return this;\n }\n return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n };\n\n\n function isList(maybeList) {\n return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n }\n\n List.isList = isList;\n\n var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\n var ListPrototype = List.prototype;\n ListPrototype[IS_LIST_SENTINEL] = true;\n ListPrototype[DELETE] = ListPrototype.remove;\n ListPrototype.setIn = MapPrototype.setIn;\n ListPrototype.deleteIn =\n ListPrototype.removeIn = MapPrototype.removeIn;\n ListPrototype.update = MapPrototype.update;\n ListPrototype.updateIn = MapPrototype.updateIn;\n ListPrototype.mergeIn = MapPrototype.mergeIn;\n ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n ListPrototype.withMutations = MapPrototype.withMutations;\n ListPrototype.asMutable = MapPrototype.asMutable;\n ListPrototype.asImmutable = MapPrototype.asImmutable;\n ListPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n\n function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n }\n\n // TODO: seems like these methods are very similar\n\n VNode.prototype.removeBefore = function(ownerID, level, index) {\n if (index === level ? 1 << level : 0 || this.array.length === 0) {\n return this;\n }\n var originIndex = (index >>> level) & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n };\n\n VNode.prototype.removeAfter = function(ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = ((index - 1) >>> level) & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n };\n\n\n\n var DONE = {};\n\n function iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0 ?\n iterateLeaf(node, offset) :\n iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : (left - offset) >> level;\n var to = ((right - offset) >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n do {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(\n array && array[idx], level - SHIFT, offset + (idx << level)\n );\n } while (true);\n };\n }\n }\n\n function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n }\n\n var EMPTY_LIST;\n function emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n }\n\n function updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function(list ) {\n index < 0 ?\n setListBounds(list, index).set(0, value) :\n setListBounds(list, 0, index + 1).set(index, value)\n });\n }\n\n index += list._origin;\n\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef(DID_ALTER);\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n }\n\n function updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = (index >>> level) & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n SetRef(didAlter);\n\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n }\n\n function editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n }\n\n function listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << (list._level + SHIFT)) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[(rawIndex >>> level) & MASK];\n level -= SHIFT;\n }\n return node;\n }\n }\n\n function setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail = newTailOffset < oldTailOffset ?\n listNodeFor(list, newCapacity - 1) :\n newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n // Merge Tail into tree.\n if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = (oldTailOffset >>> level) & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = (newOrigin >>> newLevel) & MASK;\n if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n }\n\n function mergeIntoListWith(list, merger, iterables) {\n var iters = [];\n var maxSize = 0;\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = IndexedIterable(value);\n if (iter.size > maxSize) {\n maxSize = iter.size;\n }\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n if (maxSize > list.size) {\n list = list.setSize(maxSize);\n }\n return mergeIntoCollectionWith(list, merger, iters);\n }\n\n function getTailOffset(size) {\n return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n }\n\n createClass(OrderedMap, Map);\n\n // @pragma Construction\n\n function OrderedMap(value) {\n return value === null || value === undefined ? emptyOrderedMap() :\n isOrderedMap(value) ? value :\n emptyOrderedMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n OrderedMap.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function() {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function(k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n return this;\n }\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function(k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function(k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.wasAltered = function() {\n return this._map.wasAltered() || this._list.wasAltered();\n };\n\n OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._list.__iterate(\n function(entry ) {return entry && fn(entry[1], entry[0], this$0)},\n reverse\n );\n };\n\n OrderedMap.prototype.__iterator = function(type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n\n function isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n }\n\n OrderedMap.isOrderedMap = isOrderedMap;\n\n OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\n\n\n function makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n return omap;\n }\n\n var EMPTY_ORDERED_MAP;\n function emptyOrderedMap() {\n return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n }\n\n function updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) { // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx});\n newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else {\n if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n }\n\n createClass(ToKeyedSequence, KeyedSeq);\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n ToKeyedSequence.prototype.get = function(key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function(key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function() {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function() {var this$0 = this;\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()};\n }\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)};\n }\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var ii;\n return this._iter.__iterate(\n this._useKeys ?\n function(v, k) {return fn(v, k, this$0)} :\n ((ii = reverse ? resolveSize(this) : 0),\n function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),\n reverse\n );\n };\n\n ToKeyedSequence.prototype.__iterator = function(type, reverse) {\n if (this._useKeys) {\n return this._iter.__iterator(type, reverse);\n }\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var ii = reverse ? resolveSize(this) : 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n });\n };\n\n ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(ToIndexedSequence, IndexedSeq);\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToIndexedSequence.prototype.includes = function(value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);\n };\n\n ToIndexedSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, iterations++, step.value, step)\n });\n };\n\n\n\n createClass(ToSetSequence, SetSeq);\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToSetSequence.prototype.has = function(key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, step.value, step.value, step);\n });\n };\n\n\n\n createClass(FromEntriesSequence, KeyedSeq);\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n FromEntriesSequence.prototype.entrySeq = function() {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(entry ) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return fn(\n indexedIterable ? entry.get(1) : entry[1],\n indexedIterable ? entry.get(0) : entry[0],\n this$0\n );\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return iteratorValue(\n type,\n indexedIterable ? entry.get(0) : entry[0],\n indexedIterable ? entry.get(1) : entry[1],\n step\n );\n }\n }\n });\n };\n\n\n ToIndexedSequence.prototype.cacheResult =\n ToKeyedSequence.prototype.cacheResult =\n ToSetSequence.prototype.cacheResult =\n FromEntriesSequence.prototype.cacheResult =\n cacheResultThrough;\n\n\n function flipFactory(iterable) {\n var flipSequence = makeSequence(iterable);\n flipSequence._iter = iterable;\n flipSequence.size = iterable.size;\n flipSequence.flip = function() {return iterable};\n flipSequence.reverse = function () {\n var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function() {return iterable.reverse()};\n return reversedSequence;\n };\n flipSequence.has = function(key ) {return iterable.includes(key)};\n flipSequence.includes = function(key ) {return iterable.has(key)};\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse);\n }\n flipSequence.__iteratorUncached = function(type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = iterable.__iterator(type, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return iterable.__iterator(\n type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n reverse\n );\n }\n return flipSequence;\n }\n\n\n function mapFactory(iterable, mapper, context) {\n var mappedSequence = makeSequence(iterable);\n mappedSequence.size = iterable.size;\n mappedSequence.has = function(key ) {return iterable.has(key)};\n mappedSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v === NOT_SET ?\n notSetValue :\n mapper.call(context, v, key, iterable);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(\n function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false},\n reverse\n );\n }\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(\n type,\n key,\n mapper.call(context, entry[1], key, iterable),\n step\n );\n });\n }\n return mappedSequence;\n }\n\n\n function reverseFactory(iterable, useKeys) {\n var reversedSequence = makeSequence(iterable);\n reversedSequence._iter = iterable;\n reversedSequence.size = iterable.size;\n reversedSequence.reverse = function() {return iterable};\n if (iterable.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(iterable);\n flipSequence.reverse = function() {return iterable.flip()};\n return flipSequence;\n };\n }\n reversedSequence.get = function(key, notSetValue) \n {return iterable.get(useKeys ? key : -1 - key, notSetValue)};\n reversedSequence.has = function(key )\n {return iterable.has(useKeys ? key : -1 - key)};\n reversedSequence.includes = function(value ) {return iterable.includes(value)};\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse);\n };\n reversedSequence.__iterator =\n function(type, reverse) {return iterable.__iterator(type, !reverse)};\n return reversedSequence;\n }\n\n\n function filterFactory(iterable, predicate, context, useKeys) {\n var filterSequence = makeSequence(iterable);\n if (useKeys) {\n filterSequence.has = function(key ) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n };\n filterSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, iterable) ?\n v : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, iterable)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n }\n return filterSequence;\n }\n\n\n function countByFactory(iterable, grouper, context) {\n var groups = Map().asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n 0,\n function(a ) {return a + 1}\n );\n });\n return groups.asImmutable();\n }\n\n\n function groupByFactory(iterable, grouper, context) {\n var isKeyedIter = isKeyed(iterable);\n var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}\n );\n });\n var coerce = iterableClass(iterable);\n return groups.map(function(arr ) {return reify(iterable, coerce(arr))});\n }\n\n\n function sliceFactory(iterable, begin, end, useKeys) {\n var originalSize = iterable.size;\n\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n if (end === Infinity) {\n end = originalSize;\n } else {\n end = end | 0;\n }\n }\n\n if (wholeSlice(begin, end, originalSize)) {\n return iterable;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this iterable's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(iterable);\n\n // If iterable.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n\n if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize ?\n iterable.get(index + resolvedBegin, notSetValue) :\n notSetValue;\n }\n }\n\n sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&\n iterations !== sliceSize;\n }\n });\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function(type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function() {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n } else {\n return iteratorValue(type, iterations - 1, step.value[1], step);\n }\n });\n }\n\n return sliceSeq;\n }\n\n\n function takeWhileFactory(iterable, predicate, context) {\n var takeSequence = makeSequence(iterable);\n takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n iterable.__iterate(function(v, k, c) \n {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}\n );\n return iterations;\n };\n takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function() {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$0)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n }\n\n\n function skipWhileFactory(iterable, predicate, context, useKeys) {\n var skipSequence = makeSequence(iterable);\n skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function() {\n var step, k, v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n } else {\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$0));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n }\n\n\n function concatFactory(iterable, values) {\n var isKeyedIterable = isKeyed(iterable);\n var iters = [iterable].concat(values).map(function(v ) {\n if (!isIterable(v)) {\n v = isKeyedIterable ?\n keyedSeqFromValue(v) :\n indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedIterable) {\n v = KeyedIterable(v);\n }\n return v;\n }).filter(function(v ) {return v.size !== 0});\n\n if (iters.length === 0) {\n return iterable;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n if (singleton === iterable ||\n isKeyedIterable && isKeyed(singleton) ||\n isIndexed(iterable) && isIndexed(singleton)) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n if (isKeyedIterable) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(iterable)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(\n function(sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n },\n 0\n );\n return concatSeq;\n }\n\n\n function flattenFactory(iterable, depth, useKeys) {\n var flatSequence = makeSequence(iterable);\n flatSequence.__iterateUncached = function(fn, reverse) {\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {var this$0 = this;\n iter.__iterate(function(v, k) {\n if ((!depth || currentDepth < depth) && isIterable(v)) {\n flatDeep(v, currentDepth + 1);\n } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n stopped = true;\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(iterable, 0);\n return iterations;\n }\n flatSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function() {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isIterable(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n }\n return flatSequence;\n }\n\n\n function flatMapFactory(iterable, mapper, context) {\n var coerce = iterableClass(iterable);\n return iterable.toSeq().map(\n function(v, k) {return coerce(mapper.call(context, v, k, iterable))}\n ).flatten(true);\n }\n\n\n function interposeFactory(iterable, separator) {\n var interposedSequence = makeSequence(iterable);\n interposedSequence.size = iterable.size && iterable.size * 2 -1;\n interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k) \n {return (!iterations || fn(separator, iterations++, this$0) !== false) &&\n fn(v, iterations++, this$0) !== false},\n reverse\n );\n return iterations;\n };\n interposedSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function() {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2 ?\n iteratorValue(type, iterations++, separator) :\n iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n }\n\n\n function sortFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedIterable = isKeyed(iterable);\n var index = 0;\n var entries = iterable.toSeq().map(\n function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}\n ).toArray();\n entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(\n isKeyedIterable ?\n function(v, i) { entries[i].length = 2; } :\n function(v, i) { entries[i] = v[1]; }\n );\n return isKeyedIterable ? KeyedSeq(entries) :\n isIndexed(iterable) ? IndexedSeq(entries) :\n SetSeq(entries);\n }\n\n\n function maxFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = iterable.toSeq()\n .map(function(v, k) {return [v, mapper(v, k, iterable)]})\n .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a});\n return entry && entry[0];\n } else {\n return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a});\n }\n }\n\n function maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n }\n\n\n function zipWithFactory(keyIter, zipper, iters) {\n var zipSequence = makeSequence(keyIter);\n zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function(fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function(type, reverse) {\n var iterators = iters.map(function(i )\n {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}\n );\n var iterations = 0;\n var isDone = false;\n return new Iterator(function() {\n var steps;\n if (!isDone) {\n steps = iterators.map(function(i ) {return i.next()});\n isDone = steps.some(function(s ) {return s.done});\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(\n type,\n iterations++,\n zipper.apply(null, steps.map(function(s ) {return s.value}))\n );\n });\n };\n return zipSequence\n }\n\n\n // #pragma Helper Functions\n\n function reify(iter, seq) {\n return isSeq(iter) ? seq : iter.constructor(seq);\n }\n\n function validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n }\n\n function resolveSize(iter) {\n assertNotInfinite(iter.size);\n return ensureSize(iter);\n }\n\n function iterableClass(iterable) {\n return isKeyed(iterable) ? KeyedIterable :\n isIndexed(iterable) ? IndexedIterable :\n SetIterable;\n }\n\n function makeSequence(iterable) {\n return Object.create(\n (\n isKeyed(iterable) ? KeyedSeq :\n isIndexed(iterable) ? IndexedSeq :\n SetSeq\n ).prototype\n );\n }\n\n function cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n } else {\n return Seq.prototype.cacheResult.call(this);\n }\n }\n\n function defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n\n function forceIterator(keyPath) {\n var iter = getIterator(keyPath);\n if (!iter) {\n // Array might not be iterable in this environment, so we need a fallback\n // to our wrapped type.\n if (!isArrayLike(keyPath)) {\n throw new TypeError('Expected iterable or array-like: ' + keyPath);\n }\n iter = getIterator(Iterable(keyPath));\n }\n return iter;\n }\n\n createClass(Record, KeyedCollection);\n\n function Record(defaultValues, name) {\n var hasInitialized;\n\n var RecordType = function Record(values) {\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n setProps(RecordTypePrototype, keys);\n RecordTypePrototype.size = keys.length;\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n }\n this._map = Map(values);\n };\n\n var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n RecordTypePrototype.constructor = RecordType;\n\n return RecordType;\n }\n\n Record.prototype.toString = function() {\n return this.__toString(recordName(this) + ' {', '}');\n };\n\n // @pragma Access\n\n Record.prototype.has = function(k) {\n return this._defaultValues.hasOwnProperty(k);\n };\n\n Record.prototype.get = function(k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var defaultVal = this._defaultValues[k];\n return this._map ? this._map.get(k, defaultVal) : defaultVal;\n };\n\n // @pragma Modification\n\n Record.prototype.clear = function() {\n if (this.__ownerID) {\n this._map && this._map.clear();\n return this;\n }\n var RecordType = this.constructor;\n return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n };\n\n Record.prototype.set = function(k, v) {\n if (!this.has(k)) {\n throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n }\n if (this._map && !this._map.has(k)) {\n var defaultVal = this._defaultValues[k];\n if (v === defaultVal) {\n return this;\n }\n }\n var newMap = this._map && this._map.set(k, v);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.remove = function(k) {\n if (!this.has(k)) {\n return this;\n }\n var newMap = this._map && this._map.remove(k);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Record.prototype.__iterator = function(type, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse);\n };\n\n Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse);\n };\n\n Record.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map && this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return makeRecord(this, newMap, ownerID);\n };\n\n\n var RecordPrototype = Record.prototype;\n RecordPrototype[DELETE] = RecordPrototype.remove;\n RecordPrototype.deleteIn =\n RecordPrototype.removeIn = MapPrototype.removeIn;\n RecordPrototype.merge = MapPrototype.merge;\n RecordPrototype.mergeWith = MapPrototype.mergeWith;\n RecordPrototype.mergeIn = MapPrototype.mergeIn;\n RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n RecordPrototype.setIn = MapPrototype.setIn;\n RecordPrototype.update = MapPrototype.update;\n RecordPrototype.updateIn = MapPrototype.updateIn;\n RecordPrototype.withMutations = MapPrototype.withMutations;\n RecordPrototype.asMutable = MapPrototype.asMutable;\n RecordPrototype.asImmutable = MapPrototype.asImmutable;\n\n\n function makeRecord(likeRecord, map, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._map = map;\n record.__ownerID = ownerID;\n return record;\n }\n\n function recordName(record) {\n return record._name || record.constructor.name || 'Record';\n }\n\n function setProps(prototype, names) {\n try {\n names.forEach(setProp.bind(undefined, prototype));\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n }\n\n function setProp(prototype, name) {\n Object.defineProperty(prototype, name, {\n get: function() {\n return this.get(name);\n },\n set: function(value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n }\n });\n }\n\n createClass(Set, SetCollection);\n\n // @pragma Construction\n\n function Set(value) {\n return value === null || value === undefined ? emptySet() :\n isSet(value) && !isOrdered(value) ? value :\n emptySet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n Set.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Set.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n Set.prototype.toString = function() {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function(value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function(value) {\n return updateSet(this, this._map.set(value, true));\n };\n\n Set.prototype.remove = function(value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function() {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function(set ) {\n for (var ii = 0; ii < iters.length; ii++) {\n SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});\n }\n });\n };\n\n Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (!iters.every(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (iters.some(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.merge = function() {\n return this.union.apply(this, arguments);\n };\n\n Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return this.union.apply(this, iters);\n };\n\n Set.prototype.sort = function(comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse);\n };\n\n Set.prototype.__iterator = function(type, reverse) {\n return this._map.map(function(_, k) {return k}).__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n\n\n function isSet(maybeSet) {\n return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n }\n\n Set.isSet = isSet;\n\n var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\n var SetPrototype = Set.prototype;\n SetPrototype[IS_SET_SENTINEL] = true;\n SetPrototype[DELETE] = SetPrototype.remove;\n SetPrototype.mergeDeep = SetPrototype.merge;\n SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n SetPrototype.withMutations = MapPrototype.withMutations;\n SetPrototype.asMutable = MapPrototype.asMutable;\n SetPrototype.asImmutable = MapPrototype.asImmutable;\n\n SetPrototype.__empty = emptySet;\n SetPrototype.__make = makeSet;\n\n function updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map ? set :\n newMap.size === 0 ? set.__empty() :\n set.__make(newMap);\n }\n\n function makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_SET;\n function emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n }\n\n createClass(OrderedSet, Set);\n\n // @pragma Construction\n\n function OrderedSet(value) {\n return value === null || value === undefined ? emptyOrderedSet() :\n isOrderedSet(value) ? value :\n emptyOrderedSet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n OrderedSet.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function() {\n return this.__toString('OrderedSet {', '}');\n };\n\n\n function isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n }\n\n OrderedSet.isOrderedSet = isOrderedSet;\n\n var OrderedSetPrototype = OrderedSet.prototype;\n OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\n OrderedSetPrototype.__empty = emptyOrderedSet;\n OrderedSetPrototype.__make = makeOrderedSet;\n\n function makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_ORDERED_SET;\n function emptyOrderedSet() {\n return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n }\n\n createClass(Stack, IndexedCollection);\n\n // @pragma Construction\n\n function Stack(value) {\n return value === null || value === undefined ? emptyStack() :\n isStack(value) ? value :\n emptyStack().unshiftAll(value);\n }\n\n Stack.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Stack.prototype.toString = function() {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function(index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function() {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function(/*...values*/) {\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments[ii],\n next: head\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function(iter) {\n iter = IndexedIterable(iter);\n if (iter.size === 0) {\n return this;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.reverse().forEach(function(value ) {\n newSize++;\n head = {\n value: value,\n next: head\n };\n });\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function() {\n return this.slice(1);\n };\n\n Stack.prototype.unshift = function(/*...values*/) {\n return this.push.apply(this, arguments);\n };\n\n Stack.prototype.unshiftAll = function(iter) {\n return this.pushAll(iter);\n };\n\n Stack.prototype.shift = function() {\n return this.pop.apply(this, arguments);\n };\n\n Stack.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n\n Stack.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function(fn, reverse) {\n if (reverse) {\n return this.reverse().__iterate(fn);\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n\n Stack.prototype.__iterator = function(type, reverse) {\n if (reverse) {\n return this.reverse().__iterator(type);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function() {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n\n\n function isStack(maybeStack) {\n return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n }\n\n Stack.isStack = isStack;\n\n var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\n var StackPrototype = Stack.prototype;\n StackPrototype[IS_STACK_SENTINEL] = true;\n StackPrototype.withMutations = MapPrototype.withMutations;\n StackPrototype.asMutable = MapPrototype.asMutable;\n StackPrototype.asImmutable = MapPrototype.asImmutable;\n StackPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n function makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_STACK;\n function emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n }\n\n /**\n * Contributes additional methods to a constructor\n */\n function mixin(ctor, methods) {\n var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols &&\n Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n }\n\n Iterable.Iterator = Iterator;\n\n mixin(Iterable, {\n\n // ### Conversion to other types\n\n toArray: function() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n this.valueSeq().__iterate(function(v, i) { array[i] = v; });\n return array;\n },\n\n toIndexedSeq: function() {\n return new ToIndexedSequence(this);\n },\n\n toJS: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}\n ).__toJS();\n },\n\n toJSON: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}\n ).__toJS();\n },\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, true);\n },\n\n toMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n\n toObject: function() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function(v, k) { object[k] = v; });\n return object;\n },\n\n toOrderedMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n\n toOrderedSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSetSeq: function() {\n return new ToSetSequence(this);\n },\n\n toSeq: function() {\n return isIndexed(this) ? this.toIndexedSeq() :\n isKeyed(this) ? this.toKeyedSeq() :\n this.toSetSeq();\n },\n\n toStack: function() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toList: function() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n\n\n // ### Common JavaScript methods and properties\n\n toString: function() {\n return '[Iterable]';\n },\n\n __toString: function(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function() {var values = SLICE$0.call(arguments, 0);\n return reify(this, concatFactory(this, values));\n },\n\n includes: function(searchValue) {\n return this.some(function(value ) {return is(value, searchValue)});\n },\n\n entries: function() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n\n every: function(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function(v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n\n find: function(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n\n forEach: function(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n\n join: function(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function(v ) {\n isFirst ? (isFirst = false) : (joined += separator);\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n\n keys: function() {\n return this.__iterator(ITERATE_KEYS);\n },\n\n map: function(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n\n reduce: function(reducer, initialReduction, context) {\n assertNotInfinite(this.size);\n var reduction;\n var useFirst;\n if (arguments.length < 2) {\n useFirst = true;\n } else {\n reduction = initialReduction;\n }\n this.__iterate(function(v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n });\n return reduction;\n },\n\n reduceRight: function(reducer, initialReduction, context) {\n var reversed = this.toKeyedSeq().reverse();\n return reversed.reduce.apply(reversed, arguments);\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, true));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n\n some: function(predicate, context) {\n return !this.every(not(predicate), context);\n },\n\n sort: function(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n\n values: function() {\n return this.__iterator(ITERATE_VALUES);\n },\n\n\n // ### More sequential methods\n\n butLast: function() {\n return this.slice(0, -1);\n },\n\n isEmpty: function() {\n return this.size !== undefined ? this.size === 0 : !this.some(function() {return true});\n },\n\n count: function(predicate, context) {\n return ensureSize(\n predicate ? this.toSeq().filter(predicate, context) : this\n );\n },\n\n countBy: function(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n\n equals: function(other) {\n return deepEqual(this, other);\n },\n\n entrySeq: function() {\n var iterable = this;\n if (iterable._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(iterable._cache);\n }\n var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function() {return iterable.toSeq()};\n return entriesSequence;\n },\n\n filterNot: function(predicate, context) {\n return this.filter(not(predicate), context);\n },\n\n findEntry: function(predicate, context, notSetValue) {\n var found = notSetValue;\n this.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n\n findKey: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n\n findLast: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n\n findLastEntry: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);\n },\n\n findLastKey: function(predicate, context) {\n return this.toKeyedSeq().reverse().findKey(predicate, context);\n },\n\n first: function() {\n return this.find(returnTrue);\n },\n\n flatMap: function(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n\n fromEntrySeq: function() {\n return new FromEntriesSequence(this);\n },\n\n get: function(searchKey, notSetValue) {\n return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue);\n },\n\n getIn: function(searchKeyPath, notSetValue) {\n var nested = this;\n // Note: in an ES6 environment, we would prefer:\n // for (var key of searchKeyPath) {\n var iter = forceIterator(searchKeyPath);\n var step;\n while (!(step = iter.next()).done) {\n var key = step.value;\n nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n if (nested === NOT_SET) {\n return notSetValue;\n }\n }\n return nested;\n },\n\n groupBy: function(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n\n has: function(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n\n hasIn: function(searchKeyPath) {\n return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n },\n\n isSubset: function(iter) {\n iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n return this.every(function(value ) {return iter.includes(value)});\n },\n\n isSuperset: function(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n return iter.isSubset(this);\n },\n\n keyOf: function(searchValue) {\n return this.findKey(function(value ) {return is(value, searchValue)});\n },\n\n keySeq: function() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n\n last: function() {\n return this.toSeq().reverse().first();\n },\n\n lastKeyOf: function(searchValue) {\n return this.toKeyedSeq().reverse().keyOf(searchValue);\n },\n\n max: function(comparator) {\n return maxFactory(this, comparator);\n },\n\n maxBy: function(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n\n min: function(comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n },\n\n minBy: function(mapper, comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n },\n\n rest: function() {\n return this.slice(1);\n },\n\n skip: function(amount) {\n return this.slice(Math.max(0, amount));\n },\n\n skipLast: function(amount) {\n return reify(this, this.toSeq().reverse().skip(amount).reverse());\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n\n skipUntil: function(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n\n sortBy: function(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n\n take: function(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n\n takeLast: function(amount) {\n return reify(this, this.toSeq().reverse().take(amount).reverse());\n },\n\n takeWhile: function(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n\n takeUntil: function(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n\n valueSeq: function() {\n return this.toIndexedSeq();\n },\n\n\n // ### Hashable Object\n\n hashCode: function() {\n return this.__hash || (this.__hash = hashIterable(this));\n }\n\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n });\n\n // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n var IterablePrototype = Iterable.prototype;\n IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n IterablePrototype.__toJS = IterablePrototype.toArray;\n IterablePrototype.__toStringMapper = quoteString;\n IterablePrototype.inspect =\n IterablePrototype.toSource = function() { return this.toString(); };\n IterablePrototype.chain = IterablePrototype.flatMap;\n IterablePrototype.contains = IterablePrototype.includes;\n\n mixin(KeyedIterable, {\n\n // ### More sequential methods\n\n flip: function() {\n return reify(this, flipFactory(this));\n },\n\n mapEntries: function(mapper, context) {var this$0 = this;\n var iterations = 0;\n return reify(this,\n this.toSeq().map(\n function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)}\n ).fromEntrySeq()\n );\n },\n\n mapKeys: function(mapper, context) {var this$0 = this;\n return reify(this,\n this.toSeq().flip().map(\n function(k, v) {return mapper.call(context, k, v, this$0)}\n ).flip()\n );\n }\n\n });\n\n var KeyedIterablePrototype = KeyedIterable.prototype;\n KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)};\n\n\n\n mixin(IndexedIterable, {\n\n // ### Conversion to other types\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, false);\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n\n findIndex: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n indexOf: function(searchValue) {\n var key = this.keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n lastIndexOf: function(searchValue) {\n var key = this.lastKeyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, false));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n\n splice: function(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum | 0, 0);\n if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(\n this,\n numArgs === 1 ?\n spliced :\n spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n );\n },\n\n\n // ### More collection methods\n\n findLastIndex: function(predicate, context) {\n var entry = this.findLastEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n first: function() {\n return this.get(0);\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n\n get: function(index, notSetValue) {\n index = wrapIndex(this, index);\n return (index < 0 || (this.size === Infinity ||\n (this.size !== undefined && index > this.size))) ?\n notSetValue :\n this.find(function(_, key) {return key === index}, undefined, notSetValue);\n },\n\n has: function(index) {\n index = wrapIndex(this, index);\n return index >= 0 && (this.size !== undefined ?\n this.size === Infinity || index < this.size :\n this.indexOf(index) !== -1\n );\n },\n\n interpose: function(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n\n interleave: function(/*...iterables*/) {\n var iterables = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * iterables.length;\n }\n return reify(this, interleaved);\n },\n\n keySeq: function() {\n return Range(0, this.size);\n },\n\n last: function() {\n return this.get(-1);\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n\n zip: function(/*, ...iterables */) {\n var iterables = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, iterables));\n },\n\n zipWith: function(zipper/*, ...iterables */) {\n var iterables = arrCopy(arguments);\n iterables[0] = this;\n return reify(this, zipWithFactory(this, zipper, iterables));\n }\n\n });\n\n IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n\n mixin(SetIterable, {\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n\n includes: function(value) {\n return this.has(value);\n },\n\n\n // ### More sequential methods\n\n keySeq: function() {\n return this.valueSeq();\n }\n\n });\n\n SetIterable.prototype.has = IterablePrototype.includes;\n SetIterable.prototype.contains = SetIterable.prototype.includes;\n\n\n // Mixin subclasses\n\n mixin(KeyedSeq, KeyedIterable.prototype);\n mixin(IndexedSeq, IndexedIterable.prototype);\n mixin(SetSeq, SetIterable.prototype);\n\n mixin(KeyedCollection, KeyedIterable.prototype);\n mixin(IndexedCollection, IndexedIterable.prototype);\n mixin(SetCollection, SetIterable.prototype);\n\n\n // #pragma Helper functions\n\n function keyMapper(v, k) {\n return k;\n }\n\n function entryMapper(v, k) {\n return [k, v];\n }\n\n function not(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n }\n }\n\n function neg(predicate) {\n return function() {\n return -predicate.apply(this, arguments);\n }\n }\n\n function quoteString(value) {\n return typeof value === 'string' ? JSON.stringify(value) : String(value);\n }\n\n function defaultZipper() {\n return arrCopy(arguments);\n }\n\n function defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n }\n\n function hashIterable(iterable) {\n if (iterable.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(iterable);\n var keyed = isKeyed(iterable);\n var h = ordered ? 1 : 0;\n var size = iterable.__iterate(\n keyed ?\n ordered ?\n function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :\n function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } :\n ordered ?\n function(v ) { h = 31 * h + hash(v) | 0; } :\n function(v ) { h = h + hash(v) | 0; }\n );\n return murmurHashOfSize(size, h);\n }\n\n function murmurHashOfSize(size, h) {\n h = imul(h, 0xCC9E2D51);\n h = imul(h << 15 | h >>> -15, 0x1B873593);\n h = imul(h << 13 | h >>> -13, 5);\n h = (h + 0xE6546B64 | 0) ^ size;\n h = imul(h ^ h >>> 16, 0x85EBCA6B);\n h = imul(h ^ h >>> 13, 0xC2B2AE35);\n h = smi(h ^ h >>> 16);\n return h;\n }\n\n function hashMerge(a, b) {\n return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n }\n\n var Immutable = {\n\n Iterable: Iterable,\n\n Seq: Seq,\n Collection: Collection,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n\n is: is,\n fromJS: fromJS\n\n };\n\n return Immutable;\n\n}));","// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nmodule.exports = function (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n var errorsList = [];\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n};\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n","'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexports.isPlainObject = isPlainObject;\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\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 == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\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\nmodule.exports = Hash;\n","var baseCreate = require('./_baseCreate'),\n baseLodash = require('./_baseLodash');\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\nfunction LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n}\n\n// Ensure `LazyWrapper` is an instance of `baseLodash`.\nLazyWrapper.prototype = baseCreate(baseLodash.prototype);\nLazyWrapper.prototype.constructor = LazyWrapper;\n\nmodule.exports = LazyWrapper;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\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 == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\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\nmodule.exports = ListCache;\n","var baseCreate = require('./_baseCreate'),\n baseLodash = require('./_baseLodash');\n\n/**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\nfunction LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n}\n\nLodashWrapper.prototype = baseCreate(baseLodash.prototype);\nLodashWrapper.prototype.constructor = LodashWrapper;\n\nmodule.exports = LodashWrapper;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\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 == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\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\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nmodule.exports = asciiToArray;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\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\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","/**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\nfunction baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n}\n\nmodule.exports = baseClamp;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\nfunction baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n}\n\nmodule.exports = baseDelay;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\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/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\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/** 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/**\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) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar regexpTag = '[object RegExp]';\n\n/**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\nfunction baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n}\n\nmodule.exports = baseIsRegExp;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\nfunction baseLodash() {\n // No operation performed.\n}\n\nmodule.exports = baseLodash;\n","var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","var arrayMap = require('./_arrayMap'),\n baseGet = require('./_baseGet'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n baseSortBy = require('./_baseSortBy'),\n baseUnary = require('./_baseUnary'),\n compareMultiple = require('./_compareMultiple'),\n identity = require('./identity'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nmodule.exports = baseOrderBy;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = basePropertyOf;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var identity = require('./identity'),\n metaMap = require('./_metaMap');\n\n/**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n};\n\nmodule.exports = baseSetData;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nmodule.exports = baseSortBy;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\nfunction baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n}\n\nmodule.exports = baseToNumber;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\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 cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var baseSlice = require('./_baseSlice');\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nmodule.exports = castSlice;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\nfunction charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n}\n\nmodule.exports = charsEndIndex;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\nfunction charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n}\n\nmodule.exports = charsStartIndex;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var isSymbol = require('./isSymbol');\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nmodule.exports = compareAscending;\n","var compareAscending = require('./_compareAscending');\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nmodule.exports = compareMultiple;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n}\n\nmodule.exports = composeArgs;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n}\n\nmodule.exports = composeArgsRight;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\nfunction countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n}\n\nmodule.exports = countHolders;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var createCtor = require('./_createCtor'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n}\n\nmodule.exports = createBind;\n","var baseCreate = require('./_baseCreate'),\n isObject = require('./isObject');\n\n/**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n}\n\nmodule.exports = createCtor;\n","var apply = require('./_apply'),\n createCtor = require('./_createCtor'),\n createHybrid = require('./_createHybrid'),\n createRecurry = require('./_createRecurry'),\n getHolder = require('./_getHolder'),\n replaceHolders = require('./_replaceHolders'),\n root = require('./_root');\n\n/**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n}\n\nmodule.exports = createCurry;\n","var LodashWrapper = require('./_LodashWrapper'),\n flatRest = require('./_flatRest'),\n getData = require('./_getData'),\n getFuncName = require('./_getFuncName'),\n isArray = require('./isArray'),\n isLaziable = require('./_isLaziable');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\nfunction createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n}\n\nmodule.exports = createFlow;\n","var composeArgs = require('./_composeArgs'),\n composeArgsRight = require('./_composeArgsRight'),\n countHolders = require('./_countHolders'),\n createCtor = require('./_createCtor'),\n createRecurry = require('./_createRecurry'),\n getHolder = require('./_getHolder'),\n reorder = require('./_reorder'),\n replaceHolders = require('./_replaceHolders'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_ARY_FLAG = 128,\n WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n}\n\nmodule.exports = createHybrid;\n","var baseToNumber = require('./_baseToNumber'),\n baseToString = require('./_baseToString');\n\n/**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\nfunction createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n}\n\nmodule.exports = createMathOperation;\n","var apply = require('./_apply'),\n createCtor = require('./_createCtor'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n}\n\nmodule.exports = createPartial;\n","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","var isLaziable = require('./_isLaziable'),\n setData = require('./_setData'),\n setWrapToString = require('./_setWrapToString');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n}\n\nmodule.exports = createRecurry;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var baseSetData = require('./_baseSetData'),\n createBind = require('./_createBind'),\n createCurry = require('./_createCurry'),\n createHybrid = require('./_createHybrid'),\n createPartial = require('./_createPartial'),\n getData = require('./_getData'),\n mergeData = require('./_mergeData'),\n setData = require('./_setData'),\n setWrapToString = require('./_setWrapToString'),\n toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n}\n\nmodule.exports = createWrap;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var metaMap = require('./_metaMap'),\n noop = require('./noop');\n\n/**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\nvar getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n};\n\nmodule.exports = getData;\n","var realNames = require('./_realNames');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\nfunction getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n}\n\nmodule.exports = getFuncName;\n","/**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\nfunction getHolder(func) {\n var object = func;\n return object.placeholder;\n}\n\nmodule.exports = getHolder;\n","var isKeyable = require('./_isKeyable');\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\nmodule.exports = getMapData;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\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\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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 nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\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\nmodule.exports = getValue;\n","/** Used to match wrap detail comments. */\nvar reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n/**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\nfunction getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n}\n\nmodule.exports = getWrapDetails;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n","var nativeCreate = require('./_nativeCreate');\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 this.size = 0;\n}\n\nmodule.exports = hashClear;\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 var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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 this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used to match wrap detail comments. */\nvar reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;\n\n/**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\nfunction insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n}\n\nmodule.exports = insertWrapDetails;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\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\nmodule.exports = isKeyable;\n","var LazyWrapper = require('./_LazyWrapper'),\n getData = require('./_getData'),\n getFuncName = require('./_getFuncName'),\n lodash = require('./wrapperLodash');\n\n/**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\nfunction isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n}\n\nmodule.exports = isLaziable;\n","var coreJsData = require('./_coreJsData');\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/**\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\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\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 this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\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 --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\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\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\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\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\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 ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\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.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\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 var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\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\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\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\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\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 var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var composeArgs = require('./_composeArgs'),\n composeArgsRight = require('./_composeArgsRight'),\n replaceHolders = require('./_replaceHolders');\n\n/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\nfunction mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n}\n\nmodule.exports = mergeData;\n","var WeakMap = require('./_WeakMap');\n\n/** Used to store function metadata. */\nvar metaMap = WeakMap && new WeakMap;\n\nmodule.exports = metaMap;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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 nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/** Used to lookup unminified function names. */\nvar realNames = {};\n\nmodule.exports = realNames;\n","var copyArray = require('./_copyArray'),\n isIndex = require('./_isIndex');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\nfunction reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n}\n\nmodule.exports = reorder;\n","/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\nfunction replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n}\n\nmodule.exports = replaceHolders;\n","var freeGlobal = require('./_freeGlobal');\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\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var baseSetData = require('./_baseSetData'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar setData = shortOut(baseSetData);\n\nmodule.exports = setData;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var getWrapDetails = require('./_getWrapDetails'),\n insertWrapDetails = require('./_insertWrapDetails'),\n setToString = require('./_setToString'),\n updateWrapDetails = require('./_updateWrapDetails');\n\n/**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\nfunction setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n}\n\nmodule.exports = setWrapToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\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 stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\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 stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\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\nmodule.exports = toSource;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var basePropertyOf = require('./_basePropertyOf');\n\n/** Used to map HTML entities to characters. */\nvar htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n};\n\n/**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\nvar unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\nmodule.exports = unescapeHtmlChar;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n","var arrayEach = require('./_arrayEach'),\n arrayIncludes = require('./_arrayIncludes');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n/** Used to associate wrap methods with their bit flags. */\nvar wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n];\n\n/**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\nfunction updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n}\n\nmodule.exports = updateWrapDetails;\n","var LazyWrapper = require('./_LazyWrapper'),\n LodashWrapper = require('./_LodashWrapper'),\n copyArray = require('./_copyArray');\n\n/**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\nfunction wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n}\n\nmodule.exports = wrapperClone;\n","var createMathOperation = require('./_createMathOperation');\n\n/**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\nvar add = createMathOperation(function(augend, addend) {\n return augend + addend;\n}, 0);\n\nmodule.exports = add;\n","var createWrap = require('./_createWrap');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_ARY_FLAG = 128;\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\nfunction ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n}\n\nmodule.exports = ary;\n","var toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nmodule.exports = before;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var createWrap = require('./_createWrap');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8;\n\n/**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\nfunction curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n}\n\n// Assign default placeholders.\ncurry.placeholder = {};\n\nmodule.exports = curry;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks `value` to determine whether a default value should be returned in\n * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n * or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Util\n * @param {*} value The value to check.\n * @param {*} defaultValue The default value.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * _.defaultTo(1, 10);\n * // => 1\n *\n * _.defaultTo(undefined, 10);\n * // => 10\n */\nfunction defaultTo(value, defaultValue) {\n return (value == null || value !== value) ? defaultValue : value;\n}\n\nmodule.exports = defaultTo;\n","var baseDelay = require('./_baseDelay'),\n baseRest = require('./_baseRest'),\n toNumber = require('./toNumber');\n\n/**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\nvar delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n});\n\nmodule.exports = delay;\n","var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseIteratee = require('./_baseIteratee'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n last = require('./last');\n\n/**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\nvar differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2))\n : [];\n});\n\nmodule.exports = differenceBy;\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\nmodule.exports = eq;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","var createFlow = require('./_createFlow');\n\n/**\n * This method is like `_.flow` except that it creates a function that\n * invokes the given functions from right to left.\n *\n * @static\n * @since 3.0.0\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flow\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flowRight([square, _.add]);\n * addSquare(1, 2);\n * // => 9\n */\nvar flowRight = createFlow(true);\n\nmodule.exports = flowRight;\n","var mapping = require('./_mapping'),\n fallbackHolder = require('./placeholder');\n\n/** Built-in value reference. */\nvar push = Array.prototype.push;\n\n/**\n * Creates a function, with an arity of `n`, that invokes `func` with the\n * arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} n The arity of the new function.\n * @returns {Function} Returns the new function.\n */\nfunction baseArity(func, n) {\n return n == 2\n ? function(a, b) { return func.apply(undefined, arguments); }\n : function(a) { return func.apply(undefined, arguments); };\n}\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments, ignoring\n * any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\nfunction baseAry(func, n) {\n return n == 2\n ? function(a, b) { return func(a, b); }\n : function(a) { return func(a); };\n}\n\n/**\n * Creates a clone of `array`.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the cloned array.\n */\nfunction cloneArray(array) {\n var length = array ? array.length : 0,\n result = Array(length);\n\n while (length--) {\n result[length] = array[length];\n }\n return result;\n}\n\n/**\n * Creates a function that clones a given object using the assignment `func`.\n *\n * @private\n * @param {Function} func The assignment function.\n * @returns {Function} Returns the new cloner function.\n */\nfunction createCloner(func) {\n return function(object) {\n return func({}, object);\n };\n}\n\n/**\n * A specialized version of `_.spread` which flattens the spread array into\n * the arguments of the invoked `func`.\n *\n * @private\n * @param {Function} func The function to spread arguments over.\n * @param {number} start The start position of the spread.\n * @returns {Function} Returns the new function.\n */\nfunction flatSpread(func, start) {\n return function() {\n var length = arguments.length,\n lastIndex = length - 1,\n args = Array(length);\n\n while (length--) {\n args[length] = arguments[length];\n }\n var array = args[start],\n otherArgs = args.slice(0, start);\n\n if (array) {\n push.apply(otherArgs, array);\n }\n if (start != lastIndex) {\n push.apply(otherArgs, args.slice(start + 1));\n }\n return func.apply(this, otherArgs);\n };\n}\n\n/**\n * Creates a function that wraps `func` and uses `cloner` to clone the first\n * argument it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} cloner The function to clone arguments.\n * @returns {Function} Returns the new immutable function.\n */\nfunction wrapImmutable(func, cloner) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return;\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var result = args[0] = cloner.apply(undefined, args);\n func.apply(undefined, args);\n return result;\n };\n}\n\n/**\n * The base implementation of `convert` which accepts a `util` object of methods\n * required to perform conversions.\n *\n * @param {Object} util The util object.\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.cap=true] Specify capping iteratee arguments.\n * @param {boolean} [options.curry=true] Specify currying.\n * @param {boolean} [options.fixed=true] Specify fixed arity.\n * @param {boolean} [options.immutable=true] Specify immutable operations.\n * @param {boolean} [options.rearg=true] Specify rearranging arguments.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction baseConvert(util, name, func, options) {\n var isLib = typeof name == 'function',\n isObj = name === Object(name);\n\n if (isObj) {\n options = func;\n func = name;\n name = undefined;\n }\n if (func == null) {\n throw new TypeError;\n }\n options || (options = {});\n\n var config = {\n 'cap': 'cap' in options ? options.cap : true,\n 'curry': 'curry' in options ? options.curry : true,\n 'fixed': 'fixed' in options ? options.fixed : true,\n 'immutable': 'immutable' in options ? options.immutable : true,\n 'rearg': 'rearg' in options ? options.rearg : true\n };\n\n var defaultHolder = isLib ? func : fallbackHolder,\n forceCurry = ('curry' in options) && options.curry,\n forceFixed = ('fixed' in options) && options.fixed,\n forceRearg = ('rearg' in options) && options.rearg,\n pristine = isLib ? func.runInContext() : undefined;\n\n var helpers = isLib ? func : {\n 'ary': util.ary,\n 'assign': util.assign,\n 'clone': util.clone,\n 'curry': util.curry,\n 'forEach': util.forEach,\n 'isArray': util.isArray,\n 'isError': util.isError,\n 'isFunction': util.isFunction,\n 'isWeakMap': util.isWeakMap,\n 'iteratee': util.iteratee,\n 'keys': util.keys,\n 'rearg': util.rearg,\n 'toInteger': util.toInteger,\n 'toPath': util.toPath\n };\n\n var ary = helpers.ary,\n assign = helpers.assign,\n clone = helpers.clone,\n curry = helpers.curry,\n each = helpers.forEach,\n isArray = helpers.isArray,\n isError = helpers.isError,\n isFunction = helpers.isFunction,\n isWeakMap = helpers.isWeakMap,\n keys = helpers.keys,\n rearg = helpers.rearg,\n toInteger = helpers.toInteger,\n toPath = helpers.toPath;\n\n var aryMethodKeys = keys(mapping.aryMethod);\n\n var wrappers = {\n 'castArray': function(castArray) {\n return function() {\n var value = arguments[0];\n return isArray(value)\n ? castArray(cloneArray(value))\n : castArray.apply(undefined, arguments);\n };\n },\n 'iteratee': function(iteratee) {\n return function() {\n var func = arguments[0],\n arity = arguments[1],\n result = iteratee(func, arity),\n length = result.length;\n\n if (config.cap && typeof arity == 'number') {\n arity = arity > 2 ? (arity - 2) : 1;\n return (length && length <= arity) ? result : baseAry(result, arity);\n }\n return result;\n };\n },\n 'mixin': function(mixin) {\n return function(source) {\n var func = this;\n if (!isFunction(func)) {\n return mixin(func, Object(source));\n }\n var pairs = [];\n each(keys(source), function(key) {\n if (isFunction(source[key])) {\n pairs.push([key, func.prototype[key]]);\n }\n });\n\n mixin(func, Object(source));\n\n each(pairs, function(pair) {\n var value = pair[1];\n if (isFunction(value)) {\n func.prototype[pair[0]] = value;\n } else {\n delete func.prototype[pair[0]];\n }\n });\n return func;\n };\n },\n 'nthArg': function(nthArg) {\n return function(n) {\n var arity = n < 0 ? 1 : (toInteger(n) + 1);\n return curry(nthArg(n), arity);\n };\n },\n 'rearg': function(rearg) {\n return function(func, indexes) {\n var arity = indexes ? indexes.length : 0;\n return curry(rearg(func, indexes), arity);\n };\n },\n 'runInContext': function(runInContext) {\n return function(context) {\n return baseConvert(util, runInContext(context), options);\n };\n }\n };\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Casts `func` to a function with an arity capped iteratee if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @returns {Function} Returns the cast function.\n */\n function castCap(name, func) {\n if (config.cap) {\n var indexes = mapping.iterateeRearg[name];\n if (indexes) {\n return iterateeRearg(func, indexes);\n }\n var n = !isLib && mapping.iterateeAry[name];\n if (n) {\n return iterateeAry(func, n);\n }\n }\n return func;\n }\n\n /**\n * Casts `func` to a curried function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castCurry(name, func, n) {\n return (forceCurry || (config.curry && n > 1))\n ? curry(func, n)\n : func;\n }\n\n /**\n * Casts `func` to a fixed arity function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the cast function.\n */\n function castFixed(name, func, n) {\n if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {\n var data = mapping.methodSpread[name],\n start = data && data.start;\n\n return start === undefined ? ary(func, n) : flatSpread(func, start);\n }\n return func;\n }\n\n /**\n * Casts `func` to an rearged function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castRearg(name, func, n) {\n return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))\n ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])\n : func;\n }\n\n /**\n * Creates a clone of `object` by `path`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {Array|string} path The path to clone by.\n * @returns {Object} Returns the cloned object.\n */\n function cloneByPath(object, path) {\n path = toPath(path);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n result = clone(Object(object)),\n nested = result;\n\n while (nested != null && ++index < length) {\n var key = path[index],\n value = nested[key];\n\n if (value != null &&\n !(isFunction(value) || isError(value) || isWeakMap(value))) {\n nested[key] = clone(index == lastIndex ? value : Object(value));\n }\n nested = nested[key];\n }\n return result;\n }\n\n /**\n * Converts `lodash` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied.\n *\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function} Returns the converted `lodash`.\n */\n function convertLib(options) {\n return _.runInContext.convert(options)(undefined);\n }\n\n /**\n * Create a converter function for `func` of `name`.\n *\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @returns {Function} Returns the new converter function.\n */\n function createConverter(name, func) {\n var realName = mapping.aliasToReal[name] || name,\n methodName = mapping.remap[realName] || realName,\n oldOptions = options;\n\n return function(options) {\n var newUtil = isLib ? pristine : helpers,\n newFunc = isLib ? pristine[methodName] : func,\n newOptions = assign(assign({}, oldOptions), options);\n\n return baseConvert(newUtil, realName, newFunc, newOptions);\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee, with up to `n`\n * arguments, ignoring any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap iteratee arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\n function iterateeAry(func, n) {\n return overArg(func, function(func) {\n return typeof func == 'function' ? baseAry(func, n) : func;\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee with arguments\n * arranged according to the specified `indexes` where the argument value at\n * the first index is provided as the first argument, the argument value at\n * the second index is provided as the second argument, and so on.\n *\n * @private\n * @param {Function} func The function to rearrange iteratee arguments for.\n * @param {number[]} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n */\n function iterateeRearg(func, indexes) {\n return overArg(func, function(func) {\n var n = indexes.length;\n return baseArity(rearg(baseAry(func, n), indexes), n);\n });\n }\n\n /**\n * Creates a function that invokes `func` with its first argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return func();\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var index = config.rearg ? 0 : (length - 1);\n args[index] = transform(args[index]);\n return func.apply(undefined, args);\n };\n }\n\n /**\n * Creates a function that wraps `func` and applys the conversions\n * rules by `name`.\n *\n * @private\n * @param {string} name The name of the function to wrap.\n * @param {Function} func The function to wrap.\n * @returns {Function} Returns the converted function.\n */\n function wrap(name, func, placeholder) {\n var result,\n realName = mapping.aliasToReal[name] || name,\n wrapped = func,\n wrapper = wrappers[realName];\n\n if (wrapper) {\n wrapped = wrapper(func);\n }\n else if (config.immutable) {\n if (mapping.mutate.array[realName]) {\n wrapped = wrapImmutable(func, cloneArray);\n }\n else if (mapping.mutate.object[realName]) {\n wrapped = wrapImmutable(func, createCloner(func));\n }\n else if (mapping.mutate.set[realName]) {\n wrapped = wrapImmutable(func, cloneByPath);\n }\n }\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(otherName) {\n if (realName == otherName) {\n var data = mapping.methodSpread[realName],\n afterRearg = data && data.afterRearg;\n\n result = afterRearg\n ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)\n : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);\n\n result = castCap(realName, result);\n result = castCurry(realName, result, aryKey);\n return false;\n }\n });\n return !result;\n });\n\n result || (result = wrapped);\n if (result == func) {\n result = forceCurry ? curry(result, 1) : function() {\n return func.apply(this, arguments);\n };\n }\n result.convert = createConverter(realName, func);\n result.placeholder = func.placeholder = placeholder;\n\n return result;\n }\n\n /*--------------------------------------------------------------------------*/\n\n if (!isObj) {\n return wrap(name, func, defaultHolder);\n }\n var _ = func;\n\n // Convert methods by ary cap.\n var pairs = [];\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(key) {\n var func = _[mapping.remap[key] || key];\n if (func) {\n pairs.push([key, wrap(key, func, _)]);\n }\n });\n });\n\n // Convert remaining methods.\n each(keys(_), function(key) {\n var func = _[key];\n if (typeof func == 'function') {\n var length = pairs.length;\n while (length--) {\n if (pairs[length][0] == key) {\n return;\n }\n }\n func.convert = createConverter(key, func);\n pairs.push([key, func]);\n }\n });\n\n // Assign to `_` leaving `_.prototype` unchanged to allow chaining.\n each(pairs, function(pair) {\n _[pair[0]] = pair[1];\n });\n\n _.convert = convertLib;\n _.placeholder = _;\n\n // Assign aliases.\n each(keys(_), function(key) {\n each(mapping.realToAlias[key] || [], function(alias) {\n _[alias] = _[key];\n });\n });\n\n return _;\n}\n\nmodule.exports = baseConvert;\n","/** Used to map aliases to their real names. */\nexports.aliasToReal = {\n\n // Lodash aliases.\n 'each': 'forEach',\n 'eachRight': 'forEachRight',\n 'entries': 'toPairs',\n 'entriesIn': 'toPairsIn',\n 'extend': 'assignIn',\n 'extendAll': 'assignInAll',\n 'extendAllWith': 'assignInAllWith',\n 'extendWith': 'assignInWith',\n 'first': 'head',\n\n // Methods that are curried variants of others.\n 'conforms': 'conformsTo',\n 'matches': 'isMatch',\n 'property': 'get',\n\n // Ramda aliases.\n '__': 'placeholder',\n 'F': 'stubFalse',\n 'T': 'stubTrue',\n 'all': 'every',\n 'allPass': 'overEvery',\n 'always': 'constant',\n 'any': 'some',\n 'anyPass': 'overSome',\n 'apply': 'spread',\n 'assoc': 'set',\n 'assocPath': 'set',\n 'complement': 'negate',\n 'compose': 'flowRight',\n 'contains': 'includes',\n 'dissoc': 'unset',\n 'dissocPath': 'unset',\n 'dropLast': 'dropRight',\n 'dropLastWhile': 'dropRightWhile',\n 'equals': 'isEqual',\n 'identical': 'eq',\n 'indexBy': 'keyBy',\n 'init': 'initial',\n 'invertObj': 'invert',\n 'juxt': 'over',\n 'omitAll': 'omit',\n 'nAry': 'ary',\n 'path': 'get',\n 'pathEq': 'matchesProperty',\n 'pathOr': 'getOr',\n 'paths': 'at',\n 'pickAll': 'pick',\n 'pipe': 'flow',\n 'pluck': 'map',\n 'prop': 'get',\n 'propEq': 'matchesProperty',\n 'propOr': 'getOr',\n 'props': 'at',\n 'symmetricDifference': 'xor',\n 'symmetricDifferenceBy': 'xorBy',\n 'symmetricDifferenceWith': 'xorWith',\n 'takeLast': 'takeRight',\n 'takeLastWhile': 'takeRightWhile',\n 'unapply': 'rest',\n 'unnest': 'flatten',\n 'useWith': 'overArgs',\n 'where': 'conformsTo',\n 'whereEq': 'isMatch',\n 'zipObj': 'zipObject'\n};\n\n/** Used to map ary to method names. */\nexports.aryMethod = {\n '1': [\n 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',\n 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',\n 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',\n 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',\n 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',\n 'uniqueId', 'words', 'zipAll'\n ],\n '2': [\n 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',\n 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',\n 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',\n 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',\n 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',\n 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',\n 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',\n 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',\n 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',\n 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',\n 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',\n 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',\n 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',\n 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',\n 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',\n 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',\n 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',\n 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',\n 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',\n 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',\n 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',\n 'zipObjectDeep'\n ],\n '3': [\n 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',\n 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',\n 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',\n 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',\n 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',\n 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',\n 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',\n 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',\n 'xorWith', 'zipWith'\n ],\n '4': [\n 'fill', 'setWith', 'updateWith'\n ]\n};\n\n/** Used to map ary to rearg configs. */\nexports.aryRearg = {\n '2': [1, 0],\n '3': [2, 0, 1],\n '4': [3, 2, 0, 1]\n};\n\n/** Used to map method names to their iteratee ary. */\nexports.iterateeAry = {\n 'dropRightWhile': 1,\n 'dropWhile': 1,\n 'every': 1,\n 'filter': 1,\n 'find': 1,\n 'findFrom': 1,\n 'findIndex': 1,\n 'findIndexFrom': 1,\n 'findKey': 1,\n 'findLast': 1,\n 'findLastFrom': 1,\n 'findLastIndex': 1,\n 'findLastIndexFrom': 1,\n 'findLastKey': 1,\n 'flatMap': 1,\n 'flatMapDeep': 1,\n 'flatMapDepth': 1,\n 'forEach': 1,\n 'forEachRight': 1,\n 'forIn': 1,\n 'forInRight': 1,\n 'forOwn': 1,\n 'forOwnRight': 1,\n 'map': 1,\n 'mapKeys': 1,\n 'mapValues': 1,\n 'partition': 1,\n 'reduce': 2,\n 'reduceRight': 2,\n 'reject': 1,\n 'remove': 1,\n 'some': 1,\n 'takeRightWhile': 1,\n 'takeWhile': 1,\n 'times': 1,\n 'transform': 2\n};\n\n/** Used to map method names to iteratee rearg configs. */\nexports.iterateeRearg = {\n 'mapKeys': [1],\n 'reduceRight': [1, 0]\n};\n\n/** Used to map method names to rearg configs. */\nexports.methodRearg = {\n 'assignInAllWith': [1, 0],\n 'assignInWith': [1, 2, 0],\n 'assignAllWith': [1, 0],\n 'assignWith': [1, 2, 0],\n 'differenceBy': [1, 2, 0],\n 'differenceWith': [1, 2, 0],\n 'getOr': [2, 1, 0],\n 'intersectionBy': [1, 2, 0],\n 'intersectionWith': [1, 2, 0],\n 'isEqualWith': [1, 2, 0],\n 'isMatchWith': [2, 1, 0],\n 'mergeAllWith': [1, 0],\n 'mergeWith': [1, 2, 0],\n 'padChars': [2, 1, 0],\n 'padCharsEnd': [2, 1, 0],\n 'padCharsStart': [2, 1, 0],\n 'pullAllBy': [2, 1, 0],\n 'pullAllWith': [2, 1, 0],\n 'rangeStep': [1, 2, 0],\n 'rangeStepRight': [1, 2, 0],\n 'setWith': [3, 1, 2, 0],\n 'sortedIndexBy': [2, 1, 0],\n 'sortedLastIndexBy': [2, 1, 0],\n 'unionBy': [1, 2, 0],\n 'unionWith': [1, 2, 0],\n 'updateWith': [3, 1, 2, 0],\n 'xorBy': [1, 2, 0],\n 'xorWith': [1, 2, 0],\n 'zipWith': [1, 2, 0]\n};\n\n/** Used to map method names to spread configs. */\nexports.methodSpread = {\n 'assignAll': { 'start': 0 },\n 'assignAllWith': { 'start': 0 },\n 'assignInAll': { 'start': 0 },\n 'assignInAllWith': { 'start': 0 },\n 'defaultsAll': { 'start': 0 },\n 'defaultsDeepAll': { 'start': 0 },\n 'invokeArgs': { 'start': 2 },\n 'invokeArgsMap': { 'start': 2 },\n 'mergeAll': { 'start': 0 },\n 'mergeAllWith': { 'start': 0 },\n 'partial': { 'start': 1 },\n 'partialRight': { 'start': 1 },\n 'without': { 'start': 1 },\n 'zipAll': { 'start': 0 }\n};\n\n/** Used to identify methods which mutate arrays or objects. */\nexports.mutate = {\n 'array': {\n 'fill': true,\n 'pull': true,\n 'pullAll': true,\n 'pullAllBy': true,\n 'pullAllWith': true,\n 'pullAt': true,\n 'remove': true,\n 'reverse': true\n },\n 'object': {\n 'assign': true,\n 'assignAll': true,\n 'assignAllWith': true,\n 'assignIn': true,\n 'assignInAll': true,\n 'assignInAllWith': true,\n 'assignInWith': true,\n 'assignWith': true,\n 'defaults': true,\n 'defaultsAll': true,\n 'defaultsDeep': true,\n 'defaultsDeepAll': true,\n 'merge': true,\n 'mergeAll': true,\n 'mergeAllWith': true,\n 'mergeWith': true,\n },\n 'set': {\n 'set': true,\n 'setWith': true,\n 'unset': true,\n 'update': true,\n 'updateWith': true\n }\n};\n\n/** Used to map real names to their aliases. */\nexports.realToAlias = (function() {\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n object = exports.aliasToReal,\n result = {};\n\n for (var key in object) {\n var value = object[key];\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }\n return result;\n}());\n\n/** Used to map method names to other names. */\nexports.remap = {\n 'assignAll': 'assign',\n 'assignAllWith': 'assignWith',\n 'assignInAll': 'assignIn',\n 'assignInAllWith': 'assignInWith',\n 'curryN': 'curry',\n 'curryRightN': 'curryRight',\n 'defaultsAll': 'defaults',\n 'defaultsDeepAll': 'defaultsDeep',\n 'findFrom': 'find',\n 'findIndexFrom': 'findIndex',\n 'findLastFrom': 'findLast',\n 'findLastIndexFrom': 'findLastIndex',\n 'getOr': 'get',\n 'includesFrom': 'includes',\n 'indexOfFrom': 'indexOf',\n 'invokeArgs': 'invoke',\n 'invokeArgsMap': 'invokeMap',\n 'lastIndexOfFrom': 'lastIndexOf',\n 'mergeAll': 'merge',\n 'mergeAllWith': 'mergeWith',\n 'padChars': 'pad',\n 'padCharsEnd': 'padEnd',\n 'padCharsStart': 'padStart',\n 'propertyOf': 'get',\n 'rangeStep': 'range',\n 'rangeStepRight': 'rangeRight',\n 'restFrom': 'rest',\n 'spreadFrom': 'spread',\n 'trimChars': 'trim',\n 'trimCharsEnd': 'trimEnd',\n 'trimCharsStart': 'trimStart',\n 'zipAll': 'zip'\n};\n\n/** Used to track methods that skip fixing their arity. */\nexports.skipFixed = {\n 'castArray': true,\n 'flow': true,\n 'flowRight': true,\n 'iteratee': true,\n 'mixin': true,\n 'rearg': true,\n 'runInContext': true\n};\n\n/** Used to track methods that skip rearranging arguments. */\nexports.skipRearg = {\n 'add': true,\n 'assign': true,\n 'assignIn': true,\n 'bind': true,\n 'bindKey': true,\n 'concat': true,\n 'difference': true,\n 'divide': true,\n 'eq': true,\n 'gt': true,\n 'gte': true,\n 'isEqual': true,\n 'lt': true,\n 'lte': true,\n 'matchesProperty': true,\n 'merge': true,\n 'multiply': true,\n 'overArgs': true,\n 'partial': true,\n 'partialRight': true,\n 'propertyOf': true,\n 'random': true,\n 'range': true,\n 'rangeRight': true,\n 'subtract': true,\n 'zip': true,\n 'zipObject': true,\n 'zipObjectDeep': true\n};\n","module.exports = {\n 'ary': require('../ary'),\n 'assign': require('../_baseAssign'),\n 'clone': require('../clone'),\n 'curry': require('../curry'),\n 'forEach': require('../_arrayEach'),\n 'isArray': require('../isArray'),\n 'isError': require('../isError'),\n 'isFunction': require('../isFunction'),\n 'isWeakMap': require('../isWeakMap'),\n 'iteratee': require('../iteratee'),\n 'keys': require('../_baseKeys'),\n 'rearg': require('../rearg'),\n 'toInteger': require('../toInteger'),\n 'toPath': require('../toPath')\n};\n","var convert = require('./convert'),\n func = convert('add', require('../add'));\n\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;\n","module.exports = require('./flowRight');\n","var baseConvert = require('./_baseConvert'),\n util = require('./_util');\n\n/**\n * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied. If `name` is an object its methods\n * will be converted.\n *\n * @param {string} name The name of the function to wrap.\n * @param {Function} [func] The function to wrap.\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction convert(name, func, options) {\n return baseConvert(util, name, func, options);\n}\n\nmodule.exports = convert;\n","var convert = require('./convert'),\n func = convert('defaultTo', require('../defaultTo'));\n\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;\n","var convert = require('./convert'),\n func = convert('flowRight', require('../flowRight'));\n\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;\n","/**\n * The default argument placeholder value for methods.\n *\n * @type {Object}\n */\nmodule.exports = {};\n","var convert = require('./convert'),\n func = convert('split', require('../split'));\n\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` 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 an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` 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 an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var isObjectLike = require('./isObjectLike'),\n isPlainObject = require('./isPlainObject');\n\n/**\n * Checks if `value` is likely a DOM element.\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 DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\nfunction isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n}\n\nmodule.exports = isElement;\n","var baseKeys = require('./_baseKeys'),\n getTag = require('./_getTag'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLike = require('./isArrayLike'),\n isBuffer = require('./isBuffer'),\n isPrototype = require('./_isPrototype'),\n isTypedArray = require('./isTypedArray');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\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 empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nmodule.exports = isEmpty;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.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 * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike'),\n isPlainObject = require('./isPlainObject');\n\n/** `Object#toString` result references. */\nvar domExcTag = '[object DOMException]',\n errorTag = '[object Error]';\n\n/**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\nfunction isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n}\n\nmodule.exports = isError;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\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 if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var isNumber = require('./isNumber');\n\n/**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\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 `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\nfunction isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n}\n\nmodule.exports = isNaN;\n","/**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\nfunction isNil(value) {\n return value == null;\n}\n\nmodule.exports = isNil;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar numberTag = '[object Number]';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\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 number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\nfunction isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n}\n\nmodule.exports = isNumber;\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 != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\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/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var baseIsRegExp = require('./_baseIsRegExp'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;\n\n/**\n * Checks if `value` is classified as a `RegExp` 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 regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\nvar isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\nmodule.exports = isRegExp;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n\nmodule.exports = isUndefined;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar weakMapTag = '[object WeakMap]';\n\n/**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\nfunction isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n}\n\nmodule.exports = isWeakMap;\n","var baseClone = require('./_baseClone'),\n baseIteratee = require('./_baseIteratee');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\nfunction iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n}\n\nmodule.exports = iteratee;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\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 `clear`, `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 != null && 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) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var before = require('./before');\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nmodule.exports = once;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","var createWrap = require('./_createWrap'),\n flatRest = require('./_flatRest');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\nvar rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n});\n\nmodule.exports = rearg;\n","var baseFlatten = require('./_baseFlatten'),\n baseOrderBy = require('./_baseOrderBy'),\n baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nmodule.exports = sortBy;\n","var baseToString = require('./_baseToString'),\n castSlice = require('./_castSlice'),\n hasUnicode = require('./_hasUnicode'),\n isIterateeCall = require('./_isIterateeCall'),\n isRegExp = require('./isRegExp'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\nfunction split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n}\n\nmodule.exports = split;\n","var baseClamp = require('./_baseClamp'),\n baseToString = require('./_baseToString'),\n toInteger = require('./toInteger'),\n toString = require('./toString');\n\n/**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\nfunction startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n}\n\nmodule.exports = startsWith;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var arrayMap = require('./_arrayMap'),\n copyArray = require('./_copyArray'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol'),\n stringToPath = require('./_stringToPath'),\n toKey = require('./_toKey'),\n toString = require('./toString');\n\n/**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\nfunction toPath(value) {\n if (isArray(value)) {\n return arrayMap(value, toKey);\n }\n return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n}\n\nmodule.exports = toPath;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var arrayEach = require('./_arrayEach'),\n baseCreate = require('./_baseCreate'),\n baseForOwn = require('./_baseForOwn'),\n baseIteratee = require('./_baseIteratee'),\n getPrototype = require('./_getPrototype'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isTypedArray = require('./isTypedArray');\n\n/**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\nfunction transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = baseIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n}\n\nmodule.exports = transform;\n","var baseToString = require('./_baseToString'),\n castSlice = require('./_castSlice'),\n charsEndIndex = require('./_charsEndIndex'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString'),\n trimmedEndIndex = require('./_trimmedEndIndex');\n\n/**\n * Removes trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimEnd(' abc ');\n * // => ' abc'\n *\n * _.trimEnd('-_-abc-_-', '_-');\n * // => '-_-abc'\n */\nfunction trimEnd(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.slice(0, trimmedEndIndex(string) + 1);\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n return castSlice(strSymbols, 0, end).join('');\n}\n\nmodule.exports = trimEnd;\n","var baseToString = require('./_baseToString'),\n castSlice = require('./_castSlice'),\n charsStartIndex = require('./_charsStartIndex'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * Removes leading whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimStart(' abc ');\n * // => 'abc '\n *\n * _.trimStart('-_-abc-_-', '_-');\n * // => 'abc-_-'\n */\nfunction trimStart(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.replace(reTrimStart, '');\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n start = charsStartIndex(strSymbols, stringToArray(chars));\n\n return castSlice(strSymbols, start).join('');\n}\n\nmodule.exports = trimStart;\n","var toString = require('./toString'),\n unescapeHtmlChar = require('./_unescapeHtmlChar');\n\n/** Used to match HTML entities and HTML characters. */\nvar reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source);\n\n/**\n * The inverse of `_.escape`; this method converts the HTML entities\n * `&`, `<`, `>`, `"`, and `'` in `string` to\n * their corresponding characters.\n *\n * **Note:** No other HTML entities are unescaped. To unescape additional\n * HTML entities use a third-party library like [_he_](https://mths.be/he).\n *\n * @static\n * @memberOf _\n * @since 0.6.0\n * @category String\n * @param {string} [string=''] The string to unescape.\n * @returns {string} Returns the unescaped string.\n * @example\n *\n * _.unescape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\nfunction unescape(string) {\n string = toString(string);\n return (string && reHasEscapedHtml.test(string))\n ? string.replace(reEscapedHtml, unescapeHtmlChar)\n : string;\n}\n\nmodule.exports = unescape;\n","var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n","var LazyWrapper = require('./_LazyWrapper'),\n LodashWrapper = require('./_LodashWrapper'),\n baseLodash = require('./_baseLodash'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike'),\n wrapperClone = require('./_wrapperClone');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\nfunction lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n}\n\n// Ensure wrappers are instances of `baseLodash`.\nlodash.prototype = baseLodash.prototype;\nlodash.prototype.constructor = lodash;\n\nmodule.exports = lodash;\n","var simpleIsEqual = function simpleIsEqual(a, b) {\n return a === b;\n};\n\nfunction index (resultFn) {\n var isEqual = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : simpleIsEqual;\n\n var lastThis = void 0;\n var lastArgs = [];\n var lastResult = void 0;\n var calledOnce = false;\n\n var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {\n return isEqual(newArg, lastArgs[index]);\n };\n\n var result = function result() {\n for (var _len = arguments.length, newArgs = Array(_len), _key = 0; _key < _len; _key++) {\n newArgs[_key] = arguments[_key];\n }\n\n if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {\n return lastResult;\n }\n\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n lastResult = resultFn.apply(this, newArgs);\n return lastResult;\n };\n\n return result;\n}\n\nexport default index;\n","var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n return memoized;\n}\n\nexport default memoizeOne;\n","// (c) 2012-2018 Airbnb, Inc.\n//\n// polyglot.js may be freely distributed under the terms of the BSD\n// license. For all licensing information, details, and documention:\n// http://airbnb.github.com/polyglot.js\n//\n//\n// Polyglot.js is an I18n helper library written in JavaScript, made to\n// work both in the browser and in Node. It provides a simple solution for\n// interpolation and pluralization, based off of Airbnb's\n// experience adding I18n functionality to its Backbone.js and Node apps.\n//\n// Polylglot is agnostic to your translation backend. It doesn't perform any\n// translation; it simply gives you a way to manage translated phrases from\n// your client- or server-side JavaScript application.\n//\n\n'use strict';\n\nvar forEach = require('for-each');\nvar warning = require('warning');\nvar has = require('has');\nvar trim = require('string.prototype.trim');\n\nvar warn = function warn(message) {\n warning(false, message);\n};\n\nvar replace = String.prototype.replace;\nvar split = String.prototype.split;\n\n// #### Pluralization methods\n// The string that separates the different phrase possibilities.\nvar delimiter = '||||';\n\nvar russianPluralGroups = function (n) {\n var lastTwo = n % 100;\n var end = lastTwo % 10;\n if (lastTwo !== 11 && end === 1) {\n return 0;\n }\n if (2 <= end && end <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) {\n return 1;\n }\n return 2;\n};\n\nvar defaultPluralRules = {\n // Mapping from pluralization group plural logic.\n pluralTypes: {\n arabic: function (n) {\n // http://www.arabeyes.org/Plural_Forms\n if (n < 3) { return n; }\n var lastTwo = n % 100;\n if (lastTwo >= 3 && lastTwo <= 10) return 3;\n return lastTwo >= 11 ? 4 : 5;\n },\n bosnian_serbian: russianPluralGroups,\n chinese: function () { return 0; },\n croatian: russianPluralGroups,\n french: function (n) { return n > 1 ? 1 : 0; },\n german: function (n) { return n !== 1 ? 1 : 0; },\n russian: russianPluralGroups,\n lithuanian: function (n) {\n if (n % 10 === 1 && n % 100 !== 11) { return 0; }\n return n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19) ? 1 : 2;\n },\n czech: function (n) {\n if (n === 1) { return 0; }\n return (n >= 2 && n <= 4) ? 1 : 2;\n },\n polish: function (n) {\n if (n === 1) { return 0; }\n var end = n % 10;\n return 2 <= end && end <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;\n },\n icelandic: function (n) { return (n % 10 !== 1 || n % 100 === 11) ? 1 : 0; },\n slovenian: function (n) {\n var lastTwo = n % 100;\n if (lastTwo === 1) {\n return 0;\n }\n if (lastTwo === 2) {\n return 1;\n }\n if (lastTwo === 3 || lastTwo === 4) {\n return 2;\n }\n return 3;\n }\n },\n\n // Mapping from pluralization group to individual language codes/locales.\n // Will look up based on exact match, if not found and it's a locale will parse the locale\n // for language code, and if that does not exist will default to 'en'\n pluralTypeToLanguages: {\n arabic: ['ar'],\n bosnian_serbian: ['bs-Latn-BA', 'bs-Cyrl-BA', 'srl-RS', 'sr-RS'],\n chinese: ['id', 'id-ID', 'ja', 'ko', 'ko-KR', 'lo', 'ms', 'th', 'th-TH', 'zh'],\n croatian: ['hr', 'hr-HR'],\n german: ['fa', 'da', 'de', 'en', 'es', 'fi', 'el', 'he', 'hi-IN', 'hu', 'hu-HU', 'it', 'nl', 'no', 'pt', 'sv', 'tr'],\n french: ['fr', 'tl', 'pt-br'],\n russian: ['ru', 'ru-RU'],\n lithuanian: ['lt'],\n czech: ['cs', 'cs-CZ', 'sk'],\n polish: ['pl'],\n icelandic: ['is'],\n slovenian: ['sl-SL']\n }\n};\n\nfunction langToTypeMap(mapping) {\n var ret = {};\n forEach(mapping, function (langs, type) {\n forEach(langs, function (lang) {\n ret[lang] = type;\n });\n });\n return ret;\n}\n\nfunction pluralTypeName(pluralRules, locale) {\n var langToPluralType = langToTypeMap(pluralRules.pluralTypeToLanguages);\n return langToPluralType[locale]\n || langToPluralType[split.call(locale, /-/, 1)[0]]\n || langToPluralType.en;\n}\n\nfunction pluralTypeIndex(pluralRules, locale, count) {\n return pluralRules.pluralTypes[pluralTypeName(pluralRules, locale)](count);\n}\n\nfunction escape(token) {\n return token.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction constructTokenRegex(opts) {\n var prefix = (opts && opts.prefix) || '%{';\n var suffix = (opts && opts.suffix) || '}';\n\n if (prefix === delimiter || suffix === delimiter) {\n throw new RangeError('\"' + delimiter + '\" token is reserved for pluralization');\n }\n\n return new RegExp(escape(prefix) + '(.*?)' + escape(suffix), 'g');\n}\n\nvar defaultTokenRegex = /%\\{(.*?)\\}/g;\n\n// ### transformPhrase(phrase, substitutions, locale)\n//\n// Takes a phrase string and transforms it by choosing the correct\n// plural form and interpolating it.\n//\n// transformPhrase('Hello, %{name}!', {name: 'Spike'});\n// // \"Hello, Spike!\"\n//\n// The correct plural form is selected if substitutions.smart_count\n// is set. You can pass in a number instead of an Object as `substitutions`\n// as a shortcut for `smart_count`.\n//\n// transformPhrase('%{smart_count} new messages |||| 1 new message', {smart_count: 1}, 'en');\n// // \"1 new message\"\n//\n// transformPhrase('%{smart_count} new messages |||| 1 new message', {smart_count: 2}, 'en');\n// // \"2 new messages\"\n//\n// transformPhrase('%{smart_count} new messages |||| 1 new message', 5, 'en');\n// // \"5 new messages\"\n//\n// You should pass in a third argument, the locale, to specify the correct plural type.\n// It defaults to `'en'` with 2 plural forms.\nfunction transformPhrase(phrase, substitutions, locale, tokenRegex, pluralRules) {\n if (typeof phrase !== 'string') {\n throw new TypeError('Polyglot.transformPhrase expects argument #1 to be string');\n }\n\n if (substitutions == null) {\n return phrase;\n }\n\n var result = phrase;\n var interpolationRegex = tokenRegex || defaultTokenRegex;\n var pluralRulesOrDefault = pluralRules || defaultPluralRules;\n\n // allow number as a pluralization shortcut\n var options = typeof substitutions === 'number' ? { smart_count: substitutions } : substitutions;\n\n // Select plural form: based on a phrase text that contains `n`\n // plural forms separated by `delimiter`, a `locale`, and a `substitutions.smart_count`,\n // choose the correct plural form. This is only done if `count` is set.\n if (options.smart_count != null && result) {\n var texts = split.call(result, delimiter);\n result = trim(texts[pluralTypeIndex(pluralRulesOrDefault, locale || 'en', options.smart_count)] || texts[0]);\n }\n\n // Interpolate: Creates a `RegExp` object for each interpolation placeholder.\n result = replace.call(result, interpolationRegex, function (expression, argument) {\n if (!has(options, argument) || options[argument] == null) { return expression; }\n return options[argument];\n });\n\n return result;\n}\n\n// ### Polyglot class constructor\nfunction Polyglot(options) {\n var opts = options || {};\n this.phrases = {};\n this.extend(opts.phrases || {});\n this.currentLocale = opts.locale || 'en';\n var allowMissing = opts.allowMissing ? transformPhrase : null;\n this.onMissingKey = typeof opts.onMissingKey === 'function' ? opts.onMissingKey : allowMissing;\n this.warn = opts.warn || warn;\n this.tokenRegex = constructTokenRegex(opts.interpolation);\n this.pluralRules = opts.pluralRules || defaultPluralRules;\n}\n\n// ### polyglot.locale([locale])\n//\n// Get or set locale. Internally, Polyglot only uses locale for pluralization.\nPolyglot.prototype.locale = function (newLocale) {\n if (newLocale) this.currentLocale = newLocale;\n return this.currentLocale;\n};\n\n// ### polyglot.extend(phrases)\n//\n// Use `extend` to tell Polyglot how to translate a given key.\n//\n// polyglot.extend({\n// \"hello\": \"Hello\",\n// \"hello_name\": \"Hello, %{name}\"\n// });\n//\n// The key can be any string. Feel free to call `extend` multiple times;\n// it will override any phrases with the same key, but leave existing phrases\n// untouched.\n//\n// It is also possible to pass nested phrase objects, which get flattened\n// into an object with the nested keys concatenated using dot notation.\n//\n// polyglot.extend({\n// \"nav\": {\n// \"hello\": \"Hello\",\n// \"hello_name\": \"Hello, %{name}\",\n// \"sidebar\": {\n// \"welcome\": \"Welcome\"\n// }\n// }\n// });\n//\n// console.log(polyglot.phrases);\n// // {\n// // 'nav.hello': 'Hello',\n// // 'nav.hello_name': 'Hello, %{name}',\n// // 'nav.sidebar.welcome': 'Welcome'\n// // }\n//\n// `extend` accepts an optional second argument, `prefix`, which can be used\n// to prefix every key in the phrases object with some string, using dot\n// notation.\n//\n// polyglot.extend({\n// \"hello\": \"Hello\",\n// \"hello_name\": \"Hello, %{name}\"\n// }, \"nav\");\n//\n// console.log(polyglot.phrases);\n// // {\n// // 'nav.hello': 'Hello',\n// // 'nav.hello_name': 'Hello, %{name}'\n// // }\n//\n// This feature is used internally to support nested phrase objects.\nPolyglot.prototype.extend = function (morePhrases, prefix) {\n forEach(morePhrases, function (phrase, key) {\n var prefixedKey = prefix ? prefix + '.' + key : key;\n if (typeof phrase === 'object') {\n this.extend(phrase, prefixedKey);\n } else {\n this.phrases[prefixedKey] = phrase;\n }\n }, this);\n};\n\n// ### polyglot.unset(phrases)\n// Use `unset` to selectively remove keys from a polyglot instance.\n//\n// polyglot.unset(\"some_key\");\n// polyglot.unset({\n// \"hello\": \"Hello\",\n// \"hello_name\": \"Hello, %{name}\"\n// });\n//\n// The unset method can take either a string (for the key), or an object hash with\n// the keys that you would like to unset.\nPolyglot.prototype.unset = function (morePhrases, prefix) {\n if (typeof morePhrases === 'string') {\n delete this.phrases[morePhrases];\n } else {\n forEach(morePhrases, function (phrase, key) {\n var prefixedKey = prefix ? prefix + '.' + key : key;\n if (typeof phrase === 'object') {\n this.unset(phrase, prefixedKey);\n } else {\n delete this.phrases[prefixedKey];\n }\n }, this);\n }\n};\n\n// ### polyglot.clear()\n//\n// Clears all phrases. Useful for special cases, such as freeing\n// up memory if you have lots of phrases but no longer need to\n// perform any translation. Also used internally by `replace`.\nPolyglot.prototype.clear = function () {\n this.phrases = {};\n};\n\n// ### polyglot.replace(phrases)\n//\n// Completely replace the existing phrases with a new set of phrases.\n// Normally, just use `extend` to add more phrases, but under certain\n// circumstances, you may want to make sure no old phrases are lying around.\nPolyglot.prototype.replace = function (newPhrases) {\n this.clear();\n this.extend(newPhrases);\n};\n\n\n// ### polyglot.t(key, options)\n//\n// The most-used method. Provide a key, and `t` will return the\n// phrase.\n//\n// polyglot.t(\"hello\");\n// => \"Hello\"\n//\n// The phrase value is provided first by a call to `polyglot.extend()` or\n// `polyglot.replace()`.\n//\n// Pass in an object as the second argument to perform interpolation.\n//\n// polyglot.t(\"hello_name\", {name: \"Spike\"});\n// => \"Hello, Spike\"\n//\n// If you like, you can provide a default value in case the phrase is missing.\n// Use the special option key \"_\" to specify a default.\n//\n// polyglot.t(\"i_like_to_write_in_language\", {\n// _: \"I like to write in %{language}.\",\n// language: \"JavaScript\"\n// });\n// => \"I like to write in JavaScript.\"\n//\nPolyglot.prototype.t = function (key, options) {\n var phrase, result;\n var opts = options == null ? {} : options;\n if (typeof this.phrases[key] === 'string') {\n phrase = this.phrases[key];\n } else if (typeof opts._ === 'string') {\n phrase = opts._;\n } else if (this.onMissingKey) {\n var onMissingKey = this.onMissingKey;\n result = onMissingKey(key, opts, this.currentLocale, this.tokenRegex, this.pluralRules);\n } else {\n this.warn('Missing translation for key: \"' + key + '\"');\n result = key;\n }\n if (typeof phrase === 'string') {\n result = transformPhrase(phrase, opts, this.currentLocale, this.tokenRegex, this.pluralRules);\n }\n return result;\n};\n\n\n// ### polyglot.has(key)\n//\n// Check if polyglot has a translation for given key\nPolyglot.prototype.has = function (key) {\n return has(this.phrases, key);\n};\n\n// export transformPhrase\nPolyglot.transformPhrase = function transform(phrase, substitutions, locale) {\n return transformPhrase(phrase, substitutions, locale);\n};\n\nmodule.exports = Polyglot;\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other\n /* eslint-env browser */\n if (typeof window !== 'undefined' && obj === window) {\n return '{ [object Window] }';\n }\n if (\n (typeof globalThis !== 'undefined' && obj === globalThis)\n || (typeof global !== 'undefined' && obj === global)\n ) {\n return '{ [object globalThis] }';\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n","'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","const isUndefined = (value) => value === undefined;\n\nconst isNull = (value) => value === null;\n\nconst isBoolean = (value) => typeof value === 'boolean';\n\nconst isObject = (value) => value === Object(value);\n\nconst isArray = (value) => Array.isArray(value);\n\nconst isDate = (value) => value instanceof Date;\n\nconst isBlob = (value) =>\n value &&\n typeof value.size === 'number' &&\n typeof value.type === 'string' &&\n typeof value.slice === 'function';\n\nconst isFile = (value) =>\n isBlob(value) &&\n typeof value.name === 'string' &&\n (typeof value.lastModifiedDate === 'object' ||\n typeof value.lastModified === 'number');\n\nconst serialize = (obj, cfg, fd, pre) => {\n cfg = cfg || {};\n\n cfg.indices = isUndefined(cfg.indices) ? false : cfg.indices;\n\n cfg.nullsAsUndefineds = isUndefined(cfg.nullsAsUndefineds)\n ? false\n : cfg.nullsAsUndefineds;\n\n cfg.booleansAsIntegers = isUndefined(cfg.booleansAsIntegers)\n ? false\n : cfg.booleansAsIntegers;\n\n cfg.allowEmptyArrays = isUndefined(cfg.allowEmptyArrays)\n ? false\n : cfg.allowEmptyArrays;\n\n fd = fd || new FormData();\n\n if (isUndefined(obj)) {\n return fd;\n } else if (isNull(obj)) {\n if (!cfg.nullsAsUndefineds) {\n fd.append(pre, '');\n }\n } else if (isBoolean(obj)) {\n if (cfg.booleansAsIntegers) {\n fd.append(pre, obj ? 1 : 0);\n } else {\n fd.append(pre, obj);\n }\n } else if (isArray(obj)) {\n if (obj.length) {\n obj.forEach((value, index) => {\n const key = pre + '[' + (cfg.indices ? index : '') + ']';\n\n serialize(value, cfg, fd, key);\n });\n } else if (cfg.allowEmptyArrays) {\n fd.append(pre + '[]', '');\n }\n } else if (isDate(obj)) {\n fd.append(pre, obj.toISOString());\n } else if (isObject(obj) && !isFile(obj) && !isBlob(obj)) {\n Object.keys(obj).forEach((prop) => {\n const value = obj[prop];\n\n if (isArray(value)) {\n while (prop.length > 2 && prop.lastIndexOf('[]') === prop.length - 2) {\n prop = prop.substring(0, prop.length - 2);\n }\n }\n\n const key = pre ? pre + '[' + prop + ']' : prop;\n\n serialize(value, cfg, fd, key);\n });\n } else {\n fd.append(pre, obj);\n }\n\n return fd;\n};\n\nmodule.exports = {\n serialize,\n};\n","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","/**\n * Srcset Parser\n *\n * By Alex Bell | MIT License\n *\n * JS Parser for the string value that appears in markup \n *\n * @returns Array [{url: _, d: _, w: _, h:_}, ...]\n *\n * Based super duper closely on the reference algorithm at:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute\n *\n * Most comments are copied in directly from the spec\n * (except for comments in parens).\n */\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([], factory);\n\t} else if (typeof module === 'object' && module.exports) {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.parseSrcset = factory();\n\t}\n}(this, function () {\n\n\t// 1. Let input be the value passed to this algorithm.\n\treturn function (input) {\n\n\t\t// UTILITY FUNCTIONS\n\n\t\t// Manual is faster than RegEx\n\t\t// http://bjorn.tipling.com/state-and-regular-expressions-in-javascript\n\t\t// http://jsperf.com/whitespace-character/5\n\t\tfunction isSpace(c) {\n\t\t\treturn (c === \"\\u0020\" || // space\n\t\t\tc === \"\\u0009\" || // horizontal tab\n\t\t\tc === \"\\u000A\" || // new line\n\t\t\tc === \"\\u000C\" || // form feed\n\t\t\tc === \"\\u000D\"); // carriage return\n\t\t}\n\n\t\tfunction collectCharacters(regEx) {\n\t\t\tvar chars,\n\t\t\t\tmatch = regEx.exec(input.substring(pos));\n\t\t\tif (match) {\n\t\t\t\tchars = match[ 0 ];\n\t\t\t\tpos += chars.length;\n\t\t\t\treturn chars;\n\t\t\t}\n\t\t}\n\n\t\tvar inputLength = input.length,\n\n\t\t\t// (Don't use \\s, to avoid matching non-breaking space)\n\t\t\tregexLeadingSpaces = /^[ \\t\\n\\r\\u000c]+/,\n\t\t\tregexLeadingCommasOrSpaces = /^[, \\t\\n\\r\\u000c]+/,\n\t\t\tregexLeadingNotSpaces = /^[^ \\t\\n\\r\\u000c]+/,\n\t\t\tregexTrailingCommas = /[,]+$/,\n\t\t\tregexNonNegativeInteger = /^\\d+$/,\n\n\t\t\t// ( Positive or negative or unsigned integers or decimals, without or without exponents.\n\t\t\t// Must include at least one digit.\n\t\t\t// According to spec tests any decimal point must be followed by a digit.\n\t\t\t// No leading plus sign is allowed.)\n\t\t\t// https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number\n\t\t\tregexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,\n\n\t\t\turl,\n\t\t\tdescriptors,\n\t\t\tcurrentDescriptor,\n\t\t\tstate,\n\t\t\tc,\n\n\t\t\t// 2. Let position be a pointer into input, initially pointing at the start\n\t\t\t// of the string.\n\t\t\tpos = 0,\n\n\t\t\t// 3. Let candidates be an initially empty source set.\n\t\t\tcandidates = [];\n\n\t\t// 4. Splitting loop: Collect a sequence of characters that are space\n\t\t// characters or U+002C COMMA characters. If any U+002C COMMA characters\n\t\t// were collected, that is a parse error.\n\t\twhile (true) {\n\t\t\tcollectCharacters(regexLeadingCommasOrSpaces);\n\n\t\t\t// 5. If position is past the end of input, return candidates and abort these steps.\n\t\t\tif (pos >= inputLength) {\n\t\t\t\treturn candidates; // (we're done, this is the sole return path)\n\t\t\t}\n\n\t\t\t// 6. Collect a sequence of characters that are not space characters,\n\t\t\t// and let that be url.\n\t\t\turl = collectCharacters(regexLeadingNotSpaces);\n\n\t\t\t// 7. Let descriptors be a new empty list.\n\t\t\tdescriptors = [];\n\n\t\t\t// 8. If url ends with a U+002C COMMA character (,), follow these substeps:\n\t\t\t//\t\t(1). Remove all trailing U+002C COMMA characters from url. If this removed\n\t\t\t// more than one character, that is a parse error.\n\t\t\tif (url.slice(-1) === \",\") {\n\t\t\t\turl = url.replace(regexTrailingCommas, \"\");\n\t\t\t\t// (Jump ahead to step 9 to skip tokenization and just push the candidate).\n\t\t\t\tparseDescriptors();\n\n\t\t\t\t//\tOtherwise, follow these substeps:\n\t\t\t} else {\n\t\t\t\ttokenize();\n\t\t\t} // (close else of step 8)\n\n\t\t\t// 16. Return to the step labeled splitting loop.\n\t\t} // (Close of big while loop.)\n\n\t\t/**\n\t\t * Tokenizes descriptor properties prior to parsing\n\t\t * Returns undefined.\n\t\t */\n\t\tfunction tokenize() {\n\n\t\t\t// 8.1. Descriptor tokeniser: Skip whitespace\n\t\t\tcollectCharacters(regexLeadingSpaces);\n\n\t\t\t// 8.2. Let current descriptor be the empty string.\n\t\t\tcurrentDescriptor = \"\";\n\n\t\t\t// 8.3. Let state be in descriptor.\n\t\t\tstate = \"in descriptor\";\n\n\t\t\twhile (true) {\n\n\t\t\t\t// 8.4. Let c be the character at position.\n\t\t\t\tc = input.charAt(pos);\n\n\t\t\t\t// Do the following depending on the value of state.\n\t\t\t\t// For the purpose of this step, \"EOF\" is a special character representing\n\t\t\t\t// that position is past the end of input.\n\n\t\t\t\t// In descriptor\n\t\t\t\tif (state === \"in descriptor\") {\n\t\t\t\t\t// Do the following, depending on the value of c:\n\n\t\t\t\t\t// Space character\n\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t// descriptors and let current descriptor be the empty string.\n\t\t\t\t\t// Set state to after descriptor.\n\t\t\t\t\tif (isSpace(c)) {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t\tcurrentDescriptor = \"\";\n\t\t\t\t\t\t\tstate = \"after descriptor\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// U+002C COMMA (,)\n\t\t\t\t\t\t// Advance position to the next character in input. If current descriptor\n\t\t\t\t\t\t// is not empty, append current descriptor to descriptors. Jump to the step\n\t\t\t\t\t\t// labeled descriptor parser.\n\t\t\t\t\t} else if (c === \",\") {\n\t\t\t\t\t\tpos += 1;\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// U+0028 LEFT PARENTHESIS (()\n\t\t\t\t\t\t// Append c to current descriptor. Set state to in parens.\n\t\t\t\t\t} else if (c === \"\\u0028\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in parens\";\n\n\t\t\t\t\t\t// EOF\n\t\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t\t// descriptors. Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\t\t\t\t\t// (end \"in descriptor\"\n\n\t\t\t\t\t// In parens\n\t\t\t\t} else if (state === \"in parens\") {\n\n\t\t\t\t\t// U+0029 RIGHT PARENTHESIS ())\n\t\t\t\t\t// Append c to current descriptor. Set state to in descriptor.\n\t\t\t\t\tif (c === \")\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in descriptor\";\n\n\t\t\t\t\t\t// EOF\n\t\t\t\t\t\t// Append current descriptor to descriptors. Jump to the step labeled\n\t\t\t\t\t\t// descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\n\t\t\t\t\t// After descriptor\n\t\t\t\t} else if (state === \"after descriptor\") {\n\n\t\t\t\t\t// Do the following, depending on the value of c:\n\t\t\t\t\t// Space character: Stay in this state.\n\t\t\t\t\tif (isSpace(c)) {\n\n\t\t\t\t\t\t// EOF: Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Set state to in descriptor. Set position to the previous character in input.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = \"in descriptor\";\n\t\t\t\t\t\tpos -= 1;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Advance position to the next character in input.\n\t\t\t\tpos += 1;\n\n\t\t\t\t// Repeat this step.\n\t\t\t} // (close while true loop)\n\t\t}\n\n\t\t/**\n\t\t * Adds descriptor properties to a candidate, pushes to the candidates array\n\t\t * @return undefined\n\t\t */\n\t\t// Declared outside of the while loop so that it's only created once.\n\t\tfunction parseDescriptors() {\n\n\t\t\t// 9. Descriptor parser: Let error be no.\n\t\t\tvar pError = false,\n\n\t\t\t\t// 10. Let width be absent.\n\t\t\t\t// 11. Let density be absent.\n\t\t\t\t// 12. Let future-compat-h be absent. (We're implementing it now as h)\n\t\t\t\tw, d, h, i,\n\t\t\t\tcandidate = {},\n\t\t\t\tdesc, lastChar, value, intVal, floatVal;\n\n\t\t\t// 13. For each descriptor in descriptors, run the appropriate set of steps\n\t\t\t// from the following list:\n\t\t\tfor (i = 0 ; i < descriptors.length; i++) {\n\t\t\t\tdesc = descriptors[ i ];\n\n\t\t\t\tlastChar = desc[ desc.length - 1 ];\n\t\t\t\tvalue = desc.substring(0, desc.length - 1);\n\t\t\t\tintVal = parseInt(value, 10);\n\t\t\t\tfloatVal = parseFloat(value);\n\n\t\t\t\t// If the descriptor consists of a valid non-negative integer followed by\n\t\t\t\t// a U+0077 LATIN SMALL LETTER W character\n\t\t\t\tif (regexNonNegativeInteger.test(value) && (lastChar === \"w\")) {\n\n\t\t\t\t\t// If width and density are not both absent, then let error be yes.\n\t\t\t\t\tif (w || d) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing non-negative integers to the descriptor.\n\t\t\t\t\t// If the result is zero, let error be yes.\n\t\t\t\t\t// Otherwise, let width be the result.\n\t\t\t\t\tif (intVal === 0) {pError = true;} else {w = intVal;}\n\n\t\t\t\t\t// If the descriptor consists of a valid floating-point number followed by\n\t\t\t\t\t// a U+0078 LATIN SMALL LETTER X character\n\t\t\t\t} else if (regexFloatingPoint.test(value) && (lastChar === \"x\")) {\n\n\t\t\t\t\t// If width, density and future-compat-h are not all absent, then let error\n\t\t\t\t\t// be yes.\n\t\t\t\t\tif (w || d || h) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing floating-point number values to the descriptor.\n\t\t\t\t\t// If the result is less than zero, let error be yes. Otherwise, let density\n\t\t\t\t\t// be the result.\n\t\t\t\t\tif (floatVal < 0) {pError = true;} else {d = floatVal;}\n\n\t\t\t\t\t// If the descriptor consists of a valid non-negative integer followed by\n\t\t\t\t\t// a U+0068 LATIN SMALL LETTER H character\n\t\t\t\t} else if (regexNonNegativeInteger.test(value) && (lastChar === \"h\")) {\n\n\t\t\t\t\t// If height and density are not both absent, then let error be yes.\n\t\t\t\t\tif (h || d) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing non-negative integers to the descriptor.\n\t\t\t\t\t// If the result is zero, let error be yes. Otherwise, let future-compat-h\n\t\t\t\t\t// be the result.\n\t\t\t\t\tif (intVal === 0) {pError = true;} else {h = intVal;}\n\n\t\t\t\t\t// Anything else, Let error be yes.\n\t\t\t\t} else {pError = true;}\n\t\t\t} // (close step 13 for loop)\n\n\t\t\t// 15. If error is still no, then append a new image source to candidates whose\n\t\t\t// URL is url, associated with a width width if not absent and a pixel\n\t\t\t// density density if not absent. Otherwise, there is a parse error.\n\t\t\tif (!pError) {\n\t\t\t\tcandidate.url = url;\n\t\t\t\tif (w) { candidate.w = w;}\n\t\t\t\tif (d) { candidate.d = d;}\n\t\t\t\tif (h) { candidate.h = h;}\n\t\t\t\tcandidates.push(candidate);\n\t\t\t} else if (console && console.log) {\n\t\t\t\tconsole.log(\"Invalid srcset descriptor found in '\" +\n\t\t\t\t\tinput + \"' at '\" + desc + \"'.\");\n\t\t\t}\n\t\t} // (close parseDescriptors fn)\n\n\t}\n}));\n","/**\n * @licstart The following is the entire license notice for the\n * JavaScript code in this page\n *\n * Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @licend The above is the entire license notice for the\n * JavaScript code in this page\n */\n\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"pdfjs-dist/build/pdf\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"pdfjs-dist/build/pdf\"] = factory();\n\telse\n\t\troot[\"pdfjs-dist/build/pdf\"] = root.pdfjsLib = factory();\n})(this, () => {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ([\n/* 0 */,\n/* 1 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.VerbosityLevel = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.UNSUPPORTED_FEATURES = exports.TextRenderingMode = exports.StreamType = exports.RenderingIntentFlag = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.PageActionEventType = exports.OPS = exports.MissingPDFException = exports.InvalidPDFException = exports.ImageKind = exports.IDENTITY_MATRIX = exports.FormatError = exports.FontType = exports.FeatureTest = exports.FONT_IDENTITY_MATRIX = exports.DocumentActionEventType = exports.CMapCompressionType = exports.BaseException = exports.AnnotationType = exports.AnnotationStateModelType = exports.AnnotationReviewState = exports.AnnotationReplyType = exports.AnnotationMode = exports.AnnotationMarkedState = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.AnnotationActionEventType = exports.AbortException = void 0;\nexports.arrayByteLength = arrayByteLength;\nexports.arraysToBytes = arraysToBytes;\nexports.assert = assert;\nexports.bytesToString = bytesToString;\nexports.createPromiseCapability = createPromiseCapability;\nexports.createValidAbsoluteUrl = createValidAbsoluteUrl;\nexports.escapeString = escapeString;\nexports.getModificationDate = getModificationDate;\nexports.getVerbosityLevel = getVerbosityLevel;\nexports.info = info;\nexports.isArrayBuffer = isArrayBuffer;\nexports.isArrayEqual = isArrayEqual;\nexports.isAscii = isAscii;\nexports.objectFromMap = objectFromMap;\nexports.objectSize = objectSize;\nexports.setVerbosityLevel = setVerbosityLevel;\nexports.shadow = shadow;\nexports.string32 = string32;\nexports.stringToBytes = stringToBytes;\nexports.stringToPDFString = stringToPDFString;\nexports.stringToUTF16BEString = stringToUTF16BEString;\nexports.stringToUTF8String = stringToUTF8String;\nexports.unreachable = unreachable;\nexports.utf8StringToString = utf8StringToString;\nexports.warn = warn;\n\n__w_pdfjs_require__(2);\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];\nexports.IDENTITY_MATRIX = IDENTITY_MATRIX;\nvar FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];\nexports.FONT_IDENTITY_MATRIX = FONT_IDENTITY_MATRIX;\nvar RenderingIntentFlag = {\n ANY: 0x01,\n DISPLAY: 0x02,\n PRINT: 0x04,\n ANNOTATIONS_FORMS: 0x10,\n ANNOTATIONS_STORAGE: 0x20,\n ANNOTATIONS_DISABLE: 0x40,\n OPLIST: 0x100\n};\nexports.RenderingIntentFlag = RenderingIntentFlag;\nvar AnnotationMode = {\n DISABLE: 0,\n ENABLE: 1,\n ENABLE_FORMS: 2,\n ENABLE_STORAGE: 3\n};\nexports.AnnotationMode = AnnotationMode;\nvar PermissionFlag = {\n PRINT: 0x04,\n MODIFY_CONTENTS: 0x08,\n COPY: 0x10,\n MODIFY_ANNOTATIONS: 0x20,\n FILL_INTERACTIVE_FORMS: 0x100,\n COPY_FOR_ACCESSIBILITY: 0x200,\n ASSEMBLE: 0x400,\n PRINT_HIGH_QUALITY: 0x800\n};\nexports.PermissionFlag = PermissionFlag;\nvar TextRenderingMode = {\n FILL: 0,\n STROKE: 1,\n FILL_STROKE: 2,\n INVISIBLE: 3,\n FILL_ADD_TO_PATH: 4,\n STROKE_ADD_TO_PATH: 5,\n FILL_STROKE_ADD_TO_PATH: 6,\n ADD_TO_PATH: 7,\n FILL_STROKE_MASK: 3,\n ADD_TO_PATH_FLAG: 4\n};\nexports.TextRenderingMode = TextRenderingMode;\nvar ImageKind = {\n GRAYSCALE_1BPP: 1,\n RGB_24BPP: 2,\n RGBA_32BPP: 3\n};\nexports.ImageKind = ImageKind;\nvar AnnotationType = {\n TEXT: 1,\n LINK: 2,\n FREETEXT: 3,\n LINE: 4,\n SQUARE: 5,\n CIRCLE: 6,\n POLYGON: 7,\n POLYLINE: 8,\n HIGHLIGHT: 9,\n UNDERLINE: 10,\n SQUIGGLY: 11,\n STRIKEOUT: 12,\n STAMP: 13,\n CARET: 14,\n INK: 15,\n POPUP: 16,\n FILEATTACHMENT: 17,\n SOUND: 18,\n MOVIE: 19,\n WIDGET: 20,\n SCREEN: 21,\n PRINTERMARK: 22,\n TRAPNET: 23,\n WATERMARK: 24,\n THREED: 25,\n REDACT: 26\n};\nexports.AnnotationType = AnnotationType;\nvar AnnotationStateModelType = {\n MARKED: \"Marked\",\n REVIEW: \"Review\"\n};\nexports.AnnotationStateModelType = AnnotationStateModelType;\nvar AnnotationMarkedState = {\n MARKED: \"Marked\",\n UNMARKED: \"Unmarked\"\n};\nexports.AnnotationMarkedState = AnnotationMarkedState;\nvar AnnotationReviewState = {\n ACCEPTED: \"Accepted\",\n REJECTED: \"Rejected\",\n CANCELLED: \"Cancelled\",\n COMPLETED: \"Completed\",\n NONE: \"None\"\n};\nexports.AnnotationReviewState = AnnotationReviewState;\nvar AnnotationReplyType = {\n GROUP: \"Group\",\n REPLY: \"R\"\n};\nexports.AnnotationReplyType = AnnotationReplyType;\nvar AnnotationFlag = {\n INVISIBLE: 0x01,\n HIDDEN: 0x02,\n PRINT: 0x04,\n NOZOOM: 0x08,\n NOROTATE: 0x10,\n NOVIEW: 0x20,\n READONLY: 0x40,\n LOCKED: 0x80,\n TOGGLENOVIEW: 0x100,\n LOCKEDCONTENTS: 0x200\n};\nexports.AnnotationFlag = AnnotationFlag;\nvar AnnotationFieldFlag = {\n READONLY: 0x0000001,\n REQUIRED: 0x0000002,\n NOEXPORT: 0x0000004,\n MULTILINE: 0x0001000,\n PASSWORD: 0x0002000,\n NOTOGGLETOOFF: 0x0004000,\n RADIO: 0x0008000,\n PUSHBUTTON: 0x0010000,\n COMBO: 0x0020000,\n EDIT: 0x0040000,\n SORT: 0x0080000,\n FILESELECT: 0x0100000,\n MULTISELECT: 0x0200000,\n DONOTSPELLCHECK: 0x0400000,\n DONOTSCROLL: 0x0800000,\n COMB: 0x1000000,\n RICHTEXT: 0x2000000,\n RADIOSINUNISON: 0x2000000,\n COMMITONSELCHANGE: 0x4000000\n};\nexports.AnnotationFieldFlag = AnnotationFieldFlag;\nvar AnnotationBorderStyleType = {\n SOLID: 1,\n DASHED: 2,\n BEVELED: 3,\n INSET: 4,\n UNDERLINE: 5\n};\nexports.AnnotationBorderStyleType = AnnotationBorderStyleType;\nvar AnnotationActionEventType = {\n E: \"Mouse Enter\",\n X: \"Mouse Exit\",\n D: \"Mouse Down\",\n U: \"Mouse Up\",\n Fo: \"Focus\",\n Bl: \"Blur\",\n PO: \"PageOpen\",\n PC: \"PageClose\",\n PV: \"PageVisible\",\n PI: \"PageInvisible\",\n K: \"Keystroke\",\n F: \"Format\",\n V: \"Validate\",\n C: \"Calculate\"\n};\nexports.AnnotationActionEventType = AnnotationActionEventType;\nvar DocumentActionEventType = {\n WC: \"WillClose\",\n WS: \"WillSave\",\n DS: \"DidSave\",\n WP: \"WillPrint\",\n DP: \"DidPrint\"\n};\nexports.DocumentActionEventType = DocumentActionEventType;\nvar PageActionEventType = {\n O: \"PageOpen\",\n C: \"PageClose\"\n};\nexports.PageActionEventType = PageActionEventType;\nvar StreamType = {\n UNKNOWN: \"UNKNOWN\",\n FLATE: \"FLATE\",\n LZW: \"LZW\",\n DCT: \"DCT\",\n JPX: \"JPX\",\n JBIG: \"JBIG\",\n A85: \"A85\",\n AHX: \"AHX\",\n CCF: \"CCF\",\n RLX: \"RLX\"\n};\nexports.StreamType = StreamType;\nvar FontType = {\n UNKNOWN: \"UNKNOWN\",\n TYPE1: \"TYPE1\",\n TYPE1STANDARD: \"TYPE1STANDARD\",\n TYPE1C: \"TYPE1C\",\n CIDFONTTYPE0: \"CIDFONTTYPE0\",\n CIDFONTTYPE0C: \"CIDFONTTYPE0C\",\n TRUETYPE: \"TRUETYPE\",\n CIDFONTTYPE2: \"CIDFONTTYPE2\",\n TYPE3: \"TYPE3\",\n OPENTYPE: \"OPENTYPE\",\n TYPE0: \"TYPE0\",\n MMTYPE1: \"MMTYPE1\"\n};\nexports.FontType = FontType;\nvar VerbosityLevel = {\n ERRORS: 0,\n WARNINGS: 1,\n INFOS: 5\n};\nexports.VerbosityLevel = VerbosityLevel;\nvar CMapCompressionType = {\n NONE: 0,\n BINARY: 1,\n STREAM: 2\n};\nexports.CMapCompressionType = CMapCompressionType;\nvar OPS = {\n dependency: 1,\n setLineWidth: 2,\n setLineCap: 3,\n setLineJoin: 4,\n setMiterLimit: 5,\n setDash: 6,\n setRenderingIntent: 7,\n setFlatness: 8,\n setGState: 9,\n save: 10,\n restore: 11,\n transform: 12,\n moveTo: 13,\n lineTo: 14,\n curveTo: 15,\n curveTo2: 16,\n curveTo3: 17,\n closePath: 18,\n rectangle: 19,\n stroke: 20,\n closeStroke: 21,\n fill: 22,\n eoFill: 23,\n fillStroke: 24,\n eoFillStroke: 25,\n closeFillStroke: 26,\n closeEOFillStroke: 27,\n endPath: 28,\n clip: 29,\n eoClip: 30,\n beginText: 31,\n endText: 32,\n setCharSpacing: 33,\n setWordSpacing: 34,\n setHScale: 35,\n setLeading: 36,\n setFont: 37,\n setTextRenderingMode: 38,\n setTextRise: 39,\n moveText: 40,\n setLeadingMoveText: 41,\n setTextMatrix: 42,\n nextLine: 43,\n showText: 44,\n showSpacedText: 45,\n nextLineShowText: 46,\n nextLineSetSpacingShowText: 47,\n setCharWidth: 48,\n setCharWidthAndBounds: 49,\n setStrokeColorSpace: 50,\n setFillColorSpace: 51,\n setStrokeColor: 52,\n setStrokeColorN: 53,\n setFillColor: 54,\n setFillColorN: 55,\n setStrokeGray: 56,\n setFillGray: 57,\n setStrokeRGBColor: 58,\n setFillRGBColor: 59,\n setStrokeCMYKColor: 60,\n setFillCMYKColor: 61,\n shadingFill: 62,\n beginInlineImage: 63,\n beginImageData: 64,\n endInlineImage: 65,\n paintXObject: 66,\n markPoint: 67,\n markPointProps: 68,\n beginMarkedContent: 69,\n beginMarkedContentProps: 70,\n endMarkedContent: 71,\n beginCompat: 72,\n endCompat: 73,\n paintFormXObjectBegin: 74,\n paintFormXObjectEnd: 75,\n beginGroup: 76,\n endGroup: 77,\n beginAnnotations: 78,\n endAnnotations: 79,\n beginAnnotation: 80,\n endAnnotation: 81,\n paintJpegXObject: 82,\n paintImageMaskXObject: 83,\n paintImageMaskXObjectGroup: 84,\n paintImageXObject: 85,\n paintInlineImageXObject: 86,\n paintInlineImageXObjectGroup: 87,\n paintImageXObjectRepeat: 88,\n paintImageMaskXObjectRepeat: 89,\n paintSolidColorImageMask: 90,\n constructPath: 91\n};\nexports.OPS = OPS;\nvar UNSUPPORTED_FEATURES = {\n unknown: \"unknown\",\n forms: \"forms\",\n javaScript: \"javaScript\",\n signatures: \"signatures\",\n smask: \"smask\",\n shadingPattern: \"shadingPattern\",\n font: \"font\",\n errorTilingPattern: \"errorTilingPattern\",\n errorExtGState: \"errorExtGState\",\n errorXObject: \"errorXObject\",\n errorFontLoadType3: \"errorFontLoadType3\",\n errorFontState: \"errorFontState\",\n errorFontMissing: \"errorFontMissing\",\n errorFontTranslate: \"errorFontTranslate\",\n errorColorSpace: \"errorColorSpace\",\n errorOperatorList: \"errorOperatorList\",\n errorFontToUnicode: \"errorFontToUnicode\",\n errorFontLoadNative: \"errorFontLoadNative\",\n errorFontBuildPath: \"errorFontBuildPath\",\n errorFontGetPath: \"errorFontGetPath\",\n errorMarkedContent: \"errorMarkedContent\",\n errorContentSubStream: \"errorContentSubStream\"\n};\nexports.UNSUPPORTED_FEATURES = UNSUPPORTED_FEATURES;\nvar PasswordResponses = {\n NEED_PASSWORD: 1,\n INCORRECT_PASSWORD: 2\n};\nexports.PasswordResponses = PasswordResponses;\nvar verbosity = VerbosityLevel.WARNINGS;\n\nfunction setVerbosityLevel(level) {\n if (Number.isInteger(level)) {\n verbosity = level;\n }\n}\n\nfunction getVerbosityLevel() {\n return verbosity;\n}\n\nfunction info(msg) {\n if (verbosity >= VerbosityLevel.INFOS) {\n console.log(\"Info: \".concat(msg));\n }\n}\n\nfunction warn(msg) {\n if (verbosity >= VerbosityLevel.WARNINGS) {\n console.log(\"Warning: \".concat(msg));\n }\n}\n\nfunction unreachable(msg) {\n throw new Error(msg);\n}\n\nfunction assert(cond, msg) {\n if (!cond) {\n unreachable(msg);\n }\n}\n\nfunction _isValidProtocol(url) {\n if (!url) {\n return false;\n }\n\n switch (url.protocol) {\n case \"http:\":\n case \"https:\":\n case \"ftp:\":\n case \"mailto:\":\n case \"tel:\":\n return true;\n\n default:\n return false;\n }\n}\n\nfunction createValidAbsoluteUrl(url) {\n var baseUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (!url) {\n return null;\n }\n\n try {\n if (options && typeof url === \"string\") {\n if (options.addDefaultProtocol && url.startsWith(\"www.\")) {\n var dots = url.match(/\\./g);\n\n if (dots && dots.length >= 2) {\n url = \"http://\".concat(url);\n }\n }\n\n if (options.tryConvertEncoding) {\n try {\n url = stringToUTF8String(url);\n } catch (ex) {}\n }\n }\n\n var absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url);\n\n if (_isValidProtocol(absoluteUrl)) {\n return absoluteUrl;\n }\n } catch (ex) {}\n\n return null;\n}\n\nfunction shadow(obj, prop, value) {\n Object.defineProperty(obj, prop, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: false\n });\n return value;\n}\n\nvar BaseException = function BaseExceptionClosure() {\n function BaseException(message, name) {\n if (this.constructor === BaseException) {\n unreachable(\"Cannot initialize BaseException.\");\n }\n\n this.message = message;\n this.name = name;\n }\n\n BaseException.prototype = new Error();\n BaseException.constructor = BaseException;\n return BaseException;\n}();\n\nexports.BaseException = BaseException;\n\nvar PasswordException = /*#__PURE__*/function (_BaseException) {\n _inherits(PasswordException, _BaseException);\n\n var _super = _createSuper(PasswordException);\n\n function PasswordException(msg, code) {\n var _this;\n\n _classCallCheck(this, PasswordException);\n\n _this = _super.call(this, msg, \"PasswordException\");\n _this.code = code;\n return _this;\n }\n\n return _createClass(PasswordException);\n}(BaseException);\n\nexports.PasswordException = PasswordException;\n\nvar UnknownErrorException = /*#__PURE__*/function (_BaseException2) {\n _inherits(UnknownErrorException, _BaseException2);\n\n var _super2 = _createSuper(UnknownErrorException);\n\n function UnknownErrorException(msg, details) {\n var _this2;\n\n _classCallCheck(this, UnknownErrorException);\n\n _this2 = _super2.call(this, msg, \"UnknownErrorException\");\n _this2.details = details;\n return _this2;\n }\n\n return _createClass(UnknownErrorException);\n}(BaseException);\n\nexports.UnknownErrorException = UnknownErrorException;\n\nvar InvalidPDFException = /*#__PURE__*/function (_BaseException3) {\n _inherits(InvalidPDFException, _BaseException3);\n\n var _super3 = _createSuper(InvalidPDFException);\n\n function InvalidPDFException(msg) {\n _classCallCheck(this, InvalidPDFException);\n\n return _super3.call(this, msg, \"InvalidPDFException\");\n }\n\n return _createClass(InvalidPDFException);\n}(BaseException);\n\nexports.InvalidPDFException = InvalidPDFException;\n\nvar MissingPDFException = /*#__PURE__*/function (_BaseException4) {\n _inherits(MissingPDFException, _BaseException4);\n\n var _super4 = _createSuper(MissingPDFException);\n\n function MissingPDFException(msg) {\n _classCallCheck(this, MissingPDFException);\n\n return _super4.call(this, msg, \"MissingPDFException\");\n }\n\n return _createClass(MissingPDFException);\n}(BaseException);\n\nexports.MissingPDFException = MissingPDFException;\n\nvar UnexpectedResponseException = /*#__PURE__*/function (_BaseException5) {\n _inherits(UnexpectedResponseException, _BaseException5);\n\n var _super5 = _createSuper(UnexpectedResponseException);\n\n function UnexpectedResponseException(msg, status) {\n var _this3;\n\n _classCallCheck(this, UnexpectedResponseException);\n\n _this3 = _super5.call(this, msg, \"UnexpectedResponseException\");\n _this3.status = status;\n return _this3;\n }\n\n return _createClass(UnexpectedResponseException);\n}(BaseException);\n\nexports.UnexpectedResponseException = UnexpectedResponseException;\n\nvar FormatError = /*#__PURE__*/function (_BaseException6) {\n _inherits(FormatError, _BaseException6);\n\n var _super6 = _createSuper(FormatError);\n\n function FormatError(msg) {\n _classCallCheck(this, FormatError);\n\n return _super6.call(this, msg, \"FormatError\");\n }\n\n return _createClass(FormatError);\n}(BaseException);\n\nexports.FormatError = FormatError;\n\nvar AbortException = /*#__PURE__*/function (_BaseException7) {\n _inherits(AbortException, _BaseException7);\n\n var _super7 = _createSuper(AbortException);\n\n function AbortException(msg) {\n _classCallCheck(this, AbortException);\n\n return _super7.call(this, msg, \"AbortException\");\n }\n\n return _createClass(AbortException);\n}(BaseException);\n\nexports.AbortException = AbortException;\n\nfunction bytesToString(bytes) {\n if (_typeof(bytes) !== \"object\" || bytes === null || bytes.length === undefined) {\n unreachable(\"Invalid argument for bytesToString\");\n }\n\n var length = bytes.length;\n var MAX_ARGUMENT_COUNT = 8192;\n\n if (length < MAX_ARGUMENT_COUNT) {\n return String.fromCharCode.apply(null, bytes);\n }\n\n var strBuf = [];\n\n for (var i = 0; i < length; i += MAX_ARGUMENT_COUNT) {\n var chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);\n var chunk = bytes.subarray(i, chunkEnd);\n strBuf.push(String.fromCharCode.apply(null, chunk));\n }\n\n return strBuf.join(\"\");\n}\n\nfunction stringToBytes(str) {\n if (typeof str !== \"string\") {\n unreachable(\"Invalid argument for stringToBytes\");\n }\n\n var length = str.length;\n var bytes = new Uint8Array(length);\n\n for (var i = 0; i < length; ++i) {\n bytes[i] = str.charCodeAt(i) & 0xff;\n }\n\n return bytes;\n}\n\nfunction arrayByteLength(arr) {\n if (arr.length !== undefined) {\n return arr.length;\n }\n\n if (arr.byteLength !== undefined) {\n return arr.byteLength;\n }\n\n unreachable(\"Invalid argument for arrayByteLength\");\n}\n\nfunction arraysToBytes(arr) {\n var length = arr.length;\n\n if (length === 1 && arr[0] instanceof Uint8Array) {\n return arr[0];\n }\n\n var resultLength = 0;\n\n for (var i = 0; i < length; i++) {\n resultLength += arrayByteLength(arr[i]);\n }\n\n var pos = 0;\n var data = new Uint8Array(resultLength);\n\n for (var _i = 0; _i < length; _i++) {\n var item = arr[_i];\n\n if (!(item instanceof Uint8Array)) {\n if (typeof item === \"string\") {\n item = stringToBytes(item);\n } else {\n item = new Uint8Array(item);\n }\n }\n\n var itemLength = item.byteLength;\n data.set(item, pos);\n pos += itemLength;\n }\n\n return data;\n}\n\nfunction string32(value) {\n return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff);\n}\n\nfunction objectSize(obj) {\n return Object.keys(obj).length;\n}\n\nfunction objectFromMap(map) {\n var obj = Object.create(null);\n\n var _iterator = _createForOfIteratorHelper(map),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n key = _step$value[0],\n value = _step$value[1];\n\n obj[key] = value;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return obj;\n}\n\nfunction isLittleEndian() {\n var buffer8 = new Uint8Array(4);\n buffer8[0] = 1;\n var view32 = new Uint32Array(buffer8.buffer, 0, 1);\n return view32[0] === 1;\n}\n\nfunction isEvalSupported() {\n try {\n new Function(\"\");\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar FeatureTest = /*#__PURE__*/function () {\n function FeatureTest() {\n _classCallCheck(this, FeatureTest);\n }\n\n _createClass(FeatureTest, null, [{\n key: \"isLittleEndian\",\n get: function get() {\n return shadow(this, \"isLittleEndian\", isLittleEndian());\n }\n }, {\n key: \"isEvalSupported\",\n get: function get() {\n return shadow(this, \"isEvalSupported\", isEvalSupported());\n }\n }, {\n key: \"isOffscreenCanvasSupported\",\n get: function get() {\n return shadow(this, \"isOffscreenCanvasSupported\", typeof OffscreenCanvas !== \"undefined\");\n }\n }]);\n\n return FeatureTest;\n}();\n\nexports.FeatureTest = FeatureTest;\n\nvar hexNumbers = _toConsumableArray(Array(256).keys()).map(function (n) {\n return n.toString(16).padStart(2, \"0\");\n});\n\nvar Util = /*#__PURE__*/function () {\n function Util() {\n _classCallCheck(this, Util);\n }\n\n _createClass(Util, null, [{\n key: \"makeHexColor\",\n value: function makeHexColor(r, g, b) {\n return \"#\".concat(hexNumbers[r]).concat(hexNumbers[g]).concat(hexNumbers[b]);\n }\n }, {\n key: \"scaleMinMax\",\n value: function scaleMinMax(transform, minMax) {\n var temp;\n\n if (transform[0]) {\n if (transform[0] < 0) {\n temp = minMax[0];\n minMax[0] = minMax[1];\n minMax[1] = temp;\n }\n\n minMax[0] *= transform[0];\n minMax[1] *= transform[0];\n\n if (transform[3] < 0) {\n temp = minMax[2];\n minMax[2] = minMax[3];\n minMax[3] = temp;\n }\n\n minMax[2] *= transform[3];\n minMax[3] *= transform[3];\n } else {\n temp = minMax[0];\n minMax[0] = minMax[2];\n minMax[2] = temp;\n temp = minMax[1];\n minMax[1] = minMax[3];\n minMax[3] = temp;\n\n if (transform[1] < 0) {\n temp = minMax[2];\n minMax[2] = minMax[3];\n minMax[3] = temp;\n }\n\n minMax[2] *= transform[1];\n minMax[3] *= transform[1];\n\n if (transform[2] < 0) {\n temp = minMax[0];\n minMax[0] = minMax[1];\n minMax[1] = temp;\n }\n\n minMax[0] *= transform[2];\n minMax[1] *= transform[2];\n }\n\n minMax[0] += transform[4];\n minMax[1] += transform[4];\n minMax[2] += transform[5];\n minMax[3] += transform[5];\n }\n }, {\n key: \"transform\",\n value: function transform(m1, m2) {\n return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]];\n }\n }, {\n key: \"applyTransform\",\n value: function applyTransform(p, m) {\n var xt = p[0] * m[0] + p[1] * m[2] + m[4];\n var yt = p[0] * m[1] + p[1] * m[3] + m[5];\n return [xt, yt];\n }\n }, {\n key: \"applyInverseTransform\",\n value: function applyInverseTransform(p, m) {\n var d = m[0] * m[3] - m[1] * m[2];\n var xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;\n var yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;\n return [xt, yt];\n }\n }, {\n key: \"getAxialAlignedBoundingBox\",\n value: function getAxialAlignedBoundingBox(r, m) {\n var p1 = Util.applyTransform(r, m);\n var p2 = Util.applyTransform(r.slice(2, 4), m);\n var p3 = Util.applyTransform([r[0], r[3]], m);\n var p4 = Util.applyTransform([r[2], r[1]], m);\n return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])];\n }\n }, {\n key: \"inverseTransform\",\n value: function inverseTransform(m) {\n var d = m[0] * m[3] - m[1] * m[2];\n return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];\n }\n }, {\n key: \"apply3dTransform\",\n value: function apply3dTransform(m, v) {\n return [m[0] * v[0] + m[1] * v[1] + m[2] * v[2], m[3] * v[0] + m[4] * v[1] + m[5] * v[2], m[6] * v[0] + m[7] * v[1] + m[8] * v[2]];\n }\n }, {\n key: \"singularValueDecompose2dScale\",\n value: function singularValueDecompose2dScale(m) {\n var transpose = [m[0], m[2], m[1], m[3]];\n var a = m[0] * transpose[0] + m[1] * transpose[2];\n var b = m[0] * transpose[1] + m[1] * transpose[3];\n var c = m[2] * transpose[0] + m[3] * transpose[2];\n var d = m[2] * transpose[1] + m[3] * transpose[3];\n var first = (a + d) / 2;\n var second = Math.sqrt(Math.pow(a + d, 2) - 4 * (a * d - c * b)) / 2;\n var sx = first + second || 1;\n var sy = first - second || 1;\n return [Math.sqrt(sx), Math.sqrt(sy)];\n }\n }, {\n key: \"normalizeRect\",\n value: function normalizeRect(rect) {\n var r = rect.slice(0);\n\n if (rect[0] > rect[2]) {\n r[0] = rect[2];\n r[2] = rect[0];\n }\n\n if (rect[1] > rect[3]) {\n r[1] = rect[3];\n r[3] = rect[1];\n }\n\n return r;\n }\n }, {\n key: \"intersect\",\n value: function intersect(rect1, rect2) {\n var xLow = Math.max(Math.min(rect1[0], rect1[2]), Math.min(rect2[0], rect2[2]));\n var xHigh = Math.min(Math.max(rect1[0], rect1[2]), Math.max(rect2[0], rect2[2]));\n\n if (xLow > xHigh) {\n return null;\n }\n\n var yLow = Math.max(Math.min(rect1[1], rect1[3]), Math.min(rect2[1], rect2[3]));\n var yHigh = Math.min(Math.max(rect1[1], rect1[3]), Math.max(rect2[1], rect2[3]));\n\n if (yLow > yHigh) {\n return null;\n }\n\n return [xLow, yLow, xHigh, yHigh];\n }\n }, {\n key: \"bezierBoundingBox\",\n value: function bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3) {\n var tvalues = [],\n bounds = [[], []];\n var a, b, c, t, t1, t2, b2ac, sqrtb2ac;\n\n for (var i = 0; i < 2; ++i) {\n if (i === 0) {\n b = 6 * x0 - 12 * x1 + 6 * x2;\n a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n c = 3 * x1 - 3 * x0;\n } else {\n b = 6 * y0 - 12 * y1 + 6 * y2;\n a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n c = 3 * y1 - 3 * y0;\n }\n\n if (Math.abs(a) < 1e-12) {\n if (Math.abs(b) < 1e-12) {\n continue;\n }\n\n t = -c / b;\n\n if (0 < t && t < 1) {\n tvalues.push(t);\n }\n\n continue;\n }\n\n b2ac = b * b - 4 * c * a;\n sqrtb2ac = Math.sqrt(b2ac);\n\n if (b2ac < 0) {\n continue;\n }\n\n t1 = (-b + sqrtb2ac) / (2 * a);\n\n if (0 < t1 && t1 < 1) {\n tvalues.push(t1);\n }\n\n t2 = (-b - sqrtb2ac) / (2 * a);\n\n if (0 < t2 && t2 < 1) {\n tvalues.push(t2);\n }\n }\n\n var j = tvalues.length,\n mt;\n var jlen = j;\n\n while (j--) {\n t = tvalues[j];\n mt = 1 - t;\n bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3;\n bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3;\n }\n\n bounds[0][jlen] = x0;\n bounds[1][jlen] = y0;\n bounds[0][jlen + 1] = x3;\n bounds[1][jlen + 1] = y3;\n bounds[0].length = bounds[1].length = jlen + 2;\n return [Math.min.apply(Math, _toConsumableArray(bounds[0])), Math.min.apply(Math, _toConsumableArray(bounds[1])), Math.max.apply(Math, _toConsumableArray(bounds[0])), Math.max.apply(Math, _toConsumableArray(bounds[1]))];\n }\n }]);\n\n return Util;\n}();\n\nexports.Util = Util;\nvar PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2d8, 0x2c7, 0x2c6, 0x2d9, 0x2dd, 0x2db, 0x2da, 0x2dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018, 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x141, 0x152, 0x160, 0x178, 0x17d, 0x131, 0x142, 0x153, 0x161, 0x17e, 0, 0x20ac];\n\nfunction stringToPDFString(str) {\n if (str[0] >= \"\\xEF\") {\n var encoding;\n\n if (str[0] === \"\\xFE\" && str[1] === \"\\xFF\") {\n encoding = \"utf-16be\";\n } else if (str[0] === \"\\xFF\" && str[1] === \"\\xFE\") {\n encoding = \"utf-16le\";\n } else if (str[0] === \"\\xEF\" && str[1] === \"\\xBB\" && str[2] === \"\\xBF\") {\n encoding = \"utf-8\";\n }\n\n if (encoding) {\n try {\n var decoder = new TextDecoder(encoding, {\n fatal: true\n });\n var buffer = stringToBytes(str);\n return decoder.decode(buffer);\n } catch (ex) {\n warn(\"stringToPDFString: \\\"\".concat(ex, \"\\\".\"));\n }\n }\n }\n\n var strBuf = [];\n\n for (var i = 0, ii = str.length; i < ii; i++) {\n var code = PDFStringTranslateTable[str.charCodeAt(i)];\n strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));\n }\n\n return strBuf.join(\"\");\n}\n\nfunction escapeString(str) {\n return str.replace(/([()\\\\\\n\\r])/g, function (match) {\n if (match === \"\\n\") {\n return \"\\\\n\";\n } else if (match === \"\\r\") {\n return \"\\\\r\";\n }\n\n return \"\\\\\".concat(match);\n });\n}\n\nfunction isAscii(str) {\n return /^[\\x00-\\x7F]*$/.test(str);\n}\n\nfunction stringToUTF16BEString(str) {\n var buf = [\"\\xFE\\xFF\"];\n\n for (var i = 0, ii = str.length; i < ii; i++) {\n var _char = str.charCodeAt(i);\n\n buf.push(String.fromCharCode(_char >> 8 & 0xff), String.fromCharCode(_char & 0xff));\n }\n\n return buf.join(\"\");\n}\n\nfunction stringToUTF8String(str) {\n return decodeURIComponent(escape(str));\n}\n\nfunction utf8StringToString(str) {\n return unescape(encodeURIComponent(str));\n}\n\nfunction isArrayBuffer(v) {\n return _typeof(v) === \"object\" && v !== null && v.byteLength !== undefined;\n}\n\nfunction isArrayEqual(arr1, arr2) {\n if (arr1.length !== arr2.length) {\n return false;\n }\n\n for (var i = 0, ii = arr1.length; i < ii; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction getModificationDate() {\n var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();\n var buffer = [date.getUTCFullYear().toString(), (date.getUTCMonth() + 1).toString().padStart(2, \"0\"), date.getUTCDate().toString().padStart(2, \"0\"), date.getUTCHours().toString().padStart(2, \"0\"), date.getUTCMinutes().toString().padStart(2, \"0\"), date.getUTCSeconds().toString().padStart(2, \"0\")];\n return buffer.join(\"\");\n}\n\nfunction createPromiseCapability() {\n var capability = Object.create(null);\n var isSettled = false;\n Object.defineProperty(capability, \"settled\", {\n get: function get() {\n return isSettled;\n }\n });\n capability.promise = new Promise(function (resolve, reject) {\n capability.resolve = function (data) {\n isSettled = true;\n resolve(data);\n };\n\n capability.reject = function (reason) {\n isSettled = true;\n reject(reason);\n };\n });\n return capability;\n}\n\n/***/ }),\n/* 2 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nvar _is_node = __w_pdfjs_require__(3);\n\nif (!globalThis._pdfjsCompatibilityChecked) {\n globalThis._pdfjsCompatibilityChecked = true;\n\n (function checkNodeBtoa() {\n if (globalThis.btoa || !_is_node.isNodeJS) {\n return;\n }\n\n globalThis.btoa = function (chars) {\n return Buffer.from(chars, \"binary\").toString(\"base64\");\n };\n })();\n\n (function checkNodeAtob() {\n if (globalThis.atob || !_is_node.isNodeJS) {\n return;\n }\n\n globalThis.atob = function (input) {\n return Buffer.from(input, \"base64\").toString(\"binary\");\n };\n })();\n\n (function checkDOMMatrix() {\n if (globalThis.DOMMatrix || !_is_node.isNodeJS) {\n return;\n }\n\n globalThis.DOMMatrix = require(\"dommatrix/dist/dommatrix.js\");\n })();\n\n (function checkPromise() {\n if (globalThis.Promise.allSettled) {\n return;\n }\n\n globalThis.Promise = __w_pdfjs_require__(4);\n })();\n\n (function checkReadableStream() {\n if (globalThis.ReadableStream || !_is_node.isNodeJS) {\n return;\n }\n\n globalThis.ReadableStream = require(\"web-streams-polyfill/dist/ponyfill.js\").ReadableStream;\n })();\n\n (function checkStructuredClone() {\n if (globalThis.structuredClone) {\n return;\n }\n\n __w_pdfjs_require__(137);\n })();\n}\n\n/***/ }),\n/* 3 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.isNodeJS = void 0;\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar isNodeJS = (typeof process === \"undefined\" ? \"undefined\" : _typeof(process)) === \"object\" && process + \"\" === \"[object process]\" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== \"browser\");\nexports.isNodeJS = isNodeJS;\n\n/***/ }),\n/* 4 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n__w_pdfjs_require__(5);\n__w_pdfjs_require__(91);\n__w_pdfjs_require__(97);\n__w_pdfjs_require__(99);\n__w_pdfjs_require__(131);\n__w_pdfjs_require__(132);\n__w_pdfjs_require__(133);\n__w_pdfjs_require__(134);\nvar path = __w_pdfjs_require__(136);\nmodule.exports = path.Promise;\n\n/***/ }),\n/* 5 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n__w_pdfjs_require__(6);\n\n/***/ }),\n/* 6 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar global = __w_pdfjs_require__(8);\nvar isPrototypeOf = __w_pdfjs_require__(27);\nvar getPrototypeOf = __w_pdfjs_require__(69);\nvar setPrototypeOf = __w_pdfjs_require__(71);\nvar copyConstructorProperties = __w_pdfjs_require__(57);\nvar create = __w_pdfjs_require__(73);\nvar createNonEnumerableProperty = __w_pdfjs_require__(46);\nvar createPropertyDescriptor = __w_pdfjs_require__(15);\nvar clearErrorStack = __w_pdfjs_require__(77);\nvar installErrorCause = __w_pdfjs_require__(78);\nvar iterate = __w_pdfjs_require__(79);\nvar normalizeStringArgument = __w_pdfjs_require__(88);\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar ERROR_STACK_INSTALLABLE = __w_pdfjs_require__(90);\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar Error = global.Error;\nvar push = [].push;\nvar $AggregateError = function AggregateError(errors, message) {\n var options = arguments.length > 2 ? arguments[2] : undefined;\n var isInstance = isPrototypeOf(AggregateErrorPrototype, this);\n var that;\n if (setPrototypeOf) {\n that = setPrototypeOf(new Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);\n } else {\n that = isInstance ? this : create(AggregateErrorPrototype);\n createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');\n }\n if (message !== undefined)\n createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));\n if (ERROR_STACK_INSTALLABLE)\n createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1));\n installErrorCause(that, options);\n var errorsArray = [];\n iterate(errors, push, { that: errorsArray });\n createNonEnumerableProperty(that, 'errors', errorsArray);\n return that;\n};\nif (setPrototypeOf)\n setPrototypeOf($AggregateError, Error);\nelse\n copyConstructorProperties($AggregateError, Error, { name: true });\nvar AggregateErrorPrototype = $AggregateError.prototype = create(Error.prototype, {\n constructor: createPropertyDescriptor(1, $AggregateError),\n message: createPropertyDescriptor(1, ''),\n name: createPropertyDescriptor(1, 'AggregateError')\n});\n$({ global: true }, { AggregateError: $AggregateError });\n\n/***/ }),\n/* 7 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar getOwnPropertyDescriptor = (__w_pdfjs_require__(9).f);\nvar createNonEnumerableProperty = __w_pdfjs_require__(46);\nvar redefine = __w_pdfjs_require__(50);\nvar setGlobal = __w_pdfjs_require__(40);\nvar copyConstructorProperties = __w_pdfjs_require__(57);\nvar isForced = __w_pdfjs_require__(68);\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target)\n for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else\n targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty)\n continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n if (options.sham || targetProperty && targetProperty.sham) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n redefine(target, key, sourceProperty, options);\n }\n};\n\n/***/ }),\n/* 8 */\n/***/ ((module) => {\n\nvar check = function (it) {\n return it && it.Math == Math && it;\n};\nmodule.exports = check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || check(typeof self == 'object' && self) || check(typeof global == 'object' && global) || (function () {\n return this;\n}()) || Function('return this')();\n\n/***/ }),\n/* 9 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\nvar DESCRIPTORS = __w_pdfjs_require__(10);\nvar call = __w_pdfjs_require__(12);\nvar propertyIsEnumerableModule = __w_pdfjs_require__(14);\nvar createPropertyDescriptor = __w_pdfjs_require__(15);\nvar toIndexedObject = __w_pdfjs_require__(16);\nvar toPropertyKey = __w_pdfjs_require__(21);\nvar hasOwn = __w_pdfjs_require__(41);\nvar IE8_DOM_DEFINE = __w_pdfjs_require__(44);\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE)\n try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) {\n }\n if (hasOwn(O, P))\n return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n\n/***/ }),\n/* 10 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar fails = __w_pdfjs_require__(11);\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, {\n get: function () {\n return 7;\n }\n })[1] != 7;\n});\n\n/***/ }),\n/* 11 */\n/***/ ((module) => {\n\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n\n/***/ }),\n/* 12 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar NATIVE_BIND = __w_pdfjs_require__(13);\nvar call = Function.prototype.call;\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n\n/***/ }),\n/* 13 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar fails = __w_pdfjs_require__(11);\nmodule.exports = !fails(function () {\n var test = function () {\n }.bind();\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n\n/***/ }),\n/* 14 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\n\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n\n/***/ }),\n/* 15 */\n/***/ ((module) => {\n\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n/***/ }),\n/* 16 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar IndexedObject = __w_pdfjs_require__(17);\nvar requireObjectCoercible = __w_pdfjs_require__(20);\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n\n/***/ }),\n/* 17 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar uncurryThis = __w_pdfjs_require__(18);\nvar fails = __w_pdfjs_require__(11);\nvar classof = __w_pdfjs_require__(19);\nvar Object = global.Object;\nvar split = uncurryThis(''.split);\nmodule.exports = fails(function () {\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split(it, '') : Object(it);\n} : Object;\n\n/***/ }),\n/* 18 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar NATIVE_BIND = __w_pdfjs_require__(13);\nvar FunctionPrototype = Function.prototype;\nvar bind = FunctionPrototype.bind;\nvar call = FunctionPrototype.call;\nvar uncurryThis = NATIVE_BIND && bind.bind(call, call);\nmodule.exports = NATIVE_BIND ? function (fn) {\n return fn && uncurryThis(fn);\n} : function (fn) {\n return fn && function () {\n return call.apply(fn, arguments);\n };\n};\n\n/***/ }),\n/* 19 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};\n\n/***/ }),\n/* 20 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar TypeError = global.TypeError;\nmodule.exports = function (it) {\n if (it == undefined)\n throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n/***/ }),\n/* 21 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar toPrimitive = __w_pdfjs_require__(22);\nvar isSymbol = __w_pdfjs_require__(25);\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n\n/***/ }),\n/* 22 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar call = __w_pdfjs_require__(12);\nvar isObject = __w_pdfjs_require__(23);\nvar isSymbol = __w_pdfjs_require__(25);\nvar getMethod = __w_pdfjs_require__(32);\nvar ordinaryToPrimitive = __w_pdfjs_require__(35);\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar TypeError = global.TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input))\n return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined)\n pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result))\n return result;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined)\n pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n\n/***/ }),\n/* 23 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar isCallable = __w_pdfjs_require__(24);\nmodule.exports = function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n\n/***/ }),\n/* 24 */\n/***/ ((module) => {\n\nmodule.exports = function (argument) {\n return typeof argument == 'function';\n};\n\n/***/ }),\n/* 25 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar getBuiltIn = __w_pdfjs_require__(26);\nvar isCallable = __w_pdfjs_require__(24);\nvar isPrototypeOf = __w_pdfjs_require__(27);\nvar USE_SYMBOL_AS_UID = __w_pdfjs_require__(28);\nvar Object = global.Object;\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object(it));\n};\n\n/***/ }),\n/* 26 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar isCallable = __w_pdfjs_require__(24);\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n\n/***/ }),\n/* 27 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nmodule.exports = uncurryThis({}.isPrototypeOf);\n\n/***/ }),\n/* 28 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar NATIVE_SYMBOL = __w_pdfjs_require__(29);\nmodule.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == 'symbol';\n\n/***/ }),\n/* 29 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar V8_VERSION = __w_pdfjs_require__(30);\nvar fails = __w_pdfjs_require__(11);\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n return !String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n\n/***/ }),\n/* 30 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar userAgent = __w_pdfjs_require__(31);\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\nif (v8) {\n match = v8.split('.');\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match)\n version = +match[1];\n }\n}\nmodule.exports = version;\n\n/***/ }),\n/* 31 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar getBuiltIn = __w_pdfjs_require__(26);\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n\n/***/ }),\n/* 32 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar aCallable = __w_pdfjs_require__(33);\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n\n/***/ }),\n/* 33 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar isCallable = __w_pdfjs_require__(24);\nvar tryToString = __w_pdfjs_require__(34);\nvar TypeError = global.TypeError;\nmodule.exports = function (argument) {\n if (isCallable(argument))\n return argument;\n throw TypeError(tryToString(argument) + ' is not a function');\n};\n\n/***/ }),\n/* 34 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar String = global.String;\nmodule.exports = function (argument) {\n try {\n return String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n\n/***/ }),\n/* 35 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar call = __w_pdfjs_require__(12);\nvar isCallable = __w_pdfjs_require__(24);\nvar isObject = __w_pdfjs_require__(23);\nvar TypeError = global.TypeError;\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))\n return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input)))\n return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))\n return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n/***/ }),\n/* 36 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar shared = __w_pdfjs_require__(37);\nvar hasOwn = __w_pdfjs_require__(41);\nvar uid = __w_pdfjs_require__(43);\nvar NATIVE_SYMBOL = __w_pdfjs_require__(29);\nvar USE_SYMBOL_AS_UID = __w_pdfjs_require__(28);\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar symbolFor = Symbol && Symbol['for'];\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n var description = 'Symbol.' + name;\n if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else if (USE_SYMBOL_AS_UID && symbolFor) {\n WellKnownSymbolsStore[name] = symbolFor(description);\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol(description);\n }\n }\n return WellKnownSymbolsStore[name];\n};\n\n/***/ }),\n/* 37 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar IS_PURE = __w_pdfjs_require__(38);\nvar store = __w_pdfjs_require__(39);\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.22.3',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.22.3/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n\n/***/ }),\n/* 38 */\n/***/ ((module) => {\n\nmodule.exports = false;\n\n/***/ }),\n/* 39 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar setGlobal = __w_pdfjs_require__(40);\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\nmodule.exports = store;\n\n/***/ }),\n/* 40 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar defineProperty = Object.defineProperty;\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, {\n value: value,\n configurable: true,\n writable: true\n });\n } catch (error) {\n global[key] = value;\n }\n return value;\n};\n\n/***/ }),\n/* 41 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nvar toObject = __w_pdfjs_require__(42);\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n\n/***/ }),\n/* 42 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar requireObjectCoercible = __w_pdfjs_require__(20);\nvar Object = global.Object;\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n\n/***/ }),\n/* 43 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n\n/***/ }),\n/* 44 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar DESCRIPTORS = __w_pdfjs_require__(10);\nvar fails = __w_pdfjs_require__(11);\nvar createElement = __w_pdfjs_require__(45);\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});\n\n/***/ }),\n/* 45 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar isObject = __w_pdfjs_require__(23);\nvar document = global.document;\nvar EXISTS = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n\n/***/ }),\n/* 46 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar DESCRIPTORS = __w_pdfjs_require__(10);\nvar definePropertyModule = __w_pdfjs_require__(47);\nvar createPropertyDescriptor = __w_pdfjs_require__(15);\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n/***/ }),\n/* 47 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar DESCRIPTORS = __w_pdfjs_require__(10);\nvar IE8_DOM_DEFINE = __w_pdfjs_require__(44);\nvar V8_PROTOTYPE_DEFINE_BUG = __w_pdfjs_require__(48);\nvar anObject = __w_pdfjs_require__(49);\nvar toPropertyKey = __w_pdfjs_require__(21);\nvar TypeError = global.TypeError;\nvar $defineProperty = Object.defineProperty;\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n }\n return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE)\n try {\n return $defineProperty(O, P, Attributes);\n } catch (error) {\n }\n if ('get' in Attributes || 'set' in Attributes)\n throw TypeError('Accessors not supported');\n if ('value' in Attributes)\n O[P] = Attributes.value;\n return O;\n};\n\n/***/ }),\n/* 48 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar DESCRIPTORS = __w_pdfjs_require__(10);\nvar fails = __w_pdfjs_require__(11);\nmodule.exports = DESCRIPTORS && fails(function () {\n return Object.defineProperty(function () {\n }, 'prototype', {\n value: 42,\n writable: false\n }).prototype != 42;\n});\n\n/***/ }),\n/* 49 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar isObject = __w_pdfjs_require__(23);\nvar String = global.String;\nvar TypeError = global.TypeError;\nmodule.exports = function (argument) {\n if (isObject(argument))\n return argument;\n throw TypeError(String(argument) + ' is not an object');\n};\n\n/***/ }),\n/* 50 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar isCallable = __w_pdfjs_require__(24);\nvar hasOwn = __w_pdfjs_require__(41);\nvar createNonEnumerableProperty = __w_pdfjs_require__(46);\nvar setGlobal = __w_pdfjs_require__(40);\nvar inspectSource = __w_pdfjs_require__(51);\nvar InternalStateModule = __w_pdfjs_require__(52);\nvar CONFIGURABLE_FUNCTION_NAME = (__w_pdfjs_require__(56).CONFIGURABLE);\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var name = options && options.name !== undefined ? options.name : key;\n var state;\n if (isCallable(value)) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (!hasOwn(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {\n createNonEnumerableProperty(value, 'name', name);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n }\n }\n if (O === global) {\n if (simple)\n O[key] = value;\n else\n setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple)\n O[key] = value;\n else\n createNonEnumerableProperty(O, key, value);\n})(Function.prototype, 'toString', function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n\n/***/ }),\n/* 51 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nvar isCallable = __w_pdfjs_require__(24);\nvar store = __w_pdfjs_require__(39);\nvar functionToString = uncurryThis(Function.toString);\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\nmodule.exports = store.inspectSource;\n\n/***/ }),\n/* 52 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar NATIVE_WEAK_MAP = __w_pdfjs_require__(53);\nvar global = __w_pdfjs_require__(8);\nvar uncurryThis = __w_pdfjs_require__(18);\nvar isObject = __w_pdfjs_require__(23);\nvar createNonEnumerableProperty = __w_pdfjs_require__(46);\nvar hasOwn = __w_pdfjs_require__(41);\nvar shared = __w_pdfjs_require__(39);\nvar sharedKey = __w_pdfjs_require__(54);\nvar hiddenKeys = __w_pdfjs_require__(55);\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n }\n return state;\n };\n};\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = uncurryThis(store.get);\n var wmhas = uncurryThis(store.has);\n var wmset = uncurryThis(store.set);\n set = function (it, metadata) {\n if (wmhas(store, it))\n throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget(store, it) || {};\n };\n has = function (it) {\n return wmhas(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE))\n throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n\n/***/ }),\n/* 53 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar isCallable = __w_pdfjs_require__(24);\nvar inspectSource = __w_pdfjs_require__(51);\nvar WeakMap = global.WeakMap;\nmodule.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));\n\n/***/ }),\n/* 54 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar shared = __w_pdfjs_require__(37);\nvar uid = __w_pdfjs_require__(43);\nvar keys = shared('keys');\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n\n/***/ }),\n/* 55 */\n/***/ ((module) => {\n\nmodule.exports = {};\n\n/***/ }),\n/* 56 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar DESCRIPTORS = __w_pdfjs_require__(10);\nvar hasOwn = __w_pdfjs_require__(41);\nvar FunctionPrototype = Function.prototype;\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\nvar PROPER = EXISTS && function something() {\n}.name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable);\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n\n/***/ }),\n/* 57 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar hasOwn = __w_pdfjs_require__(41);\nvar ownKeys = __w_pdfjs_require__(58);\nvar getOwnPropertyDescriptorModule = __w_pdfjs_require__(9);\nvar definePropertyModule = __w_pdfjs_require__(47);\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n\n/***/ }),\n/* 58 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar getBuiltIn = __w_pdfjs_require__(26);\nvar uncurryThis = __w_pdfjs_require__(18);\nvar getOwnPropertyNamesModule = __w_pdfjs_require__(59);\nvar getOwnPropertySymbolsModule = __w_pdfjs_require__(67);\nvar anObject = __w_pdfjs_require__(49);\nvar concat = uncurryThis([].concat);\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n\n/***/ }),\n/* 59 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\nvar internalObjectKeys = __w_pdfjs_require__(60);\nvar enumBugKeys = __w_pdfjs_require__(66);\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n\n/***/ }),\n/* 60 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nvar hasOwn = __w_pdfjs_require__(41);\nvar toIndexedObject = __w_pdfjs_require__(16);\nvar indexOf = (__w_pdfjs_require__(61).indexOf);\nvar hiddenKeys = __w_pdfjs_require__(55);\nvar push = uncurryThis([].push);\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O)\n !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n while (names.length > i)\n if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};\n\n/***/ }),\n/* 61 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar toIndexedObject = __w_pdfjs_require__(16);\nvar toAbsoluteIndex = __w_pdfjs_require__(62);\nvar lengthOfArrayLike = __w_pdfjs_require__(64);\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n if (IS_INCLUDES && el != el)\n while (length > index) {\n value = O[index++];\n if (value != value)\n return true;\n }\n else\n for (; length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el)\n return IS_INCLUDES || index || 0;\n }\n return !IS_INCLUDES && -1;\n };\n};\nmodule.exports = {\n includes: createMethod(true),\n indexOf: createMethod(false)\n};\n\n/***/ }),\n/* 62 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar toIntegerOrInfinity = __w_pdfjs_require__(63);\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n\n/***/ }),\n/* 63 */\n/***/ ((module) => {\n\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (argument) {\n var number = +argument;\n return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);\n};\n\n/***/ }),\n/* 64 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar toLength = __w_pdfjs_require__(65);\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n\n/***/ }),\n/* 65 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar toIntegerOrInfinity = __w_pdfjs_require__(63);\nvar min = Math.min;\nmodule.exports = function (argument) {\n return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0;\n};\n\n/***/ }),\n/* 66 */\n/***/ ((module) => {\n\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n\n/***/ }),\n/* 67 */\n/***/ ((__unused_webpack_module, exports) => {\n\nexports.f = Object.getOwnPropertySymbols;\n\n/***/ }),\n/* 68 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar fails = __w_pdfjs_require__(11);\nvar isCallable = __w_pdfjs_require__(24);\nvar replacement = /#|\\.prototype\\./;\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;\n};\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\nmodule.exports = isForced;\n\n/***/ }),\n/* 69 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar hasOwn = __w_pdfjs_require__(41);\nvar isCallable = __w_pdfjs_require__(24);\nvar toObject = __w_pdfjs_require__(42);\nvar sharedKey = __w_pdfjs_require__(54);\nvar CORRECT_PROTOTYPE_GETTER = __w_pdfjs_require__(70);\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar Object = global.Object;\nvar ObjectPrototype = Object.prototype;\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO))\n return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n }\n return object instanceof Object ? ObjectPrototype : null;\n};\n\n/***/ }),\n/* 70 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar fails = __w_pdfjs_require__(11);\nmodule.exports = !fails(function () {\n function F() {\n }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n\n/***/ }),\n/* 71 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nvar anObject = __w_pdfjs_require__(49);\nvar aPossiblePrototype = __w_pdfjs_require__(72);\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? (function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);\n setter(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) {\n }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER)\n setter(O, proto);\n else\n O.__proto__ = proto;\n return O;\n };\n}()) : undefined);\n\n/***/ }),\n/* 72 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar isCallable = __w_pdfjs_require__(24);\nvar String = global.String;\nvar TypeError = global.TypeError;\nmodule.exports = function (argument) {\n if (typeof argument == 'object' || isCallable(argument))\n return argument;\n throw TypeError(\"Can't set \" + String(argument) + ' as a prototype');\n};\n\n/***/ }),\n/* 73 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar anObject = __w_pdfjs_require__(49);\nvar definePropertiesModule = __w_pdfjs_require__(74);\nvar enumBugKeys = __w_pdfjs_require__(66);\nvar hiddenKeys = __w_pdfjs_require__(55);\nvar html = __w_pdfjs_require__(76);\nvar documentCreateElement = __w_pdfjs_require__(45);\nvar sharedKey = __w_pdfjs_require__(54);\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar EmptyConstructor = function () {\n};\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null;\n return temp;\n};\nvar NullProtoObjectViaIFrame = function () {\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) {\n }\n NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument);\n var length = enumBugKeys.length;\n while (length--)\n delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\nhiddenKeys[IE_PROTO] = true;\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n result[IE_PROTO] = O;\n } else\n result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n\n/***/ }),\n/* 74 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\nvar DESCRIPTORS = __w_pdfjs_require__(10);\nvar V8_PROTOTYPE_DEFINE_BUG = __w_pdfjs_require__(48);\nvar definePropertyModule = __w_pdfjs_require__(47);\nvar anObject = __w_pdfjs_require__(49);\nvar toIndexedObject = __w_pdfjs_require__(16);\nvar objectKeys = __w_pdfjs_require__(75);\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index)\n definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n\n/***/ }),\n/* 75 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar internalObjectKeys = __w_pdfjs_require__(60);\nvar enumBugKeys = __w_pdfjs_require__(66);\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n\n/***/ }),\n/* 76 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar getBuiltIn = __w_pdfjs_require__(26);\nmodule.exports = getBuiltIn('document', 'documentElement');\n\n/***/ }),\n/* 77 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nvar $Error = Error;\nvar replace = uncurryThis(''.replace);\nvar TEST = function (arg) {\n return String($Error(arg).stack);\n}('zxcasd');\nvar V8_OR_CHAKRA_STACK_ENTRY = /\\n\\s*at [^:]*:[^\\n]*/;\nvar IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);\nmodule.exports = function (stack, dropEntries) {\n if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {\n while (dropEntries--)\n stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');\n }\n return stack;\n};\n\n/***/ }),\n/* 78 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar isObject = __w_pdfjs_require__(23);\nvar createNonEnumerableProperty = __w_pdfjs_require__(46);\nmodule.exports = function (O, options) {\n if (isObject(options) && 'cause' in options) {\n createNonEnumerableProperty(O, 'cause', options.cause);\n }\n};\n\n/***/ }),\n/* 79 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar bind = __w_pdfjs_require__(80);\nvar call = __w_pdfjs_require__(12);\nvar anObject = __w_pdfjs_require__(49);\nvar tryToString = __w_pdfjs_require__(34);\nvar isArrayIteratorMethod = __w_pdfjs_require__(81);\nvar lengthOfArrayLike = __w_pdfjs_require__(64);\nvar isPrototypeOf = __w_pdfjs_require__(27);\nvar getIterator = __w_pdfjs_require__(83);\nvar getIteratorMethod = __w_pdfjs_require__(84);\nvar iteratorClose = __w_pdfjs_require__(87);\nvar TypeError = global.TypeError;\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\nvar ResultPrototype = Result.prototype;\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that);\n var iterator, iterFn, index, length, result, next, step;\n var stop = function (condition) {\n if (iterator)\n iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n }\n return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn)\n throw TypeError(tryToString(iterable) + ' is not iterable');\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && isPrototypeOf(ResultPrototype, result))\n return result;\n }\n return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n next = iterator.next;\n while (!(step = call(next, iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result))\n return result;\n }\n return new Result(false);\n};\n\n/***/ }),\n/* 80 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nvar aCallable = __w_pdfjs_require__(33);\nvar NATIVE_BIND = __w_pdfjs_require__(13);\nvar bind = uncurryThis(uncurryThis.bind);\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function () {\n return fn.apply(that, arguments);\n };\n};\n\n/***/ }),\n/* 81 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar Iterators = __w_pdfjs_require__(82);\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n\n/***/ }),\n/* 82 */\n/***/ ((module) => {\n\nmodule.exports = {};\n\n/***/ }),\n/* 83 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar call = __w_pdfjs_require__(12);\nvar aCallable = __w_pdfjs_require__(33);\nvar anObject = __w_pdfjs_require__(49);\nvar tryToString = __w_pdfjs_require__(34);\nvar getIteratorMethod = __w_pdfjs_require__(84);\nvar TypeError = global.TypeError;\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod))\n return anObject(call(iteratorMethod, argument));\n throw TypeError(tryToString(argument) + ' is not iterable');\n};\n\n/***/ }),\n/* 84 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar classof = __w_pdfjs_require__(85);\nvar getMethod = __w_pdfjs_require__(32);\nvar Iterators = __w_pdfjs_require__(82);\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar ITERATOR = wellKnownSymbol('iterator');\nmodule.exports = function (it) {\n if (it != undefined)\n return getMethod(it, ITERATOR) || getMethod(it, '@@iterator') || Iterators[classof(it)];\n};\n\n/***/ }),\n/* 85 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar TO_STRING_TAG_SUPPORT = __w_pdfjs_require__(86);\nvar isCallable = __w_pdfjs_require__(24);\nvar classofRaw = __w_pdfjs_require__(19);\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar Object = global.Object;\nvar CORRECT_ARGUMENTS = classofRaw((function () {\n return arguments;\n}())) == 'Arguments';\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) {\n }\n};\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null' : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n\n/***/ }),\n/* 86 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\ntest[TO_STRING_TAG] = 'z';\nmodule.exports = String(test) === '[object z]';\n\n/***/ }),\n/* 87 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar call = __w_pdfjs_require__(12);\nvar anObject = __w_pdfjs_require__(49);\nvar getMethod = __w_pdfjs_require__(32);\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw')\n throw value;\n return value;\n }\n innerResult = call(innerResult, iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw')\n throw value;\n if (innerError)\n throw innerResult;\n anObject(innerResult);\n return value;\n};\n\n/***/ }),\n/* 88 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar toString = __w_pdfjs_require__(89);\nmodule.exports = function (argument, $default) {\n return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);\n};\n\n/***/ }),\n/* 89 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar classof = __w_pdfjs_require__(85);\nvar String = global.String;\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol')\n throw TypeError('Cannot convert a Symbol value to a string');\n return String(argument);\n};\n\n/***/ }),\n/* 90 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar fails = __w_pdfjs_require__(11);\nvar createPropertyDescriptor = __w_pdfjs_require__(15);\nmodule.exports = !fails(function () {\n var error = Error('a');\n if (!('stack' in error))\n return true;\n Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));\n return error.stack !== 7;\n});\n\n/***/ }),\n/* 91 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar toIndexedObject = __w_pdfjs_require__(16);\nvar addToUnscopables = __w_pdfjs_require__(92);\nvar Iterators = __w_pdfjs_require__(82);\nvar InternalStateModule = __w_pdfjs_require__(52);\nvar defineProperty = (__w_pdfjs_require__(47).f);\nvar defineIterator = __w_pdfjs_require__(93);\nvar IS_PURE = __w_pdfjs_require__(38);\nvar DESCRIPTORS = __w_pdfjs_require__(10);\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated),\n index: 0,\n kind: kind\n });\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return {\n value: undefined,\n done: true\n };\n }\n if (kind == 'keys')\n return {\n value: index,\n done: false\n };\n if (kind == 'values')\n return {\n value: target[index],\n done: false\n };\n return {\n value: [\n index,\n target[index]\n ],\n done: false\n };\n}, 'values');\nvar values = Iterators.Arguments = Iterators.Array;\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\nif (!IS_PURE && DESCRIPTORS && values.name !== 'values')\n try {\n defineProperty(values, 'name', { value: 'values' });\n } catch (error) {\n }\n\n/***/ }),\n/* 92 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar create = __w_pdfjs_require__(73);\nvar definePropertyModule = __w_pdfjs_require__(47);\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n\n/***/ }),\n/* 93 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar call = __w_pdfjs_require__(12);\nvar IS_PURE = __w_pdfjs_require__(38);\nvar FunctionName = __w_pdfjs_require__(56);\nvar isCallable = __w_pdfjs_require__(24);\nvar createIteratorConstructor = __w_pdfjs_require__(94);\nvar getPrototypeOf = __w_pdfjs_require__(69);\nvar setPrototypeOf = __w_pdfjs_require__(71);\nvar setToStringTag = __w_pdfjs_require__(96);\nvar createNonEnumerableProperty = __w_pdfjs_require__(46);\nvar redefine = __w_pdfjs_require__(50);\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar Iterators = __w_pdfjs_require__(82);\nvar IteratorsCore = __w_pdfjs_require__(95);\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\nvar returnThis = function () {\n return this;\n};\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator)\n return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype)\n return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS:\n return function keys() {\n return new IteratorConstructor(this, KIND);\n };\n case VALUES:\n return function values() {\n return new IteratorConstructor(this, KIND);\n };\n case ENTRIES:\n return function entries() {\n return new IteratorConstructor(this, KIND);\n };\n }\n return function () {\n return new IteratorConstructor(this);\n };\n };\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n redefine(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE)\n Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() {\n return call(nativeIterator, this);\n };\n }\n }\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED)\n for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n }\n else\n $({\n target: NAME,\n proto: true,\n forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME\n }, methods);\n }\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n }\n Iterators[NAME] = defaultIterator;\n return methods;\n};\n\n/***/ }),\n/* 94 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar IteratorPrototype = (__w_pdfjs_require__(95).IteratorPrototype);\nvar create = __w_pdfjs_require__(73);\nvar createPropertyDescriptor = __w_pdfjs_require__(15);\nvar setToStringTag = __w_pdfjs_require__(96);\nvar Iterators = __w_pdfjs_require__(82);\nvar returnThis = function () {\n return this;\n};\nmodule.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n\n/***/ }),\n/* 95 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar fails = __w_pdfjs_require__(11);\nvar isCallable = __w_pdfjs_require__(24);\nvar create = __w_pdfjs_require__(73);\nvar getPrototypeOf = __w_pdfjs_require__(69);\nvar redefine = __w_pdfjs_require__(50);\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar IS_PURE = __w_pdfjs_require__(38);\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\nif ([].keys) {\n arrayIterator = [].keys();\n if (!('next' in arrayIterator))\n BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype)\n IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\nif (NEW_ITERATOR_PROTOTYPE)\n IteratorPrototype = {};\nelse if (IS_PURE)\n IteratorPrototype = create(IteratorPrototype);\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n redefine(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n\n/***/ }),\n/* 96 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar defineProperty = (__w_pdfjs_require__(47).f);\nvar hasOwn = __w_pdfjs_require__(41);\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nmodule.exports = function (target, TAG, STATIC) {\n if (target && !STATIC)\n target = target.prototype;\n if (target && !hasOwn(target, TO_STRING_TAG)) {\n defineProperty(target, TO_STRING_TAG, {\n configurable: true,\n value: TAG\n });\n }\n};\n\n/***/ }),\n/* 97 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar TO_STRING_TAG_SUPPORT = __w_pdfjs_require__(86);\nvar redefine = __w_pdfjs_require__(50);\nvar toString = __w_pdfjs_require__(98);\nif (!TO_STRING_TAG_SUPPORT) {\n redefine(Object.prototype, 'toString', toString, { unsafe: true });\n}\n\n/***/ }),\n/* 98 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar TO_STRING_TAG_SUPPORT = __w_pdfjs_require__(86);\nvar classof = __w_pdfjs_require__(85);\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n\n/***/ }),\n/* 99 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n__w_pdfjs_require__(100);\n__w_pdfjs_require__(123);\n__w_pdfjs_require__(126);\n__w_pdfjs_require__(127);\n__w_pdfjs_require__(128);\n__w_pdfjs_require__(129);\n\n/***/ }),\n/* 100 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar IS_PURE = __w_pdfjs_require__(38);\nvar IS_NODE = __w_pdfjs_require__(101);\nvar global = __w_pdfjs_require__(8);\nvar call = __w_pdfjs_require__(12);\nvar redefine = __w_pdfjs_require__(50);\nvar redefineAll = __w_pdfjs_require__(102);\nvar setPrototypeOf = __w_pdfjs_require__(71);\nvar setToStringTag = __w_pdfjs_require__(96);\nvar setSpecies = __w_pdfjs_require__(103);\nvar aCallable = __w_pdfjs_require__(33);\nvar isCallable = __w_pdfjs_require__(24);\nvar isObject = __w_pdfjs_require__(23);\nvar anInstance = __w_pdfjs_require__(104);\nvar speciesConstructor = __w_pdfjs_require__(105);\nvar task = (__w_pdfjs_require__(108).set);\nvar microtask = __w_pdfjs_require__(113);\nvar hostReportErrors = __w_pdfjs_require__(116);\nvar perform = __w_pdfjs_require__(117);\nvar Queue = __w_pdfjs_require__(118);\nvar InternalStateModule = __w_pdfjs_require__(52);\nvar NativePromiseConstructor = __w_pdfjs_require__(119);\nvar PromiseConstructorDetection = __w_pdfjs_require__(120);\nvar newPromiseCapabilityModule = __w_pdfjs_require__(122);\nvar PROMISE = 'Promise';\nvar FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR;\nvar NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;\nvar NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar setInternalState = InternalStateModule.set;\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar PromiseConstructor = NativePromiseConstructor;\nvar PromisePrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\nvar callReaction = function (reaction, state) {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED)\n onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true)\n result = value;\n else {\n if (domain)\n domain.enter();\n result = handler(value);\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n call(then, result, resolve, reject);\n } else\n resolve(result);\n } else\n reject(value);\n } catch (error) {\n if (domain && !exited)\n domain.exit();\n reject(error);\n }\n};\nvar notify = function (state, isReject) {\n if (state.notified)\n return;\n state.notified = true;\n microtask(function () {\n var reactions = state.reactions;\n var reaction;\n while (reaction = reactions.get()) {\n callReaction(reaction, state);\n }\n state.notified = false;\n if (isReject && !state.rejection)\n onUnhandled(state);\n });\n};\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else\n event = {\n promise: promise,\n reason: reason\n };\n if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name]))\n handler(event);\n else if (name === UNHANDLED_REJECTION)\n hostReportErrors('Unhandled promise rejection', reason);\n};\nvar onUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else\n dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error)\n throw result.value;\n }\n });\n};\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\nvar onHandleUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else\n dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\nvar internalReject = function (state, value, unwrap) {\n if (state.done)\n return;\n state.done = true;\n if (unwrap)\n state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\nvar internalResolve = function (state, value, unwrap) {\n if (state.done)\n return;\n state.done = true;\n if (unwrap)\n state = unwrap;\n try {\n if (state.facade === value)\n throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n call(then, value, bind(internalResolve, wrapper, state), bind(internalReject, wrapper, state));\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\nif (FORCED_PROMISE_CONSTRUCTOR) {\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromisePrototype);\n aCallable(executor);\n call(Internal, this);\n var state = getInternalPromiseState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n PromisePrototype = PromiseConstructor.prototype;\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: new Queue(),\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromisePrototype, {\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n state.parent = true;\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n if (state.state == PENDING)\n state.reactions.add(reaction);\n else\n microtask(function () {\n callReaction(reaction, state);\n });\n return reaction.promise;\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalPromiseState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C);\n };\n if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n if (!NATIVE_PROMISE_SUBCLASSING) {\n redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n call(nativeThen, that, resolve, reject);\n }).then(onFulfilled, onRejected);\n }, { unsafe: true });\n }\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) {\n }\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromisePrototype);\n }\n }\n}\n$({\n global: true,\n wrap: true,\n forced: FORCED_PROMISE_CONSTRUCTOR\n}, { Promise: PromiseConstructor });\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\n/***/ }),\n/* 101 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar classof = __w_pdfjs_require__(19);\nvar global = __w_pdfjs_require__(8);\nmodule.exports = classof(global.process) == 'process';\n\n/***/ }),\n/* 102 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar redefine = __w_pdfjs_require__(50);\nmodule.exports = function (target, src, options) {\n for (var key in src)\n redefine(target, key, src[key], options);\n return target;\n};\n\n/***/ }),\n/* 103 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar getBuiltIn = __w_pdfjs_require__(26);\nvar definePropertyModule = __w_pdfjs_require__(47);\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar DESCRIPTORS = __w_pdfjs_require__(10);\nvar SPECIES = wellKnownSymbol('species');\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () {\n return this;\n }\n });\n }\n};\n\n/***/ }),\n/* 104 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar isPrototypeOf = __w_pdfjs_require__(27);\nvar TypeError = global.TypeError;\nmodule.exports = function (it, Prototype) {\n if (isPrototypeOf(Prototype, it))\n return it;\n throw TypeError('Incorrect invocation');\n};\n\n/***/ }),\n/* 105 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar anObject = __w_pdfjs_require__(49);\nvar aConstructor = __w_pdfjs_require__(106);\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar SPECIES = wellKnownSymbol('species');\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);\n};\n\n/***/ }),\n/* 106 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar isConstructor = __w_pdfjs_require__(107);\nvar tryToString = __w_pdfjs_require__(34);\nvar TypeError = global.TypeError;\nmodule.exports = function (argument) {\n if (isConstructor(argument))\n return argument;\n throw TypeError(tryToString(argument) + ' is not a constructor');\n};\n\n/***/ }),\n/* 107 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nvar fails = __w_pdfjs_require__(11);\nvar isCallable = __w_pdfjs_require__(24);\nvar classof = __w_pdfjs_require__(85);\nvar getBuiltIn = __w_pdfjs_require__(26);\nvar inspectSource = __w_pdfjs_require__(51);\nvar noop = function () {\n};\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = uncurryThis(constructorRegExp.exec);\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(noop);\nvar isConstructorModern = function isConstructor(argument) {\n if (!isCallable(argument))\n return false;\n try {\n construct(noop, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\nvar isConstructorLegacy = function isConstructor(argument) {\n if (!isCallable(argument))\n return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction':\n return false;\n }\n try {\n return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n } catch (error) {\n return true;\n }\n};\nisConstructorLegacy.sham = true;\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () {\n called = true;\n }) || called;\n}) ? isConstructorLegacy : isConstructorModern;\n\n/***/ }),\n/* 108 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar apply = __w_pdfjs_require__(109);\nvar bind = __w_pdfjs_require__(80);\nvar isCallable = __w_pdfjs_require__(24);\nvar hasOwn = __w_pdfjs_require__(41);\nvar fails = __w_pdfjs_require__(11);\nvar html = __w_pdfjs_require__(76);\nvar arraySlice = __w_pdfjs_require__(110);\nvar createElement = __w_pdfjs_require__(45);\nvar validateArgumentsLength = __w_pdfjs_require__(111);\nvar IS_IOS = __w_pdfjs_require__(112);\nvar IS_NODE = __w_pdfjs_require__(101);\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar Dispatch = global.Dispatch;\nvar Function = global.Function;\nvar MessageChannel = global.MessageChannel;\nvar String = global.String;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar location, defer, channel, port;\ntry {\n location = global.location;\n} catch (error) {\n}\nvar run = function (id) {\n if (hasOwn(queue, id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\nvar listener = function (event) {\n run(event.data);\n};\nvar post = function (id) {\n global.postMessage(String(id), location.protocol + '//' + location.host);\n};\nif (!set || !clear) {\n set = function setImmediate(handler) {\n validateArgumentsLength(arguments.length, 1);\n var fn = isCallable(handler) ? handler : Function(handler);\n var args = arraySlice(arguments, 1);\n queue[++counter] = function () {\n apply(fn, undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port);\n } else if (global.addEventListener && isCallable(global.postMessage) && !global.importScripts && location && location.protocol !== 'file:' && !fails(post)) {\n defer = post;\n global.addEventListener('message', listener, false);\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\nmodule.exports = {\n set: set,\n clear: clear\n};\n\n/***/ }),\n/* 109 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar NATIVE_BIND = __w_pdfjs_require__(13);\nvar FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype.apply;\nvar call = FunctionPrototype.call;\nmodule.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {\n return call.apply(apply, arguments);\n});\n\n/***/ }),\n/* 110 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nmodule.exports = uncurryThis([].slice);\n\n/***/ }),\n/* 111 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar TypeError = global.TypeError;\nmodule.exports = function (passed, required) {\n if (passed < required)\n throw TypeError('Not enough arguments');\n return passed;\n};\n\n/***/ }),\n/* 112 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar userAgent = __w_pdfjs_require__(31);\nmodule.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);\n\n/***/ }),\n/* 113 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar bind = __w_pdfjs_require__(80);\nvar getOwnPropertyDescriptor = (__w_pdfjs_require__(9).f);\nvar macrotask = (__w_pdfjs_require__(108).set);\nvar IS_IOS = __w_pdfjs_require__(112);\nvar IS_IOS_PEBBLE = __w_pdfjs_require__(114);\nvar IS_WEBOS_WEBKIT = __w_pdfjs_require__(115);\nvar IS_NODE = __w_pdfjs_require__(101);\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\nvar flush, head, last, notify, toggle, node, promise, then;\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain))\n parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head)\n notify();\n else\n last = undefined;\n throw error;\n }\n }\n last = undefined;\n if (parent)\n parent.enter();\n };\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n promise = Promise.resolve(undefined);\n promise.constructor = Promise;\n then = bind(promise.then, promise);\n notify = function () {\n then(flush);\n };\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n } else {\n macrotask = bind(macrotask, global);\n notify = function () {\n macrotask(flush);\n };\n }\n}\nmodule.exports = queueMicrotask || function (fn) {\n var task = {\n fn: fn,\n next: undefined\n };\n if (last)\n last.next = task;\n if (!head) {\n head = task;\n notify();\n }\n last = task;\n};\n\n/***/ }),\n/* 114 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar userAgent = __w_pdfjs_require__(31);\nvar global = __w_pdfjs_require__(8);\nmodule.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined;\n\n/***/ }),\n/* 115 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar userAgent = __w_pdfjs_require__(31);\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n\n/***/ }),\n/* 116 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length == 1 ? console.error(a) : console.error(a, b);\n }\n};\n\n/***/ }),\n/* 117 */\n/***/ ((module) => {\n\nmodule.exports = function (exec) {\n try {\n return {\n error: false,\n value: exec()\n };\n } catch (error) {\n return {\n error: true,\n value: error\n };\n }\n};\n\n/***/ }),\n/* 118 */\n/***/ ((module) => {\n\nvar Queue = function () {\n this.head = null;\n this.tail = null;\n};\nQueue.prototype = {\n add: function (item) {\n var entry = {\n item: item,\n next: null\n };\n if (this.head)\n this.tail.next = entry;\n else\n this.head = entry;\n this.tail = entry;\n },\n get: function () {\n var entry = this.head;\n if (entry) {\n this.head = entry.next;\n if (this.tail === entry)\n this.tail = null;\n return entry.item;\n }\n }\n};\nmodule.exports = Queue;\n\n/***/ }),\n/* 119 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nmodule.exports = global.Promise;\n\n/***/ }),\n/* 120 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar NativePromiseConstructor = __w_pdfjs_require__(119);\nvar isCallable = __w_pdfjs_require__(24);\nvar isForced = __w_pdfjs_require__(68);\nvar inspectSource = __w_pdfjs_require__(51);\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar IS_BROWSER = __w_pdfjs_require__(121);\nvar IS_PURE = __w_pdfjs_require__(38);\nvar V8_VERSION = __w_pdfjs_require__(30);\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar SPECIES = wellKnownSymbol('species');\nvar SUBCLASSING = false;\nvar NATIVE_PROMISE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\nvar FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor);\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66)\n return true;\n if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally']))\n return true;\n if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE))\n return false;\n var promise = new NativePromiseConstructor(function (resolve) {\n resolve(1);\n });\n var FakePromise = function (exec) {\n exec(function () {\n }, function () {\n });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () {\n }) instanceof FakePromise;\n if (!SUBCLASSING)\n return true;\n return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_PROMISE_REJECTION_EVENT;\n});\nmodule.exports = {\n CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,\n REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,\n SUBCLASSING: SUBCLASSING\n};\n\n/***/ }),\n/* 121 */\n/***/ ((module) => {\n\nmodule.exports = typeof window == 'object' && typeof Deno != 'object';\n\n/***/ }),\n/* 122 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar aCallable = __w_pdfjs_require__(33);\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined)\n throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aCallable(resolve);\n this.reject = aCallable(reject);\n};\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n\n/***/ }),\n/* 123 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar call = __w_pdfjs_require__(12);\nvar aCallable = __w_pdfjs_require__(33);\nvar newPromiseCapabilityModule = __w_pdfjs_require__(122);\nvar perform = __w_pdfjs_require__(117);\nvar iterate = __w_pdfjs_require__(79);\nvar PROMISE_STATICS_INCORRECT_ITERATION = __w_pdfjs_require__(124);\n$({\n target: 'Promise',\n stat: true,\n forced: PROMISE_STATICS_INCORRECT_ITERATION\n}, {\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n remaining++;\n call($promiseResolve, C, promise).then(function (value) {\n if (alreadyCalled)\n return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error)\n reject(result.value);\n return capability.promise;\n }\n});\n\n/***/ }),\n/* 124 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar NativePromiseConstructor = __w_pdfjs_require__(119);\nvar checkCorrectnessOfIteration = __w_pdfjs_require__(125);\nvar FORCED_PROMISE_CONSTRUCTOR = (__w_pdfjs_require__(120).CONSTRUCTOR);\nmodule.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) {\n NativePromiseConstructor.all(iterable).then(undefined, function () {\n });\n});\n\n/***/ }),\n/* 125 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar wellKnownSymbol = __w_pdfjs_require__(36);\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n Array.from(iteratorWithReturn, function () {\n throw 2;\n });\n} catch (error) {\n}\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING)\n return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) {\n }\n return ITERATION_SUPPORT;\n};\n\n/***/ }),\n/* 126 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar IS_PURE = __w_pdfjs_require__(38);\nvar FORCED_PROMISE_CONSTRUCTOR = (__w_pdfjs_require__(120).CONSTRUCTOR);\nvar NativePromiseConstructor = __w_pdfjs_require__(119);\nvar getBuiltIn = __w_pdfjs_require__(26);\nvar isCallable = __w_pdfjs_require__(24);\nvar redefine = __w_pdfjs_require__(50);\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\n$({\n target: 'Promise',\n proto: true,\n forced: FORCED_PROMISE_CONSTRUCTOR,\n real: true\n}, {\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n});\nif (!IS_PURE && isCallable(NativePromiseConstructor)) {\n var method = getBuiltIn('Promise').prototype['catch'];\n if (NativePromisePrototype['catch'] !== method) {\n redefine(NativePromisePrototype, 'catch', method, { unsafe: true });\n }\n}\n\n/***/ }),\n/* 127 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar call = __w_pdfjs_require__(12);\nvar aCallable = __w_pdfjs_require__(33);\nvar newPromiseCapabilityModule = __w_pdfjs_require__(122);\nvar perform = __w_pdfjs_require__(117);\nvar iterate = __w_pdfjs_require__(79);\nvar PROMISE_STATICS_INCORRECT_ITERATION = __w_pdfjs_require__(124);\n$({\n target: 'Promise',\n stat: true,\n forced: PROMISE_STATICS_INCORRECT_ITERATION\n}, {\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n call($promiseResolve, C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error)\n reject(result.value);\n return capability.promise;\n }\n});\n\n/***/ }),\n/* 128 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar call = __w_pdfjs_require__(12);\nvar newPromiseCapabilityModule = __w_pdfjs_require__(122);\nvar FORCED_PROMISE_CONSTRUCTOR = (__w_pdfjs_require__(120).CONSTRUCTOR);\n$({\n target: 'Promise',\n stat: true,\n forced: FORCED_PROMISE_CONSTRUCTOR\n}, {\n reject: function reject(r) {\n var capability = newPromiseCapabilityModule.f(this);\n call(capability.reject, undefined, r);\n return capability.promise;\n }\n});\n\n/***/ }),\n/* 129 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar getBuiltIn = __w_pdfjs_require__(26);\nvar IS_PURE = __w_pdfjs_require__(38);\nvar NativePromiseConstructor = __w_pdfjs_require__(119);\nvar FORCED_PROMISE_CONSTRUCTOR = (__w_pdfjs_require__(120).CONSTRUCTOR);\nvar promiseResolve = __w_pdfjs_require__(130);\nvar PromiseConstructorWrapper = getBuiltIn('Promise');\nvar CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;\n$({\n target: 'Promise',\n stat: true,\n forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR\n}, {\n resolve: function resolve(x) {\n return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);\n }\n});\n\n/***/ }),\n/* 130 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar anObject = __w_pdfjs_require__(49);\nvar isObject = __w_pdfjs_require__(23);\nvar newPromiseCapability = __w_pdfjs_require__(122);\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C)\n return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n\n/***/ }),\n/* 131 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar call = __w_pdfjs_require__(12);\nvar aCallable = __w_pdfjs_require__(33);\nvar newPromiseCapabilityModule = __w_pdfjs_require__(122);\nvar perform = __w_pdfjs_require__(117);\nvar iterate = __w_pdfjs_require__(79);\n$({\n target: 'Promise',\n stat: true\n}, {\n allSettled: function allSettled(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n remaining++;\n call(promiseResolve, C, promise).then(function (value) {\n if (alreadyCalled)\n return;\n alreadyCalled = true;\n values[index] = {\n status: 'fulfilled',\n value: value\n };\n --remaining || resolve(values);\n }, function (error) {\n if (alreadyCalled)\n return;\n alreadyCalled = true;\n values[index] = {\n status: 'rejected',\n reason: error\n };\n --remaining || resolve(values);\n });\n });\n --remaining || resolve(values);\n });\n if (result.error)\n reject(result.value);\n return capability.promise;\n }\n});\n\n/***/ }),\n/* 132 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar call = __w_pdfjs_require__(12);\nvar aCallable = __w_pdfjs_require__(33);\nvar getBuiltIn = __w_pdfjs_require__(26);\nvar newPromiseCapabilityModule = __w_pdfjs_require__(122);\nvar perform = __w_pdfjs_require__(117);\nvar iterate = __w_pdfjs_require__(79);\nvar PROMISE_ANY_ERROR = 'No one promise resolved';\n$({\n target: 'Promise',\n stat: true\n}, {\n any: function any(iterable) {\n var C = this;\n var AggregateError = getBuiltIn('AggregateError');\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aCallable(C.resolve);\n var errors = [];\n var counter = 0;\n var remaining = 1;\n var alreadyResolved = false;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyRejected = false;\n remaining++;\n call(promiseResolve, C, promise).then(function (value) {\n if (alreadyRejected || alreadyResolved)\n return;\n alreadyResolved = true;\n resolve(value);\n }, function (error) {\n if (alreadyRejected || alreadyResolved)\n return;\n alreadyRejected = true;\n errors[index] = error;\n --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));\n });\n });\n --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));\n });\n if (result.error)\n reject(result.value);\n return capability.promise;\n }\n});\n\n/***/ }),\n/* 133 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar IS_PURE = __w_pdfjs_require__(38);\nvar NativePromiseConstructor = __w_pdfjs_require__(119);\nvar fails = __w_pdfjs_require__(11);\nvar getBuiltIn = __w_pdfjs_require__(26);\nvar isCallable = __w_pdfjs_require__(24);\nvar speciesConstructor = __w_pdfjs_require__(105);\nvar promiseResolve = __w_pdfjs_require__(130);\nvar redefine = __w_pdfjs_require__(50);\nvar NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;\nvar NON_GENERIC = !!NativePromiseConstructor && fails(function () {\n NativePromisePrototype['finally'].call({\n then: function () {\n }\n }, function () {\n });\n});\n$({\n target: 'Promise',\n proto: true,\n real: true,\n forced: NON_GENERIC\n}, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = isCallable(onFinally);\n return this.then(isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () {\n return x;\n });\n } : onFinally, isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () {\n throw e;\n });\n } : onFinally);\n }\n});\nif (!IS_PURE && isCallable(NativePromiseConstructor)) {\n var method = getBuiltIn('Promise').prototype['finally'];\n if (NativePromisePrototype['finally'] !== method) {\n redefine(NativePromisePrototype, 'finally', method, { unsafe: true });\n }\n}\n\n/***/ }),\n/* 134 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar charAt = (__w_pdfjs_require__(135).charAt);\nvar toString = __w_pdfjs_require__(89);\nvar InternalStateModule = __w_pdfjs_require__(52);\nvar defineIterator = __w_pdfjs_require__(93);\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length)\n return {\n value: undefined,\n done: true\n };\n point = charAt(string, index);\n state.index += point.length;\n return {\n value: point,\n done: false\n };\n});\n\n/***/ }),\n/* 135 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar uncurryThis = __w_pdfjs_require__(18);\nvar toIntegerOrInfinity = __w_pdfjs_require__(63);\nvar toString = __w_pdfjs_require__(89);\nvar requireObjectCoercible = __w_pdfjs_require__(20);\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar stringSlice = uncurryThis(''.slice);\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toIntegerOrInfinity(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size)\n return CONVERT_TO_STRING ? '' : undefined;\n first = charCodeAt(S, position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? charAt(S, position) : first : CONVERT_TO_STRING ? stringSlice(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\nmodule.exports = {\n codeAt: createMethod(false),\n charAt: createMethod(true)\n};\n\n/***/ }),\n/* 136 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nmodule.exports = global;\n\n/***/ }),\n/* 137 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n__w_pdfjs_require__(91);\n__w_pdfjs_require__(97);\n__w_pdfjs_require__(138);\n__w_pdfjs_require__(150);\n__w_pdfjs_require__(152);\nvar path = __w_pdfjs_require__(136);\nmodule.exports = path.structuredClone;\n\n/***/ }),\n/* 138 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n__w_pdfjs_require__(139);\n\n/***/ }),\n/* 139 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar collection = __w_pdfjs_require__(140);\nvar collectionStrong = __w_pdfjs_require__(149);\ncollection('Map', function (init) {\n return function Map() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n}, collectionStrong);\n\n/***/ }),\n/* 140 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar $ = __w_pdfjs_require__(7);\nvar global = __w_pdfjs_require__(8);\nvar uncurryThis = __w_pdfjs_require__(18);\nvar isForced = __w_pdfjs_require__(68);\nvar redefine = __w_pdfjs_require__(50);\nvar InternalMetadataModule = __w_pdfjs_require__(141);\nvar iterate = __w_pdfjs_require__(79);\nvar anInstance = __w_pdfjs_require__(104);\nvar isCallable = __w_pdfjs_require__(24);\nvar isObject = __w_pdfjs_require__(23);\nvar fails = __w_pdfjs_require__(11);\nvar checkCorrectnessOfIteration = __w_pdfjs_require__(125);\nvar setToStringTag = __w_pdfjs_require__(96);\nvar inheritIfRequired = __w_pdfjs_require__(148);\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var exported = {};\n var fixMethod = function (KEY) {\n var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);\n redefine(NativePrototype, KEY, KEY == 'add' ? function add(value) {\n uncurriedNativeMethod(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n uncurriedNativeMethod(this, key === 0 ? 0 : key, value);\n return this;\n });\n };\n var REPLACE = isForced(CONSTRUCTOR_NAME, !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n })));\n if (REPLACE) {\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.enable();\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n var THROWS_ON_PRIMITIVES = fails(function () {\n instance.has(1);\n });\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) {\n new NativeConstructor(iterable);\n });\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--)\n $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, NativePrototype);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined)\n iterate(iterable, that[ADDER], {\n that: that,\n AS_ENTRIES: IS_MAP\n });\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING)\n fixMethod(ADDER);\n if (IS_WEAK && NativePrototype.clear)\n delete NativePrototype.clear;\n }\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({\n global: true,\n forced: Constructor != NativeConstructor\n }, exported);\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n if (!IS_WEAK)\n common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n return Constructor;\n};\n\n/***/ }),\n/* 141 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar $ = __w_pdfjs_require__(7);\nvar uncurryThis = __w_pdfjs_require__(18);\nvar hiddenKeys = __w_pdfjs_require__(55);\nvar isObject = __w_pdfjs_require__(23);\nvar hasOwn = __w_pdfjs_require__(41);\nvar defineProperty = (__w_pdfjs_require__(47).f);\nvar getOwnPropertyNamesModule = __w_pdfjs_require__(59);\nvar getOwnPropertyNamesExternalModule = __w_pdfjs_require__(142);\nvar isExtensible = __w_pdfjs_require__(145);\nvar uid = __w_pdfjs_require__(43);\nvar FREEZING = __w_pdfjs_require__(147);\nvar REQUIRED = false;\nvar METADATA = uid('meta');\nvar id = 0;\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, {\n value: {\n objectID: 'O' + id++,\n weakData: {}\n }\n });\n};\nvar fastKey = function (it, create) {\n if (!isObject(it))\n return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!hasOwn(it, METADATA)) {\n if (!isExtensible(it))\n return 'F';\n if (!create)\n return 'E';\n setMetadata(it);\n }\n return it[METADATA].objectID;\n};\nvar getWeakData = function (it, create) {\n if (!hasOwn(it, METADATA)) {\n if (!isExtensible(it))\n return true;\n if (!create)\n return false;\n setMetadata(it);\n }\n return it[METADATA].weakData;\n};\nvar onFreeze = function (it) {\n if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA))\n setMetadata(it);\n return it;\n};\nvar enable = function () {\n meta.enable = function () {\n };\n REQUIRED = true;\n var getOwnPropertyNames = getOwnPropertyNamesModule.f;\n var splice = uncurryThis([].splice);\n var test = {};\n test[METADATA] = 1;\n if (getOwnPropertyNames(test).length) {\n getOwnPropertyNamesModule.f = function (it) {\n var result = getOwnPropertyNames(it);\n for (var i = 0, length = result.length; i < length; i++) {\n if (result[i] === METADATA) {\n splice(result, i, 1);\n break;\n }\n }\n return result;\n };\n $({\n target: 'Object',\n stat: true,\n forced: true\n }, { getOwnPropertyNames: getOwnPropertyNamesExternalModule.f });\n }\n};\nvar meta = module.exports = {\n enable: enable,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\nhiddenKeys[METADATA] = true;\n\n/***/ }),\n/* 142 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar classof = __w_pdfjs_require__(19);\nvar toIndexedObject = __w_pdfjs_require__(16);\nvar $getOwnPropertyNames = (__w_pdfjs_require__(59).f);\nvar arraySlice = __w_pdfjs_require__(143);\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];\nvar getWindowNames = function (it) {\n try {\n return $getOwnPropertyNames(it);\n } catch (error) {\n return arraySlice(windowNames);\n }\n};\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && classof(it) == 'Window' ? getWindowNames(it) : $getOwnPropertyNames(toIndexedObject(it));\n};\n\n/***/ }),\n/* 143 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar global = __w_pdfjs_require__(8);\nvar toAbsoluteIndex = __w_pdfjs_require__(62);\nvar lengthOfArrayLike = __w_pdfjs_require__(64);\nvar createProperty = __w_pdfjs_require__(144);\nvar Array = global.Array;\nvar max = Math.max;\nmodule.exports = function (O, start, end) {\n var length = lengthOfArrayLike(O);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n var result = Array(max(fin - k, 0));\n for (var n = 0; k < fin; k++, n++)\n createProperty(result, n, O[k]);\n result.length = n;\n return result;\n};\n\n/***/ }),\n/* 144 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar toPropertyKey = __w_pdfjs_require__(21);\nvar definePropertyModule = __w_pdfjs_require__(47);\nvar createPropertyDescriptor = __w_pdfjs_require__(15);\nmodule.exports = function (object, key, value) {\n var propertyKey = toPropertyKey(key);\n if (propertyKey in object)\n definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else\n object[propertyKey] = value;\n};\n\n/***/ }),\n/* 145 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar fails = __w_pdfjs_require__(11);\nvar isObject = __w_pdfjs_require__(23);\nvar classof = __w_pdfjs_require__(19);\nvar ARRAY_BUFFER_NON_EXTENSIBLE = __w_pdfjs_require__(146);\nvar $isExtensible = Object.isExtensible;\nvar FAILS_ON_PRIMITIVES = fails(function () {\n $isExtensible(1);\n});\nmodule.exports = FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE ? function isExtensible(it) {\n if (!isObject(it))\n return false;\n if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer')\n return false;\n return $isExtensible ? $isExtensible(it) : true;\n} : $isExtensible;\n\n/***/ }),\n/* 146 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar fails = __w_pdfjs_require__(11);\nmodule.exports = fails(function () {\n if (typeof ArrayBuffer == 'function') {\n var buffer = new ArrayBuffer(8);\n if (Object.isExtensible(buffer))\n Object.defineProperty(buffer, 'a', { value: 8 });\n }\n});\n\n/***/ }),\n/* 147 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar fails = __w_pdfjs_require__(11);\nmodule.exports = !fails(function () {\n return Object.isExtensible(Object.preventExtensions({}));\n});\n\n/***/ }),\n/* 148 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar isCallable = __w_pdfjs_require__(24);\nvar isObject = __w_pdfjs_require__(23);\nvar setPrototypeOf = __w_pdfjs_require__(71);\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (setPrototypeOf && isCallable(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype)\n setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n\n/***/ }),\n/* 149 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar defineProperty = (__w_pdfjs_require__(47).f);\nvar create = __w_pdfjs_require__(73);\nvar redefineAll = __w_pdfjs_require__(102);\nvar bind = __w_pdfjs_require__(80);\nvar anInstance = __w_pdfjs_require__(104);\nvar iterate = __w_pdfjs_require__(79);\nvar defineIterator = __w_pdfjs_require__(93);\nvar setSpecies = __w_pdfjs_require__(103);\nvar DESCRIPTORS = __w_pdfjs_require__(10);\nvar fastKey = (__w_pdfjs_require__(141).fastKey);\nvar InternalStateModule = __w_pdfjs_require__(52);\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var Constructor = wrapper(function (that, iterable) {\n anInstance(that, Prototype);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS)\n that.size = 0;\n if (iterable != undefined)\n iterate(iterable, that[ADDER], {\n that: that,\n AS_ENTRIES: IS_MAP\n });\n });\n var Prototype = Constructor.prototype;\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index;\n if (entry) {\n entry.value = value;\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first)\n state.first = entry;\n if (previous)\n previous.next = entry;\n if (DESCRIPTORS)\n state.size++;\n else\n that.size++;\n if (index !== 'F')\n state.index[index] = entry;\n }\n return that;\n };\n var getEntry = function (that, key) {\n var state = getInternalState(that);\n var index = fastKey(key);\n var entry;\n if (index !== 'F')\n return state.index[index];\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key)\n return entry;\n }\n };\n redefineAll(Prototype, {\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n while (entry) {\n entry.removed = true;\n if (entry.previous)\n entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n state.first = state.last = undefined;\n if (DESCRIPTORS)\n state.size = 0;\n else\n that.size = 0;\n },\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev)\n prev.next = next;\n if (next)\n next.previous = prev;\n if (state.first == entry)\n state.first = next;\n if (state.last == entry)\n state.last = prev;\n if (DESCRIPTORS)\n state.size--;\n else\n that.size--;\n }\n return !!entry;\n },\n forEach: function forEach(callbackfn) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n var entry;\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this);\n while (entry && entry.removed)\n entry = entry.previous;\n }\n },\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n redefineAll(Prototype, IS_MAP ? {\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS)\n defineProperty(Prototype, 'size', {\n get: function () {\n return getInternalState(this).size;\n }\n });\n return Constructor;\n },\n setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last;\n while (entry && entry.removed)\n entry = entry.previous;\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n state.target = undefined;\n return {\n value: undefined,\n done: true\n };\n }\n if (kind == 'keys')\n return {\n value: entry.key,\n done: false\n };\n if (kind == 'values')\n return {\n value: entry.value,\n done: false\n };\n return {\n value: [\n entry.key,\n entry.value\n ],\n done: false\n };\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n\n/***/ }),\n/* 150 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n__w_pdfjs_require__(151);\n\n/***/ }),\n/* 151 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar collection = __w_pdfjs_require__(140);\nvar collectionStrong = __w_pdfjs_require__(149);\ncollection('Set', function (init) {\n return function Set() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n}, collectionStrong);\n\n/***/ }),\n/* 152 */\n/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar IS_PURE = __w_pdfjs_require__(38);\nvar $ = __w_pdfjs_require__(7);\nvar global = __w_pdfjs_require__(8);\nvar getBuiltin = __w_pdfjs_require__(26);\nvar uncurryThis = __w_pdfjs_require__(18);\nvar fails = __w_pdfjs_require__(11);\nvar uid = __w_pdfjs_require__(43);\nvar isCallable = __w_pdfjs_require__(24);\nvar isConstructor = __w_pdfjs_require__(107);\nvar isObject = __w_pdfjs_require__(23);\nvar isSymbol = __w_pdfjs_require__(25);\nvar iterate = __w_pdfjs_require__(79);\nvar anObject = __w_pdfjs_require__(49);\nvar classof = __w_pdfjs_require__(85);\nvar hasOwn = __w_pdfjs_require__(41);\nvar createProperty = __w_pdfjs_require__(144);\nvar createNonEnumerableProperty = __w_pdfjs_require__(46);\nvar lengthOfArrayLike = __w_pdfjs_require__(64);\nvar validateArgumentsLength = __w_pdfjs_require__(111);\nvar getRegExpFlags = __w_pdfjs_require__(153);\nvar ERROR_STACK_INSTALLABLE = __w_pdfjs_require__(90);\nvar Object = global.Object;\nvar Date = global.Date;\nvar Error = global.Error;\nvar EvalError = global.EvalError;\nvar RangeError = global.RangeError;\nvar ReferenceError = global.ReferenceError;\nvar SyntaxError = global.SyntaxError;\nvar TypeError = global.TypeError;\nvar URIError = global.URIError;\nvar PerformanceMark = global.PerformanceMark;\nvar WebAssembly = global.WebAssembly;\nvar CompileError = WebAssembly && WebAssembly.CompileError || Error;\nvar LinkError = WebAssembly && WebAssembly.LinkError || Error;\nvar RuntimeError = WebAssembly && WebAssembly.RuntimeError || Error;\nvar DOMException = getBuiltin('DOMException');\nvar Set = getBuiltin('Set');\nvar Map = getBuiltin('Map');\nvar MapPrototype = Map.prototype;\nvar mapHas = uncurryThis(MapPrototype.has);\nvar mapGet = uncurryThis(MapPrototype.get);\nvar mapSet = uncurryThis(MapPrototype.set);\nvar setAdd = uncurryThis(Set.prototype.add);\nvar objectKeys = getBuiltin('Object', 'keys');\nvar push = uncurryThis([].push);\nvar booleanValueOf = uncurryThis(true.valueOf);\nvar numberValueOf = uncurryThis(1.0.valueOf);\nvar stringValueOf = uncurryThis(''.valueOf);\nvar getTime = uncurryThis(Date.prototype.getTime);\nvar PERFORMANCE_MARK = uid('structuredClone');\nvar DATA_CLONE_ERROR = 'DataCloneError';\nvar TRANSFERRING = 'Transferring';\nvar checkBasicSemantic = function (structuredCloneImplementation) {\n return !fails(function () {\n var set1 = new global.Set([7]);\n var set2 = structuredCloneImplementation(set1);\n var number = structuredCloneImplementation(Object(7));\n return set2 == set1 || !set2.has(7) || typeof number != 'object' || number != 7;\n }) && structuredCloneImplementation;\n};\nvar checkNewErrorsSemantic = function (structuredCloneImplementation) {\n return !fails(function () {\n var test = structuredCloneImplementation(new global.AggregateError([1], PERFORMANCE_MARK, { cause: 3 }));\n return test.name != 'AggregateError' || test.errors[0] != 1 || test.message != PERFORMANCE_MARK || test.cause != 3;\n }) && structuredCloneImplementation;\n};\nvar nativeStructuredClone = global.structuredClone;\nvar FORCED_REPLACEMENT = IS_PURE || !checkNewErrorsSemantic(nativeStructuredClone);\nvar structuredCloneFromMark = !nativeStructuredClone && checkBasicSemantic(function (value) {\n return new PerformanceMark(PERFORMANCE_MARK, { detail: value }).detail;\n});\nvar nativeRestrictedStructuredClone = checkBasicSemantic(nativeStructuredClone) || structuredCloneFromMark;\nvar throwUncloneable = function (type) {\n throw new DOMException('Uncloneable type: ' + type, DATA_CLONE_ERROR);\n};\nvar throwUnpolyfillable = function (type, kind) {\n throw new DOMException((kind || 'Cloning') + ' of ' + type + ' cannot be properly polyfilled in this engine', DATA_CLONE_ERROR);\n};\nvar structuredCloneInternal = function (value, map) {\n if (isSymbol(value))\n throwUncloneable('Symbol');\n if (!isObject(value))\n return value;\n if (map) {\n if (mapHas(map, value))\n return mapGet(map, value);\n } else\n map = new Map();\n var type = classof(value);\n var deep = false;\n var C, name, cloned, dataTransfer, i, length, keys, key, source, target;\n switch (type) {\n case 'Array':\n cloned = [];\n deep = true;\n break;\n case 'Object':\n cloned = {};\n deep = true;\n break;\n case 'Map':\n cloned = new Map();\n deep = true;\n break;\n case 'Set':\n cloned = new Set();\n deep = true;\n break;\n case 'RegExp':\n cloned = new RegExp(value.source, getRegExpFlags(value));\n break;\n case 'Error':\n name = value.name;\n switch (name) {\n case 'AggregateError':\n cloned = getBuiltin('AggregateError')([]);\n break;\n case 'EvalError':\n cloned = EvalError();\n break;\n case 'RangeError':\n cloned = RangeError();\n break;\n case 'ReferenceError':\n cloned = ReferenceError();\n break;\n case 'SyntaxError':\n cloned = SyntaxError();\n break;\n case 'TypeError':\n cloned = TypeError();\n break;\n case 'URIError':\n cloned = URIError();\n break;\n case 'CompileError':\n cloned = CompileError();\n break;\n case 'LinkError':\n cloned = LinkError();\n break;\n case 'RuntimeError':\n cloned = RuntimeError();\n break;\n default:\n cloned = Error();\n }\n deep = true;\n break;\n case 'DOMException':\n cloned = new DOMException(value.message, value.name);\n deep = true;\n break;\n case 'DataView':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'BigInt64Array':\n case 'BigUint64Array':\n C = global[type];\n if (!isObject(C))\n throwUnpolyfillable(type);\n cloned = new C(structuredCloneInternal(value.buffer, map), value.byteOffset, type === 'DataView' ? value.byteLength : value.length);\n break;\n case 'DOMQuad':\n try {\n cloned = new DOMQuad(structuredCloneInternal(value.p1, map), structuredCloneInternal(value.p2, map), structuredCloneInternal(value.p3, map), structuredCloneInternal(value.p4, map));\n } catch (error) {\n if (nativeRestrictedStructuredClone) {\n cloned = nativeRestrictedStructuredClone(value);\n } else\n throwUnpolyfillable(type);\n }\n break;\n case 'FileList':\n C = global.DataTransfer;\n if (isConstructor(C)) {\n dataTransfer = new C();\n for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {\n dataTransfer.items.add(structuredCloneInternal(value[i], map));\n }\n cloned = dataTransfer.files;\n } else if (nativeRestrictedStructuredClone) {\n cloned = nativeRestrictedStructuredClone(value);\n } else\n throwUnpolyfillable(type);\n break;\n case 'ImageData':\n try {\n cloned = new ImageData(structuredCloneInternal(value.data, map), value.width, value.height, { colorSpace: value.colorSpace });\n } catch (error) {\n if (nativeRestrictedStructuredClone) {\n cloned = nativeRestrictedStructuredClone(value);\n } else\n throwUnpolyfillable(type);\n }\n break;\n default:\n if (nativeRestrictedStructuredClone) {\n cloned = nativeRestrictedStructuredClone(value);\n } else\n switch (type) {\n case 'BigInt':\n cloned = Object(value.valueOf());\n break;\n case 'Boolean':\n cloned = Object(booleanValueOf(value));\n break;\n case 'Number':\n cloned = Object(numberValueOf(value));\n break;\n case 'String':\n cloned = Object(stringValueOf(value));\n break;\n case 'Date':\n cloned = new Date(getTime(value));\n break;\n case 'ArrayBuffer':\n C = global.DataView;\n if (!C && typeof value.slice != 'function')\n throwUnpolyfillable(type);\n try {\n if (typeof value.slice == 'function') {\n cloned = value.slice(0);\n } else {\n length = value.byteLength;\n cloned = new ArrayBuffer(length);\n source = new C(value);\n target = new C(cloned);\n for (i = 0; i < length; i++) {\n target.setUint8(i, source.getUint8(i));\n }\n }\n } catch (error) {\n throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR);\n }\n break;\n case 'SharedArrayBuffer':\n cloned = value;\n break;\n case 'Blob':\n try {\n cloned = value.slice(0, value.size, value.type);\n } catch (error) {\n throwUnpolyfillable(type);\n }\n break;\n case 'DOMPoint':\n case 'DOMPointReadOnly':\n C = global[type];\n try {\n cloned = C.fromPoint ? C.fromPoint(value) : new C(value.x, value.y, value.z, value.w);\n } catch (error) {\n throwUnpolyfillable(type);\n }\n break;\n case 'DOMRect':\n case 'DOMRectReadOnly':\n C = global[type];\n try {\n cloned = C.fromRect ? C.fromRect(value) : new C(value.x, value.y, value.width, value.height);\n } catch (error) {\n throwUnpolyfillable(type);\n }\n break;\n case 'DOMMatrix':\n case 'DOMMatrixReadOnly':\n C = global[type];\n try {\n cloned = C.fromMatrix ? C.fromMatrix(value) : new C(value);\n } catch (error) {\n throwUnpolyfillable(type);\n }\n break;\n case 'AudioData':\n case 'VideoFrame':\n if (!isCallable(value.clone))\n throwUnpolyfillable(type);\n try {\n cloned = value.clone();\n } catch (error) {\n throwUncloneable(type);\n }\n break;\n case 'File':\n try {\n cloned = new File([value], value.name, value);\n } catch (error) {\n throwUnpolyfillable(type);\n }\n break;\n case 'CryptoKey':\n case 'GPUCompilationMessage':\n case 'GPUCompilationInfo':\n case 'ImageBitmap':\n case 'RTCCertificate':\n case 'WebAssembly.Module':\n throwUnpolyfillable(type);\n default:\n throwUncloneable(type);\n }\n }\n mapSet(map, value, cloned);\n if (deep)\n switch (type) {\n case 'Array':\n case 'Object':\n keys = objectKeys(value);\n for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {\n key = keys[i];\n createProperty(cloned, key, structuredCloneInternal(value[key], map));\n }\n break;\n case 'Map':\n value.forEach(function (v, k) {\n mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));\n });\n break;\n case 'Set':\n value.forEach(function (v) {\n setAdd(cloned, structuredCloneInternal(v, map));\n });\n break;\n case 'Error':\n createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));\n if (hasOwn(value, 'cause')) {\n createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));\n }\n if (name == 'AggregateError') {\n cloned.errors = structuredCloneInternal(value.errors, map);\n }\n case 'DOMException':\n if (ERROR_STACK_INSTALLABLE) {\n createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));\n }\n }\n return cloned;\n};\nvar PROPER_TRANSFER = nativeStructuredClone && !fails(function () {\n var buffer = new ArrayBuffer(8);\n var clone = nativeStructuredClone(buffer, { transfer: [buffer] });\n return buffer.byteLength != 0 || clone.byteLength != 8;\n});\nvar tryToTransfer = function (rawTransfer, map) {\n if (!isObject(rawTransfer))\n throw TypeError('Transfer option cannot be converted to a sequence');\n var transfer = [];\n iterate(rawTransfer, function (value) {\n push(transfer, anObject(value));\n });\n var i = 0;\n var length = lengthOfArrayLike(transfer);\n var value, type, C, transferredArray, transferred, canvas, context;\n if (PROPER_TRANSFER) {\n transferredArray = nativeStructuredClone(transfer, { transfer: transfer });\n while (i < length)\n mapSet(map, transfer[i], transferredArray[i++]);\n } else\n while (i < length) {\n value = transfer[i++];\n if (mapHas(map, value))\n throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);\n type = classof(value);\n switch (type) {\n case 'ImageBitmap':\n C = global.OffscreenCanvas;\n if (!isConstructor(C))\n throwUnpolyfillable(type, TRANSFERRING);\n try {\n canvas = new C(value.width, value.height);\n context = canvas.getContext('bitmaprenderer');\n context.transferFromImageBitmap(value);\n transferred = canvas.transferToImageBitmap();\n } catch (error) {\n }\n break;\n case 'AudioData':\n case 'VideoFrame':\n if (!isCallable(value.clone) || !isCallable(value.close))\n throwUnpolyfillable(type, TRANSFERRING);\n try {\n transferred = value.clone();\n value.close();\n } catch (error) {\n }\n break;\n case 'ArrayBuffer':\n case 'MessagePort':\n case 'OffscreenCanvas':\n case 'ReadableStream':\n case 'TransformStream':\n case 'WritableStream':\n throwUnpolyfillable(type, TRANSFERRING);\n }\n if (transferred === undefined)\n throw new DOMException('This object cannot be transferred: ' + type, DATA_CLONE_ERROR);\n mapSet(map, value, transferred);\n }\n};\n$({\n global: true,\n enumerable: true,\n sham: !PROPER_TRANSFER,\n forced: FORCED_REPLACEMENT\n}, {\n structuredClone: function structuredClone(value) {\n var options = validateArgumentsLength(arguments.length, 1) > 1 && arguments[1] != null ? anObject(arguments[1]) : undefined;\n var transfer = options ? options.transfer : undefined;\n var map;\n if (transfer !== undefined) {\n map = new Map();\n tryToTransfer(transfer, map);\n }\n return structuredCloneInternal(value, map);\n }\n});\n\n/***/ }),\n/* 153 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\nvar call = __w_pdfjs_require__(12);\nvar hasOwn = __w_pdfjs_require__(41);\nvar isPrototypeOf = __w_pdfjs_require__(27);\nvar regExpFlags = __w_pdfjs_require__(154);\nvar RegExpPrototype = RegExp.prototype;\nmodule.exports = function (R) {\n var flags = R.flags;\n return flags === undefined && !('flags' in RegExpPrototype) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype, R) ? call(regExpFlags, R) : flags;\n};\n\n/***/ }),\n/* 154 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\nvar anObject = __w_pdfjs_require__(49);\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.hasIndices)\n result += 'd';\n if (that.global)\n result += 'g';\n if (that.ignoreCase)\n result += 'i';\n if (that.multiline)\n result += 'm';\n if (that.dotAll)\n result += 's';\n if (that.unicode)\n result += 'u';\n if (that.sticky)\n result += 'y';\n return result;\n};\n\n/***/ }),\n/* 155 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.build = exports.RenderTask = exports.PDFWorkerUtil = exports.PDFWorker = exports.PDFPageProxy = exports.PDFDocumentProxy = exports.PDFDocumentLoadingTask = exports.PDFDataRangeTransport = exports.LoopbackPort = exports.DefaultStandardFontDataFactory = exports.DefaultCanvasFactory = exports.DefaultCMapReaderFactory = void 0;\nexports.getDocument = getDocument;\nexports.setPDFNetworkStreamFactory = setPDFNetworkStreamFactory;\nexports.version = void 0;\n\nvar _regenerator = _interopRequireDefault(__w_pdfjs_require__(156));\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _display_utils = __w_pdfjs_require__(158);\n\nvar _font_loader = __w_pdfjs_require__(160);\n\nvar _annotation_storage = __w_pdfjs_require__(161);\n\nvar _canvas = __w_pdfjs_require__(163);\n\nvar _worker_options = __w_pdfjs_require__(166);\n\nvar _is_node = __w_pdfjs_require__(3);\n\nvar _message_handler = __w_pdfjs_require__(167);\n\nvar _metadata = __w_pdfjs_require__(168);\n\nvar _optional_content_config = __w_pdfjs_require__(169);\n\nvar _transport_stream = __w_pdfjs_require__(170);\n\nvar _xfa_text = __w_pdfjs_require__(171);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }\n\nfunction _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\n\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\n\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) { _classCheckPrivateStaticAccess(receiver, classConstructor); _classCheckPrivateStaticFieldDescriptor(descriptor, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\nfunction _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) { _classCheckPrivateStaticAccess(receiver, classConstructor); _classCheckPrivateStaticFieldDescriptor(descriptor, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\n\nfunction _classCheckPrivateStaticFieldDescriptor(descriptor, action) { if (descriptor === undefined) { throw new TypeError(\"attempted to \" + action + \" private static field before its declaration\"); } }\n\nfunction _classCheckPrivateStaticAccess(receiver, classConstructor) { if (receiver !== classConstructor) { throw new TypeError(\"Private static access of wrong provenance\"); } }\n\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar DEFAULT_RANGE_CHUNK_SIZE = 65536;\nvar RENDERING_CANCELLED_TIMEOUT = 100;\nvar DefaultCanvasFactory = _display_utils.DOMCanvasFactory;\nexports.DefaultCanvasFactory = DefaultCanvasFactory;\nvar DefaultCMapReaderFactory = _display_utils.DOMCMapReaderFactory;\nexports.DefaultCMapReaderFactory = DefaultCMapReaderFactory;\nvar DefaultStandardFontDataFactory = _display_utils.DOMStandardFontDataFactory;\nexports.DefaultStandardFontDataFactory = DefaultStandardFontDataFactory;\n\nif (_is_node.isNodeJS) {\n var _require = __w_pdfjs_require__(172),\n NodeCanvasFactory = _require.NodeCanvasFactory,\n NodeCMapReaderFactory = _require.NodeCMapReaderFactory,\n NodeStandardFontDataFactory = _require.NodeStandardFontDataFactory;\n\n exports.DefaultCanvasFactory = DefaultCanvasFactory = NodeCanvasFactory;\n exports.DefaultCMapReaderFactory = DefaultCMapReaderFactory = NodeCMapReaderFactory;\n exports.DefaultStandardFontDataFactory = DefaultStandardFontDataFactory = NodeStandardFontDataFactory;\n}\n\nvar createPDFNetworkStream;\n\nfunction setPDFNetworkStreamFactory(pdfNetworkStreamFactory) {\n createPDFNetworkStream = pdfNetworkStreamFactory;\n}\n\nfunction getDocument(src) {\n var task = new PDFDocumentLoadingTask();\n var source;\n\n if (typeof src === \"string\" || src instanceof URL) {\n source = {\n url: src\n };\n } else if ((0, _util.isArrayBuffer)(src)) {\n source = {\n data: src\n };\n } else if (src instanceof PDFDataRangeTransport) {\n source = {\n range: src\n };\n } else {\n if (_typeof(src) !== \"object\") {\n throw new Error(\"Invalid parameter in getDocument, \" + \"need either string, URL, Uint8Array, or parameter object.\");\n }\n\n if (!src.url && !src.data && !src.range) {\n throw new Error(\"Invalid parameter object: need either .data, .range or .url\");\n }\n\n source = src;\n }\n\n var params = Object.create(null);\n var rangeTransport = null,\n worker = null;\n\n for (var key in source) {\n var value = source[key];\n\n switch (key) {\n case \"url\":\n if (typeof window !== \"undefined\") {\n try {\n params[key] = new URL(value, window.location).href;\n continue;\n } catch (ex) {\n (0, _util.warn)(\"Cannot create valid URL: \\\"\".concat(ex, \"\\\".\"));\n }\n } else if (typeof value === \"string\" || value instanceof URL) {\n params[key] = value.toString();\n continue;\n }\n\n throw new Error(\"Invalid PDF url data: \" + \"either string or URL-object is expected in the url property.\");\n\n case \"range\":\n rangeTransport = value;\n continue;\n\n case \"worker\":\n worker = value;\n continue;\n\n case \"data\":\n if (_is_node.isNodeJS && typeof Buffer !== \"undefined\" && value instanceof Buffer) {\n params[key] = new Uint8Array(value);\n } else if (value instanceof Uint8Array) {\n break;\n } else if (typeof value === \"string\") {\n params[key] = (0, _util.stringToBytes)(value);\n } else if (_typeof(value) === \"object\" && value !== null && !isNaN(value.length)) {\n params[key] = new Uint8Array(value);\n } else if ((0, _util.isArrayBuffer)(value)) {\n params[key] = new Uint8Array(value);\n } else {\n throw new Error(\"Invalid PDF binary data: either typed array, \" + \"string, or array-like object is expected in the data property.\");\n }\n\n continue;\n }\n\n params[key] = value;\n }\n\n params.CMapReaderFactory = params.CMapReaderFactory || DefaultCMapReaderFactory;\n params.StandardFontDataFactory = params.StandardFontDataFactory || DefaultStandardFontDataFactory;\n params.ignoreErrors = params.stopAtErrors !== true;\n params.fontExtraProperties = params.fontExtraProperties === true;\n params.pdfBug = params.pdfBug === true;\n params.enableXfa = params.enableXfa === true;\n\n if (!Number.isInteger(params.rangeChunkSize) || params.rangeChunkSize < 1) {\n params.rangeChunkSize = DEFAULT_RANGE_CHUNK_SIZE;\n }\n\n if (typeof params.docBaseUrl !== \"string\" || (0, _display_utils.isDataScheme)(params.docBaseUrl)) {\n params.docBaseUrl = null;\n }\n\n if (!Number.isInteger(params.maxImageSize) || params.maxImageSize < -1) {\n params.maxImageSize = -1;\n }\n\n if (typeof params.cMapUrl !== \"string\") {\n params.cMapUrl = null;\n }\n\n if (typeof params.standardFontDataUrl !== \"string\") {\n params.standardFontDataUrl = null;\n }\n\n if (typeof params.useWorkerFetch !== \"boolean\") {\n params.useWorkerFetch = params.CMapReaderFactory === _display_utils.DOMCMapReaderFactory && params.StandardFontDataFactory === _display_utils.DOMStandardFontDataFactory;\n }\n\n if (typeof params.isEvalSupported !== \"boolean\") {\n params.isEvalSupported = true;\n }\n\n if (typeof params.disableFontFace !== \"boolean\") {\n params.disableFontFace = _is_node.isNodeJS;\n }\n\n if (typeof params.useSystemFonts !== \"boolean\") {\n params.useSystemFonts = !_is_node.isNodeJS && !params.disableFontFace;\n }\n\n if (_typeof(params.ownerDocument) !== \"object\" || params.ownerDocument === null) {\n params.ownerDocument = globalThis.document;\n }\n\n if (typeof params.disableRange !== \"boolean\") {\n params.disableRange = false;\n }\n\n if (typeof params.disableStream !== \"boolean\") {\n params.disableStream = false;\n }\n\n if (typeof params.disableAutoFetch !== \"boolean\") {\n params.disableAutoFetch = false;\n }\n\n (0, _util.setVerbosityLevel)(params.verbosity);\n\n if (!worker) {\n var workerParams = {\n verbosity: params.verbosity,\n port: _worker_options.GlobalWorkerOptions.workerPort\n };\n worker = workerParams.port ? PDFWorker.fromPort(workerParams) : new PDFWorker(workerParams);\n task._worker = worker;\n }\n\n var docId = task.docId;\n worker.promise.then(function () {\n if (task.destroyed) {\n throw new Error(\"Loading aborted\");\n }\n\n var workerIdPromise = _fetchDocument(worker, params, rangeTransport, docId);\n\n var networkStreamPromise = new Promise(function (resolve) {\n var networkStream;\n\n if (rangeTransport) {\n networkStream = new _transport_stream.PDFDataTransportStream({\n length: params.length,\n initialData: params.initialData,\n progressiveDone: params.progressiveDone,\n contentDispositionFilename: params.contentDispositionFilename,\n disableRange: params.disableRange,\n disableStream: params.disableStream\n }, rangeTransport);\n } else if (!params.data) {\n networkStream = createPDFNetworkStream({\n url: params.url,\n length: params.length,\n httpHeaders: params.httpHeaders,\n withCredentials: params.withCredentials,\n rangeChunkSize: params.rangeChunkSize,\n disableRange: params.disableRange,\n disableStream: params.disableStream\n });\n }\n\n resolve(networkStream);\n });\n return Promise.all([workerIdPromise, networkStreamPromise]).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n workerId = _ref2[0],\n networkStream = _ref2[1];\n\n if (task.destroyed) {\n throw new Error(\"Loading aborted\");\n }\n\n var messageHandler = new _message_handler.MessageHandler(docId, workerId, worker.port);\n var transport = new WorkerTransport(messageHandler, task, networkStream, params);\n task._transport = transport;\n messageHandler.send(\"Ready\", null);\n });\n })[\"catch\"](task._capability.reject);\n return task;\n}\n\nfunction _fetchDocument(_x, _x2, _x3, _x4) {\n return _fetchDocument2.apply(this, arguments);\n}\n\nfunction _fetchDocument2() {\n _fetchDocument2 = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee7(worker, source, pdfDataRangeTransport, docId) {\n var workerId;\n return _regenerator[\"default\"].wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n if (!worker.destroyed) {\n _context7.next = 2;\n break;\n }\n\n throw new Error(\"Worker was destroyed\");\n\n case 2:\n if (pdfDataRangeTransport) {\n source.length = pdfDataRangeTransport.length;\n source.initialData = pdfDataRangeTransport.initialData;\n source.progressiveDone = pdfDataRangeTransport.progressiveDone;\n source.contentDispositionFilename = pdfDataRangeTransport.contentDispositionFilename;\n }\n\n _context7.next = 5;\n return worker.messageHandler.sendWithPromise(\"GetDocRequest\", {\n docId: docId,\n apiVersion: '2.14.305',\n source: {\n data: source.data,\n url: source.url,\n password: source.password,\n disableAutoFetch: source.disableAutoFetch,\n rangeChunkSize: source.rangeChunkSize,\n length: source.length\n },\n maxImageSize: source.maxImageSize,\n disableFontFace: source.disableFontFace,\n docBaseUrl: source.docBaseUrl,\n ignoreErrors: source.ignoreErrors,\n isEvalSupported: source.isEvalSupported,\n fontExtraProperties: source.fontExtraProperties,\n enableXfa: source.enableXfa,\n useSystemFonts: source.useSystemFonts,\n cMapUrl: source.useWorkerFetch ? source.cMapUrl : null,\n standardFontDataUrl: source.useWorkerFetch ? source.standardFontDataUrl : null\n });\n\n case 5:\n workerId = _context7.sent;\n\n if (!worker.destroyed) {\n _context7.next = 8;\n break;\n }\n\n throw new Error(\"Worker was destroyed\");\n\n case 8:\n return _context7.abrupt(\"return\", workerId);\n\n case 9:\n case \"end\":\n return _context7.stop();\n }\n }\n }, _callee7);\n }));\n return _fetchDocument2.apply(this, arguments);\n}\n\nvar PDFDocumentLoadingTask = /*#__PURE__*/function () {\n function PDFDocumentLoadingTask() {\n var _PDFDocumentLoadingTa, _PDFDocumentLoadingTa2;\n\n _classCallCheck(this, PDFDocumentLoadingTask);\n\n this._capability = (0, _util.createPromiseCapability)();\n this._transport = null;\n this._worker = null;\n this.docId = \"d\".concat((_classStaticPrivateFieldSpecSet(PDFDocumentLoadingTask, PDFDocumentLoadingTask, _docId, (_PDFDocumentLoadingTa = _classStaticPrivateFieldSpecGet(PDFDocumentLoadingTask, PDFDocumentLoadingTask, _docId), _PDFDocumentLoadingTa2 = _PDFDocumentLoadingTa++, _PDFDocumentLoadingTa)), _PDFDocumentLoadingTa2));\n this.destroyed = false;\n this.onPassword = null;\n this.onProgress = null;\n this.onUnsupportedFeature = null;\n }\n\n _createClass(PDFDocumentLoadingTask, [{\n key: \"promise\",\n get: function get() {\n return this._capability.promise;\n }\n }, {\n key: \"destroy\",\n value: function () {\n var _destroy = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee() {\n var _this$_transport;\n\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.destroyed = true;\n _context.next = 3;\n return (_this$_transport = this._transport) === null || _this$_transport === void 0 ? void 0 : _this$_transport.destroy();\n\n case 3:\n this._transport = null;\n\n if (this._worker) {\n this._worker.destroy();\n\n this._worker = null;\n }\n\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function destroy() {\n return _destroy.apply(this, arguments);\n }\n\n return destroy;\n }()\n }]);\n\n return PDFDocumentLoadingTask;\n}();\n\nexports.PDFDocumentLoadingTask = PDFDocumentLoadingTask;\nvar _docId = {\n writable: true,\n value: 0\n};\n\nvar PDFDataRangeTransport = /*#__PURE__*/function () {\n function PDFDataRangeTransport(length, initialData) {\n var progressiveDone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var contentDispositionFilename = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n _classCallCheck(this, PDFDataRangeTransport);\n\n this.length = length;\n this.initialData = initialData;\n this.progressiveDone = progressiveDone;\n this.contentDispositionFilename = contentDispositionFilename;\n this._rangeListeners = [];\n this._progressListeners = [];\n this._progressiveReadListeners = [];\n this._progressiveDoneListeners = [];\n this._readyCapability = (0, _util.createPromiseCapability)();\n }\n\n _createClass(PDFDataRangeTransport, [{\n key: \"addRangeListener\",\n value: function addRangeListener(listener) {\n this._rangeListeners.push(listener);\n }\n }, {\n key: \"addProgressListener\",\n value: function addProgressListener(listener) {\n this._progressListeners.push(listener);\n }\n }, {\n key: \"addProgressiveReadListener\",\n value: function addProgressiveReadListener(listener) {\n this._progressiveReadListeners.push(listener);\n }\n }, {\n key: \"addProgressiveDoneListener\",\n value: function addProgressiveDoneListener(listener) {\n this._progressiveDoneListeners.push(listener);\n }\n }, {\n key: \"onDataRange\",\n value: function onDataRange(begin, chunk) {\n var _iterator = _createForOfIteratorHelper(this._rangeListeners),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var listener = _step.value;\n listener(begin, chunk);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }, {\n key: \"onDataProgress\",\n value: function onDataProgress(loaded, total) {\n var _this = this;\n\n this._readyCapability.promise.then(function () {\n var _iterator2 = _createForOfIteratorHelper(_this._progressListeners),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var listener = _step2.value;\n listener(loaded, total);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n });\n }\n }, {\n key: \"onDataProgressiveRead\",\n value: function onDataProgressiveRead(chunk) {\n var _this2 = this;\n\n this._readyCapability.promise.then(function () {\n var _iterator3 = _createForOfIteratorHelper(_this2._progressiveReadListeners),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var listener = _step3.value;\n listener(chunk);\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n });\n }\n }, {\n key: \"onDataProgressiveDone\",\n value: function onDataProgressiveDone() {\n var _this3 = this;\n\n this._readyCapability.promise.then(function () {\n var _iterator4 = _createForOfIteratorHelper(_this3._progressiveDoneListeners),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var listener = _step4.value;\n listener();\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n });\n }\n }, {\n key: \"transportReady\",\n value: function transportReady() {\n this._readyCapability.resolve();\n }\n }, {\n key: \"requestDataRange\",\n value: function requestDataRange(begin, end) {\n (0, _util.unreachable)(\"Abstract method PDFDataRangeTransport.requestDataRange\");\n }\n }, {\n key: \"abort\",\n value: function abort() {}\n }]);\n\n return PDFDataRangeTransport;\n}();\n\nexports.PDFDataRangeTransport = PDFDataRangeTransport;\n\nvar PDFDocumentProxy = /*#__PURE__*/function () {\n function PDFDocumentProxy(pdfInfo, transport) {\n var _this4 = this;\n\n _classCallCheck(this, PDFDocumentProxy);\n\n this._pdfInfo = pdfInfo;\n this._transport = transport;\n Object.defineProperty(this, \"fingerprint\", {\n get: function get() {\n (0, _display_utils.deprecated)(\"`PDFDocumentProxy.fingerprint`, \" + \"please use `PDFDocumentProxy.fingerprints` instead.\");\n return this.fingerprints[0];\n }\n });\n Object.defineProperty(this, \"getStats\", {\n value: function () {\n var _value = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2() {\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n (0, _display_utils.deprecated)(\"`PDFDocumentProxy.getStats`, \" + \"please use the `PDFDocumentProxy.stats`-getter instead.\");\n return _context2.abrupt(\"return\", _this4.stats || {\n streamTypes: {},\n fontTypes: {}\n });\n\n case 2:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n function value() {\n return _value.apply(this, arguments);\n }\n\n return value;\n }()\n });\n }\n\n _createClass(PDFDocumentProxy, [{\n key: \"annotationStorage\",\n get: function get() {\n return this._transport.annotationStorage;\n }\n }, {\n key: \"numPages\",\n get: function get() {\n return this._pdfInfo.numPages;\n }\n }, {\n key: \"fingerprints\",\n get: function get() {\n return this._pdfInfo.fingerprints;\n }\n }, {\n key: \"stats\",\n get: function get() {\n return this._transport.stats;\n }\n }, {\n key: \"isPureXfa\",\n get: function get() {\n return !!this._transport._htmlForXfa;\n }\n }, {\n key: \"allXfaHtml\",\n get: function get() {\n return this._transport._htmlForXfa;\n }\n }, {\n key: \"getPage\",\n value: function getPage(pageNumber) {\n return this._transport.getPage(pageNumber);\n }\n }, {\n key: \"getPageIndex\",\n value: function getPageIndex(ref) {\n return this._transport.getPageIndex(ref);\n }\n }, {\n key: \"getDestinations\",\n value: function getDestinations() {\n return this._transport.getDestinations();\n }\n }, {\n key: \"getDestination\",\n value: function getDestination(id) {\n return this._transport.getDestination(id);\n }\n }, {\n key: \"getPageLabels\",\n value: function getPageLabels() {\n return this._transport.getPageLabels();\n }\n }, {\n key: \"getPageLayout\",\n value: function getPageLayout() {\n return this._transport.getPageLayout();\n }\n }, {\n key: \"getPageMode\",\n value: function getPageMode() {\n return this._transport.getPageMode();\n }\n }, {\n key: \"getViewerPreferences\",\n value: function getViewerPreferences() {\n return this._transport.getViewerPreferences();\n }\n }, {\n key: \"getOpenAction\",\n value: function getOpenAction() {\n return this._transport.getOpenAction();\n }\n }, {\n key: \"getAttachments\",\n value: function getAttachments() {\n return this._transport.getAttachments();\n }\n }, {\n key: \"getJavaScript\",\n value: function getJavaScript() {\n return this._transport.getJavaScript();\n }\n }, {\n key: \"getJSActions\",\n value: function getJSActions() {\n return this._transport.getDocJSActions();\n }\n }, {\n key: \"getOutline\",\n value: function getOutline() {\n return this._transport.getOutline();\n }\n }, {\n key: \"getOptionalContentConfig\",\n value: function getOptionalContentConfig() {\n return this._transport.getOptionalContentConfig();\n }\n }, {\n key: \"getPermissions\",\n value: function getPermissions() {\n return this._transport.getPermissions();\n }\n }, {\n key: \"getMetadata\",\n value: function getMetadata() {\n return this._transport.getMetadata();\n }\n }, {\n key: \"getMarkInfo\",\n value: function getMarkInfo() {\n return this._transport.getMarkInfo();\n }\n }, {\n key: \"getData\",\n value: function getData() {\n return this._transport.getData();\n }\n }, {\n key: \"getDownloadInfo\",\n value: function getDownloadInfo() {\n return this._transport.downloadInfoCapability.promise;\n }\n }, {\n key: \"cleanup\",\n value: function cleanup() {\n var keepLoadedFonts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n return this._transport.startCleanup(keepLoadedFonts || this.isPureXfa);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n return this.loadingTask.destroy();\n }\n }, {\n key: \"loadingParams\",\n get: function get() {\n return this._transport.loadingParams;\n }\n }, {\n key: \"loadingTask\",\n get: function get() {\n return this._transport.loadingTask;\n }\n }, {\n key: \"saveDocument\",\n value: function saveDocument() {\n if (this._transport.annotationStorage.size <= 0) {\n (0, _display_utils.deprecated)(\"saveDocument called while `annotationStorage` is empty, \" + \"please use the getData-method instead.\");\n }\n\n return this._transport.saveDocument();\n }\n }, {\n key: \"getFieldObjects\",\n value: function getFieldObjects() {\n return this._transport.getFieldObjects();\n }\n }, {\n key: \"hasJSActions\",\n value: function hasJSActions() {\n return this._transport.hasJSActions();\n }\n }, {\n key: \"getCalculationOrderIds\",\n value: function getCalculationOrderIds() {\n return this._transport.getCalculationOrderIds();\n }\n }]);\n\n return PDFDocumentProxy;\n}();\n\nexports.PDFDocumentProxy = PDFDocumentProxy;\n\nvar PDFPageProxy = /*#__PURE__*/function () {\n function PDFPageProxy(pageIndex, pageInfo, transport, ownerDocument) {\n var pdfBug = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n _classCallCheck(this, PDFPageProxy);\n\n this._pageIndex = pageIndex;\n this._pageInfo = pageInfo;\n this._ownerDocument = ownerDocument;\n this._transport = transport;\n this._stats = pdfBug ? new _display_utils.StatTimer() : null;\n this._pdfBug = pdfBug;\n this.commonObjs = transport.commonObjs;\n this.objs = new PDFObjects();\n this._bitmaps = new Set();\n this.cleanupAfterRender = false;\n this.pendingCleanup = false;\n this._intentStates = new Map();\n this._annotationPromises = new Map();\n this.destroyed = false;\n }\n\n _createClass(PDFPageProxy, [{\n key: \"pageNumber\",\n get: function get() {\n return this._pageIndex + 1;\n }\n }, {\n key: \"rotate\",\n get: function get() {\n return this._pageInfo.rotate;\n }\n }, {\n key: \"ref\",\n get: function get() {\n return this._pageInfo.ref;\n }\n }, {\n key: \"userUnit\",\n get: function get() {\n return this._pageInfo.userUnit;\n }\n }, {\n key: \"view\",\n get: function get() {\n return this._pageInfo.view;\n }\n }, {\n key: \"getViewport\",\n value: function getViewport() {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n scale = _ref3.scale,\n _ref3$rotation = _ref3.rotation,\n rotation = _ref3$rotation === void 0 ? this.rotate : _ref3$rotation,\n _ref3$offsetX = _ref3.offsetX,\n offsetX = _ref3$offsetX === void 0 ? 0 : _ref3$offsetX,\n _ref3$offsetY = _ref3.offsetY,\n offsetY = _ref3$offsetY === void 0 ? 0 : _ref3$offsetY,\n _ref3$dontFlip = _ref3.dontFlip,\n dontFlip = _ref3$dontFlip === void 0 ? false : _ref3$dontFlip;\n\n return new _display_utils.PageViewport({\n viewBox: this.view,\n scale: scale,\n rotation: rotation,\n offsetX: offsetX,\n offsetY: offsetY,\n dontFlip: dontFlip\n });\n }\n }, {\n key: \"getAnnotations\",\n value: function getAnnotations() {\n var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref4$intent = _ref4.intent,\n intent = _ref4$intent === void 0 ? \"display\" : _ref4$intent;\n\n var intentArgs = this._transport.getRenderingIntent(intent);\n\n var promise = this._annotationPromises.get(intentArgs.cacheKey);\n\n if (!promise) {\n promise = this._transport.getAnnotations(this._pageIndex, intentArgs.renderingIntent);\n\n this._annotationPromises.set(intentArgs.cacheKey, promise);\n\n promise = promise.then(function (annotations) {\n var _iterator5 = _createForOfIteratorHelper(annotations),\n _step5;\n\n try {\n var _loop = function _loop() {\n var annotation = _step5.value;\n\n if (annotation.titleObj !== undefined) {\n Object.defineProperty(annotation, \"title\", {\n get: function get() {\n (0, _display_utils.deprecated)(\"`title`-property on annotation, please use `titleObj` instead.\");\n return annotation.titleObj.str;\n }\n });\n }\n\n if (annotation.contentsObj !== undefined) {\n Object.defineProperty(annotation, \"contents\", {\n get: function get() {\n (0, _display_utils.deprecated)(\"`contents`-property on annotation, please use `contentsObj` instead.\");\n return annotation.contentsObj.str;\n }\n });\n }\n };\n\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n _loop();\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n return annotations;\n });\n }\n\n return promise;\n }\n }, {\n key: \"getJSActions\",\n value: function getJSActions() {\n return this._jsActionsPromise || (this._jsActionsPromise = this._transport.getPageJSActions(this._pageIndex));\n }\n }, {\n key: \"getXfa\",\n value: function () {\n var _getXfa = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee3() {\n var _this$_transport$_htm;\n\n return _regenerator[\"default\"].wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt(\"return\", ((_this$_transport$_htm = this._transport._htmlForXfa) === null || _this$_transport$_htm === void 0 ? void 0 : _this$_transport$_htm.children[this._pageIndex]) || null);\n\n case 1:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function getXfa() {\n return _getXfa.apply(this, arguments);\n }\n\n return getXfa;\n }()\n }, {\n key: \"render\",\n value: function render(_ref5) {\n var _arguments$,\n _arguments$2,\n _this5 = this,\n _intentState;\n\n var canvasContext = _ref5.canvasContext,\n viewport = _ref5.viewport,\n _ref5$intent = _ref5.intent,\n intent = _ref5$intent === void 0 ? \"display\" : _ref5$intent,\n _ref5$annotationMode = _ref5.annotationMode,\n annotationMode = _ref5$annotationMode === void 0 ? _util.AnnotationMode.ENABLE : _ref5$annotationMode,\n _ref5$transform = _ref5.transform,\n transform = _ref5$transform === void 0 ? null : _ref5$transform,\n _ref5$imageLayer = _ref5.imageLayer,\n imageLayer = _ref5$imageLayer === void 0 ? null : _ref5$imageLayer,\n _ref5$canvasFactory = _ref5.canvasFactory,\n canvasFactory = _ref5$canvasFactory === void 0 ? null : _ref5$canvasFactory,\n _ref5$background = _ref5.background,\n background = _ref5$background === void 0 ? null : _ref5$background,\n _ref5$optionalContent = _ref5.optionalContentConfigPromise,\n optionalContentConfigPromise = _ref5$optionalContent === void 0 ? null : _ref5$optionalContent,\n _ref5$annotationCanva = _ref5.annotationCanvasMap,\n annotationCanvasMap = _ref5$annotationCanva === void 0 ? null : _ref5$annotationCanva,\n _ref5$pageColors = _ref5.pageColors,\n pageColors = _ref5$pageColors === void 0 ? null : _ref5$pageColors;\n\n if (((_arguments$ = arguments[0]) === null || _arguments$ === void 0 ? void 0 : _arguments$.renderInteractiveForms) !== undefined) {\n (0, _display_utils.deprecated)(\"render no longer accepts the `renderInteractiveForms`-option, \" + \"please use the `annotationMode`-option instead.\");\n\n if (arguments[0].renderInteractiveForms === true && annotationMode === _util.AnnotationMode.ENABLE) {\n annotationMode = _util.AnnotationMode.ENABLE_FORMS;\n }\n }\n\n if (((_arguments$2 = arguments[0]) === null || _arguments$2 === void 0 ? void 0 : _arguments$2.includeAnnotationStorage) !== undefined) {\n (0, _display_utils.deprecated)(\"render no longer accepts the `includeAnnotationStorage`-option, \" + \"please use the `annotationMode`-option instead.\");\n\n if (arguments[0].includeAnnotationStorage === true && annotationMode === _util.AnnotationMode.ENABLE) {\n annotationMode = _util.AnnotationMode.ENABLE_STORAGE;\n }\n }\n\n if (this._stats) {\n this._stats.time(\"Overall\");\n }\n\n var intentArgs = this._transport.getRenderingIntent(intent, annotationMode);\n\n this.pendingCleanup = false;\n\n if (!optionalContentConfigPromise) {\n optionalContentConfigPromise = this._transport.getOptionalContentConfig();\n }\n\n var intentState = this._intentStates.get(intentArgs.cacheKey);\n\n if (!intentState) {\n intentState = Object.create(null);\n\n this._intentStates.set(intentArgs.cacheKey, intentState);\n }\n\n if (intentState.streamReaderCancelTimeout) {\n clearTimeout(intentState.streamReaderCancelTimeout);\n intentState.streamReaderCancelTimeout = null;\n }\n\n var canvasFactoryInstance = canvasFactory || new DefaultCanvasFactory({\n ownerDocument: this._ownerDocument\n });\n var intentPrint = !!(intentArgs.renderingIntent & _util.RenderingIntentFlag.PRINT);\n\n if (!intentState.displayReadyCapability) {\n intentState.displayReadyCapability = (0, _util.createPromiseCapability)();\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false\n };\n\n if (this._stats) {\n this._stats.time(\"Page Request\");\n }\n\n this._pumpOperatorList(intentArgs);\n }\n\n var complete = function complete(error) {\n intentState.renderTasks[\"delete\"](internalRenderTask);\n\n if (_this5.cleanupAfterRender || intentPrint) {\n _this5.pendingCleanup = true;\n }\n\n _this5._tryCleanup();\n\n if (error) {\n internalRenderTask.capability.reject(error);\n\n _this5._abortOperatorList({\n intentState: intentState,\n reason: error instanceof Error ? error : new Error(error)\n });\n } else {\n internalRenderTask.capability.resolve();\n }\n\n if (_this5._stats) {\n _this5._stats.timeEnd(\"Rendering\");\n\n _this5._stats.timeEnd(\"Overall\");\n }\n };\n\n var internalRenderTask = new InternalRenderTask({\n callback: complete,\n params: {\n canvasContext: canvasContext,\n viewport: viewport,\n transform: transform,\n imageLayer: imageLayer,\n background: background\n },\n objs: this.objs,\n commonObjs: this.commonObjs,\n annotationCanvasMap: annotationCanvasMap,\n operatorList: intentState.operatorList,\n pageIndex: this._pageIndex,\n canvasFactory: canvasFactoryInstance,\n useRequestAnimationFrame: !intentPrint,\n pdfBug: this._pdfBug,\n pageColors: pageColors\n });\n ((_intentState = intentState).renderTasks || (_intentState.renderTasks = new Set())).add(internalRenderTask);\n var renderTask = internalRenderTask.task;\n Promise.all([intentState.displayReadyCapability.promise, optionalContentConfigPromise]).then(function (_ref6) {\n var _ref7 = _slicedToArray(_ref6, 2),\n transparency = _ref7[0],\n optionalContentConfig = _ref7[1];\n\n if (_this5.pendingCleanup) {\n complete();\n return;\n }\n\n if (_this5._stats) {\n _this5._stats.time(\"Rendering\");\n }\n\n internalRenderTask.initializeGraphics({\n transparency: transparency,\n optionalContentConfig: optionalContentConfig\n });\n internalRenderTask.operatorListChanged();\n })[\"catch\"](complete);\n return renderTask;\n }\n }, {\n key: \"getOperatorList\",\n value: function getOperatorList() {\n var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref8$intent = _ref8.intent,\n intent = _ref8$intent === void 0 ? \"display\" : _ref8$intent,\n _ref8$annotationMode = _ref8.annotationMode,\n annotationMode = _ref8$annotationMode === void 0 ? _util.AnnotationMode.ENABLE : _ref8$annotationMode;\n\n function operatorListChanged() {\n if (intentState.operatorList.lastChunk) {\n intentState.opListReadCapability.resolve(intentState.operatorList);\n intentState.renderTasks[\"delete\"](opListTask);\n }\n }\n\n var intentArgs = this._transport.getRenderingIntent(intent, annotationMode, true);\n\n var intentState = this._intentStates.get(intentArgs.cacheKey);\n\n if (!intentState) {\n intentState = Object.create(null);\n\n this._intentStates.set(intentArgs.cacheKey, intentState);\n }\n\n var opListTask;\n\n if (!intentState.opListReadCapability) {\n var _intentState2;\n\n opListTask = Object.create(null);\n opListTask.operatorListChanged = operatorListChanged;\n intentState.opListReadCapability = (0, _util.createPromiseCapability)();\n ((_intentState2 = intentState).renderTasks || (_intentState2.renderTasks = new Set())).add(opListTask);\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false\n };\n\n if (this._stats) {\n this._stats.time(\"Page Request\");\n }\n\n this._pumpOperatorList(intentArgs);\n }\n\n return intentState.opListReadCapability.promise;\n }\n }, {\n key: \"streamTextContent\",\n value: function streamTextContent() {\n var _ref9 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref9$disableCombineT = _ref9.disableCombineTextItems,\n disableCombineTextItems = _ref9$disableCombineT === void 0 ? false : _ref9$disableCombineT,\n _ref9$includeMarkedCo = _ref9.includeMarkedContent,\n includeMarkedContent = _ref9$includeMarkedCo === void 0 ? false : _ref9$includeMarkedCo;\n\n var TEXT_CONTENT_CHUNK_SIZE = 100;\n return this._transport.messageHandler.sendWithStream(\"GetTextContent\", {\n pageIndex: this._pageIndex,\n combineTextItems: disableCombineTextItems !== true,\n includeMarkedContent: includeMarkedContent === true\n }, {\n highWaterMark: TEXT_CONTENT_CHUNK_SIZE,\n size: function size(textContent) {\n return textContent.items.length;\n }\n });\n }\n }, {\n key: \"getTextContent\",\n value: function getTextContent() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (this._transport._htmlForXfa) {\n return this.getXfa().then(function (xfa) {\n return _xfa_text.XfaText.textContent(xfa);\n });\n }\n\n var readableStream = this.streamTextContent(params);\n return new Promise(function (resolve, reject) {\n function pump() {\n reader.read().then(function (_ref10) {\n var _textContent$items;\n\n var value = _ref10.value,\n done = _ref10.done;\n\n if (done) {\n resolve(textContent);\n return;\n }\n\n Object.assign(textContent.styles, value.styles);\n\n (_textContent$items = textContent.items).push.apply(_textContent$items, _toConsumableArray(value.items));\n\n pump();\n }, reject);\n }\n\n var reader = readableStream.getReader();\n var textContent = {\n items: [],\n styles: Object.create(null)\n };\n pump();\n });\n }\n }, {\n key: \"getStructTree\",\n value: function getStructTree() {\n return this._structTreePromise || (this._structTreePromise = this._transport.getStructTree(this._pageIndex));\n }\n }, {\n key: \"_destroy\",\n value: function _destroy() {\n this.destroyed = true;\n var waitOn = [];\n\n var _iterator6 = _createForOfIteratorHelper(this._intentStates.values()),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var intentState = _step6.value;\n\n this._abortOperatorList({\n intentState: intentState,\n reason: new Error(\"Page was destroyed.\"),\n force: true\n });\n\n if (intentState.opListReadCapability) {\n continue;\n }\n\n var _iterator8 = _createForOfIteratorHelper(intentState.renderTasks),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var internalRenderTask = _step8.value;\n waitOn.push(internalRenderTask.completed);\n internalRenderTask.cancel();\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n this.objs.clear();\n\n var _iterator7 = _createForOfIteratorHelper(this._bitmaps),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var bitmap = _step7.value;\n bitmap.close();\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n\n this._bitmaps.clear();\n\n this._annotationPromises.clear();\n\n this._jsActionsPromise = null;\n this._structTreePromise = null;\n this.pendingCleanup = false;\n return Promise.all(waitOn);\n }\n }, {\n key: \"cleanup\",\n value: function cleanup() {\n var resetStats = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.pendingCleanup = true;\n return this._tryCleanup(resetStats);\n }\n }, {\n key: \"_tryCleanup\",\n value: function _tryCleanup() {\n var resetStats = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (!this.pendingCleanup) {\n return false;\n }\n\n var _iterator9 = _createForOfIteratorHelper(this._intentStates.values()),\n _step9;\n\n try {\n for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n var _step9$value = _step9.value,\n renderTasks = _step9$value.renderTasks,\n operatorList = _step9$value.operatorList;\n\n if (renderTasks.size > 0 || !operatorList.lastChunk) {\n return false;\n }\n }\n } catch (err) {\n _iterator9.e(err);\n } finally {\n _iterator9.f();\n }\n\n this._intentStates.clear();\n\n this.objs.clear();\n\n this._annotationPromises.clear();\n\n this._jsActionsPromise = null;\n this._structTreePromise = null;\n\n if (resetStats && this._stats) {\n this._stats = new _display_utils.StatTimer();\n }\n\n var _iterator10 = _createForOfIteratorHelper(this._bitmaps),\n _step10;\n\n try {\n for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n var bitmap = _step10.value;\n bitmap.close();\n }\n } catch (err) {\n _iterator10.e(err);\n } finally {\n _iterator10.f();\n }\n\n this._bitmaps.clear();\n\n this.pendingCleanup = false;\n return true;\n }\n }, {\n key: \"_startRenderPage\",\n value: function _startRenderPage(transparency, cacheKey) {\n var intentState = this._intentStates.get(cacheKey);\n\n if (!intentState) {\n return;\n }\n\n if (this._stats) {\n this._stats.timeEnd(\"Page Request\");\n }\n\n if (intentState.displayReadyCapability) {\n intentState.displayReadyCapability.resolve(transparency);\n }\n }\n }, {\n key: \"_renderPageChunk\",\n value: function _renderPageChunk(operatorListChunk, intentState) {\n for (var i = 0, ii = operatorListChunk.length; i < ii; i++) {\n intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);\n intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]);\n }\n\n intentState.operatorList.lastChunk = operatorListChunk.lastChunk;\n\n var _iterator11 = _createForOfIteratorHelper(intentState.renderTasks),\n _step11;\n\n try {\n for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n var internalRenderTask = _step11.value;\n internalRenderTask.operatorListChanged();\n }\n } catch (err) {\n _iterator11.e(err);\n } finally {\n _iterator11.f();\n }\n\n if (operatorListChunk.lastChunk) {\n this._tryCleanup();\n }\n }\n }, {\n key: \"_pumpOperatorList\",\n value: function _pumpOperatorList(_ref11) {\n var _this6 = this;\n\n var renderingIntent = _ref11.renderingIntent,\n cacheKey = _ref11.cacheKey;\n\n var readableStream = this._transport.messageHandler.sendWithStream(\"GetOperatorList\", {\n pageIndex: this._pageIndex,\n intent: renderingIntent,\n cacheKey: cacheKey,\n annotationStorage: renderingIntent & _util.RenderingIntentFlag.ANNOTATIONS_STORAGE ? this._transport.annotationStorage.serializable : null\n });\n\n var reader = readableStream.getReader();\n\n var intentState = this._intentStates.get(cacheKey);\n\n intentState.streamReader = reader;\n\n var pump = function pump() {\n reader.read().then(function (_ref12) {\n var value = _ref12.value,\n done = _ref12.done;\n\n if (done) {\n intentState.streamReader = null;\n return;\n }\n\n if (_this6._transport.destroyed) {\n return;\n }\n\n _this6._renderPageChunk(value, intentState);\n\n pump();\n }, function (reason) {\n intentState.streamReader = null;\n\n if (_this6._transport.destroyed) {\n return;\n }\n\n if (intentState.operatorList) {\n intentState.operatorList.lastChunk = true;\n\n var _iterator12 = _createForOfIteratorHelper(intentState.renderTasks),\n _step12;\n\n try {\n for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n var internalRenderTask = _step12.value;\n internalRenderTask.operatorListChanged();\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n\n _this6._tryCleanup();\n }\n\n if (intentState.displayReadyCapability) {\n intentState.displayReadyCapability.reject(reason);\n } else if (intentState.opListReadCapability) {\n intentState.opListReadCapability.reject(reason);\n } else {\n throw reason;\n }\n });\n };\n\n pump();\n }\n }, {\n key: \"_abortOperatorList\",\n value: function _abortOperatorList(_ref13) {\n var _this7 = this;\n\n var intentState = _ref13.intentState,\n reason = _ref13.reason,\n _ref13$force = _ref13.force,\n force = _ref13$force === void 0 ? false : _ref13$force;\n\n if (!intentState.streamReader) {\n return;\n }\n\n if (!force) {\n if (intentState.renderTasks.size > 0) {\n return;\n }\n\n if (reason instanceof _display_utils.RenderingCancelledException) {\n intentState.streamReaderCancelTimeout = setTimeout(function () {\n _this7._abortOperatorList({\n intentState: intentState,\n reason: reason,\n force: true\n });\n\n intentState.streamReaderCancelTimeout = null;\n }, RENDERING_CANCELLED_TIMEOUT);\n return;\n }\n }\n\n intentState.streamReader.cancel(new _util.AbortException(reason.message))[\"catch\"](function () {});\n intentState.streamReader = null;\n\n if (this._transport.destroyed) {\n return;\n }\n\n var _iterator13 = _createForOfIteratorHelper(this._intentStates),\n _step13;\n\n try {\n for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {\n var _step13$value = _slicedToArray(_step13.value, 2),\n curCacheKey = _step13$value[0],\n curIntentState = _step13$value[1];\n\n if (curIntentState === intentState) {\n this._intentStates[\"delete\"](curCacheKey);\n\n break;\n }\n }\n } catch (err) {\n _iterator13.e(err);\n } finally {\n _iterator13.f();\n }\n\n this.cleanup();\n }\n }, {\n key: \"stats\",\n get: function get() {\n return this._stats;\n }\n }]);\n\n return PDFPageProxy;\n}();\n\nexports.PDFPageProxy = PDFPageProxy;\n\nvar LoopbackPort = /*#__PURE__*/function () {\n function LoopbackPort() {\n _classCallCheck(this, LoopbackPort);\n\n this._listeners = [];\n this._deferred = Promise.resolve();\n }\n\n _createClass(LoopbackPort, [{\n key: \"postMessage\",\n value: function postMessage(obj, transfers) {\n var _this8 = this;\n\n var event = {\n data: structuredClone(obj, transfers)\n };\n\n this._deferred.then(function () {\n var _iterator14 = _createForOfIteratorHelper(_this8._listeners),\n _step14;\n\n try {\n for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {\n var listener = _step14.value;\n listener.call(_this8, event);\n }\n } catch (err) {\n _iterator14.e(err);\n } finally {\n _iterator14.f();\n }\n });\n }\n }, {\n key: \"addEventListener\",\n value: function addEventListener(name, listener) {\n this._listeners.push(listener);\n }\n }, {\n key: \"removeEventListener\",\n value: function removeEventListener(name, listener) {\n var i = this._listeners.indexOf(listener);\n\n this._listeners.splice(i, 1);\n }\n }, {\n key: \"terminate\",\n value: function terminate() {\n this._listeners.length = 0;\n }\n }]);\n\n return LoopbackPort;\n}();\n\nexports.LoopbackPort = LoopbackPort;\nvar PDFWorkerUtil = {\n isWorkerDisabled: false,\n fallbackWorkerSrc: null,\n fakeWorkerId: 0\n};\nexports.PDFWorkerUtil = PDFWorkerUtil;\n{\n if (_is_node.isNodeJS && typeof require === \"function\") {\n PDFWorkerUtil.isWorkerDisabled = true;\n PDFWorkerUtil.fallbackWorkerSrc = \"./pdf.worker.js\";\n } else if ((typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === \"object\") {\n var _document, _document$currentScri;\n\n var pdfjsFilePath = (_document = document) === null || _document === void 0 ? void 0 : (_document$currentScri = _document.currentScript) === null || _document$currentScri === void 0 ? void 0 : _document$currentScri.src;\n\n if (pdfjsFilePath) {\n PDFWorkerUtil.fallbackWorkerSrc = pdfjsFilePath.replace(/(\\.(?:min\\.)?js)(\\?.*)?$/i, \".worker$1$2\");\n }\n }\n\n PDFWorkerUtil.isSameOrigin = function (baseUrl, otherUrl) {\n var base;\n\n try {\n base = new URL(baseUrl);\n\n if (!base.origin || base.origin === \"null\") {\n return false;\n }\n } catch (e) {\n return false;\n }\n\n var other = new URL(otherUrl, base);\n return base.origin === other.origin;\n };\n\n PDFWorkerUtil.createCDNWrapper = function (url) {\n var wrapper = \"importScripts(\\\"\".concat(url, \"\\\");\");\n return URL.createObjectURL(new Blob([wrapper]));\n };\n}\n\nvar PDFWorker = /*#__PURE__*/function () {\n function PDFWorker() {\n var _ref14 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref14$name = _ref14.name,\n name = _ref14$name === void 0 ? null : _ref14$name,\n _ref14$port = _ref14.port,\n port = _ref14$port === void 0 ? null : _ref14$port,\n _ref14$verbosity = _ref14.verbosity,\n verbosity = _ref14$verbosity === void 0 ? (0, _util.getVerbosityLevel)() : _ref14$verbosity;\n\n _classCallCheck(this, PDFWorker);\n\n if (port && _classStaticPrivateFieldSpecGet(PDFWorker, PDFWorker, _workerPorts).has(port)) {\n throw new Error(\"Cannot use more than one PDFWorker per port.\");\n }\n\n this.name = name;\n this.destroyed = false;\n this.verbosity = verbosity;\n this._readyCapability = (0, _util.createPromiseCapability)();\n this._port = null;\n this._webWorker = null;\n this._messageHandler = null;\n\n if (port) {\n _classStaticPrivateFieldSpecGet(PDFWorker, PDFWorker, _workerPorts).set(port, this);\n\n this._initializeFromPort(port);\n\n return;\n }\n\n this._initialize();\n }\n\n _createClass(PDFWorker, [{\n key: \"promise\",\n get: function get() {\n return this._readyCapability.promise;\n }\n }, {\n key: \"port\",\n get: function get() {\n return this._port;\n }\n }, {\n key: \"messageHandler\",\n get: function get() {\n return this._messageHandler;\n }\n }, {\n key: \"_initializeFromPort\",\n value: function _initializeFromPort(port) {\n this._port = port;\n this._messageHandler = new _message_handler.MessageHandler(\"main\", \"worker\", port);\n\n this._messageHandler.on(\"ready\", function () {});\n\n this._readyCapability.resolve();\n }\n }, {\n key: \"_initialize\",\n value: function _initialize() {\n var _this9 = this;\n\n if (typeof Worker !== \"undefined\" && !PDFWorkerUtil.isWorkerDisabled && !PDFWorker._mainThreadWorkerMessageHandler) {\n var workerSrc = PDFWorker.workerSrc;\n\n try {\n if (!PDFWorkerUtil.isSameOrigin(window.location.href, workerSrc)) {\n workerSrc = PDFWorkerUtil.createCDNWrapper(new URL(workerSrc, window.location).href);\n }\n\n var worker = new Worker(workerSrc);\n var messageHandler = new _message_handler.MessageHandler(\"main\", \"worker\", worker);\n\n var terminateEarly = function terminateEarly() {\n worker.removeEventListener(\"error\", onWorkerError);\n messageHandler.destroy();\n worker.terminate();\n\n if (_this9.destroyed) {\n _this9._readyCapability.reject(new Error(\"Worker was destroyed\"));\n } else {\n _this9._setupFakeWorker();\n }\n };\n\n var onWorkerError = function onWorkerError() {\n if (!_this9._webWorker) {\n terminateEarly();\n }\n };\n\n worker.addEventListener(\"error\", onWorkerError);\n messageHandler.on(\"test\", function (data) {\n worker.removeEventListener(\"error\", onWorkerError);\n\n if (_this9.destroyed) {\n terminateEarly();\n return;\n }\n\n if (data) {\n _this9._messageHandler = messageHandler;\n _this9._port = worker;\n _this9._webWorker = worker;\n\n _this9._readyCapability.resolve();\n\n messageHandler.send(\"configure\", {\n verbosity: _this9.verbosity\n });\n } else {\n _this9._setupFakeWorker();\n\n messageHandler.destroy();\n worker.terminate();\n }\n });\n messageHandler.on(\"ready\", function (data) {\n worker.removeEventListener(\"error\", onWorkerError);\n\n if (_this9.destroyed) {\n terminateEarly();\n return;\n }\n\n try {\n sendTest();\n } catch (e) {\n _this9._setupFakeWorker();\n }\n });\n\n var sendTest = function sendTest() {\n var testObj = new Uint8Array();\n messageHandler.send(\"test\", testObj, [testObj.buffer]);\n };\n\n sendTest();\n return;\n } catch (e) {\n (0, _util.info)(\"The worker has been disabled.\");\n }\n }\n\n this._setupFakeWorker();\n }\n }, {\n key: \"_setupFakeWorker\",\n value: function _setupFakeWorker() {\n var _this10 = this;\n\n if (!PDFWorkerUtil.isWorkerDisabled) {\n (0, _util.warn)(\"Setting up fake worker.\");\n PDFWorkerUtil.isWorkerDisabled = true;\n }\n\n PDFWorker._setupFakeWorkerGlobal.then(function (WorkerMessageHandler) {\n if (_this10.destroyed) {\n _this10._readyCapability.reject(new Error(\"Worker was destroyed\"));\n\n return;\n }\n\n var port = new LoopbackPort();\n _this10._port = port;\n var id = \"fake\".concat(PDFWorkerUtil.fakeWorkerId++);\n var workerHandler = new _message_handler.MessageHandler(id + \"_worker\", id, port);\n WorkerMessageHandler.setup(workerHandler, port);\n var messageHandler = new _message_handler.MessageHandler(id, id + \"_worker\", port);\n _this10._messageHandler = messageHandler;\n\n _this10._readyCapability.resolve();\n\n messageHandler.send(\"configure\", {\n verbosity: _this10.verbosity\n });\n })[\"catch\"](function (reason) {\n _this10._readyCapability.reject(new Error(\"Setting up fake worker failed: \\\"\".concat(reason.message, \"\\\".\")));\n });\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.destroyed = true;\n\n if (this._webWorker) {\n this._webWorker.terminate();\n\n this._webWorker = null;\n }\n\n _classStaticPrivateFieldSpecGet(PDFWorker, PDFWorker, _workerPorts)[\"delete\"](this._port);\n\n this._port = null;\n\n if (this._messageHandler) {\n this._messageHandler.destroy();\n\n this._messageHandler = null;\n }\n }\n }], [{\n key: \"fromPort\",\n value: function fromPort(params) {\n if (!(params !== null && params !== void 0 && params.port)) {\n throw new Error(\"PDFWorker.fromPort - invalid method signature.\");\n }\n\n if (_classStaticPrivateFieldSpecGet(this, PDFWorker, _workerPorts).has(params.port)) {\n return _classStaticPrivateFieldSpecGet(this, PDFWorker, _workerPorts).get(params.port);\n }\n\n return new PDFWorker(params);\n }\n }, {\n key: \"workerSrc\",\n get: function get() {\n if (_worker_options.GlobalWorkerOptions.workerSrc) {\n return _worker_options.GlobalWorkerOptions.workerSrc;\n }\n\n if (PDFWorkerUtil.fallbackWorkerSrc !== null) {\n if (!_is_node.isNodeJS) {\n (0, _display_utils.deprecated)('No \"GlobalWorkerOptions.workerSrc\" specified.');\n }\n\n return PDFWorkerUtil.fallbackWorkerSrc;\n }\n\n throw new Error('No \"GlobalWorkerOptions.workerSrc\" specified.');\n }\n }, {\n key: \"_mainThreadWorkerMessageHandler\",\n get: function get() {\n try {\n var _globalThis$pdfjsWork;\n\n return ((_globalThis$pdfjsWork = globalThis.pdfjsWorker) === null || _globalThis$pdfjsWork === void 0 ? void 0 : _globalThis$pdfjsWork.WorkerMessageHandler) || null;\n } catch (ex) {\n return null;\n }\n }\n }, {\n key: \"_setupFakeWorkerGlobal\",\n get: function get() {\n var _this11 = this;\n\n var loader = /*#__PURE__*/function () {\n var _ref15 = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee4() {\n var mainWorkerMessageHandler, worker;\n return _regenerator[\"default\"].wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n mainWorkerMessageHandler = _this11._mainThreadWorkerMessageHandler;\n\n if (!mainWorkerMessageHandler) {\n _context4.next = 3;\n break;\n }\n\n return _context4.abrupt(\"return\", mainWorkerMessageHandler);\n\n case 3:\n if (!(_is_node.isNodeJS && typeof require === \"function\")) {\n _context4.next = 6;\n break;\n }\n\n worker = eval(\"require\")(_this11.workerSrc);\n return _context4.abrupt(\"return\", worker.WorkerMessageHandler);\n\n case 6:\n _context4.next = 8;\n return (0, _display_utils.loadScript)(_this11.workerSrc);\n\n case 8:\n return _context4.abrupt(\"return\", window.pdfjsWorker.WorkerMessageHandler);\n\n case 9:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4);\n }));\n\n return function loader() {\n return _ref15.apply(this, arguments);\n };\n }();\n\n return (0, _util.shadow)(this, \"_setupFakeWorkerGlobal\", loader());\n }\n }]);\n\n return PDFWorker;\n}();\n\nexports.PDFWorker = PDFWorker;\nvar _workerPorts = {\n writable: true,\n value: new WeakMap()\n};\n{\n PDFWorker.getWorkerSrc = function () {\n (0, _display_utils.deprecated)(\"`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead.\");\n return this.workerSrc;\n };\n}\n\nvar _docStats = /*#__PURE__*/new WeakMap();\n\nvar _pageCache = /*#__PURE__*/new WeakMap();\n\nvar _pagePromises = /*#__PURE__*/new WeakMap();\n\nvar _metadataPromise = /*#__PURE__*/new WeakMap();\n\nvar WorkerTransport = /*#__PURE__*/function () {\n function WorkerTransport(messageHandler, loadingTask, networkStream, params) {\n _classCallCheck(this, WorkerTransport);\n\n _classPrivateFieldInitSpec(this, _docStats, {\n writable: true,\n value: null\n });\n\n _classPrivateFieldInitSpec(this, _pageCache, {\n writable: true,\n value: new Map()\n });\n\n _classPrivateFieldInitSpec(this, _pagePromises, {\n writable: true,\n value: new Map()\n });\n\n _classPrivateFieldInitSpec(this, _metadataPromise, {\n writable: true,\n value: null\n });\n\n this.messageHandler = messageHandler;\n this.loadingTask = loadingTask;\n this.commonObjs = new PDFObjects();\n this.fontLoader = new _font_loader.FontLoader({\n docId: loadingTask.docId,\n onUnsupportedFeature: this._onUnsupportedFeature.bind(this),\n ownerDocument: params.ownerDocument,\n styleElement: params.styleElement\n });\n this._params = params;\n\n if (!params.useWorkerFetch) {\n this.CMapReaderFactory = new params.CMapReaderFactory({\n baseUrl: params.cMapUrl,\n isCompressed: params.cMapPacked\n });\n this.StandardFontDataFactory = new params.StandardFontDataFactory({\n baseUrl: params.standardFontDataUrl\n });\n }\n\n this.destroyed = false;\n this.destroyCapability = null;\n this._passwordCapability = null;\n this._networkStream = networkStream;\n this._fullReader = null;\n this._lastProgress = null;\n this.downloadInfoCapability = (0, _util.createPromiseCapability)();\n this.setupMessageHandler();\n }\n\n _createClass(WorkerTransport, [{\n key: \"annotationStorage\",\n get: function get() {\n return (0, _util.shadow)(this, \"annotationStorage\", new _annotation_storage.AnnotationStorage());\n }\n }, {\n key: \"stats\",\n get: function get() {\n return _classPrivateFieldGet(this, _docStats);\n }\n }, {\n key: \"getRenderingIntent\",\n value: function getRenderingIntent(intent) {\n var annotationMode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _util.AnnotationMode.ENABLE;\n var isOpList = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var renderingIntent = _util.RenderingIntentFlag.DISPLAY;\n var annotationHash = \"\";\n\n switch (intent) {\n case \"any\":\n renderingIntent = _util.RenderingIntentFlag.ANY;\n break;\n\n case \"display\":\n break;\n\n case \"print\":\n renderingIntent = _util.RenderingIntentFlag.PRINT;\n break;\n\n default:\n (0, _util.warn)(\"getRenderingIntent - invalid intent: \".concat(intent));\n }\n\n switch (annotationMode) {\n case _util.AnnotationMode.DISABLE:\n renderingIntent += _util.RenderingIntentFlag.ANNOTATIONS_DISABLE;\n break;\n\n case _util.AnnotationMode.ENABLE:\n break;\n\n case _util.AnnotationMode.ENABLE_FORMS:\n renderingIntent += _util.RenderingIntentFlag.ANNOTATIONS_FORMS;\n break;\n\n case _util.AnnotationMode.ENABLE_STORAGE:\n renderingIntent += _util.RenderingIntentFlag.ANNOTATIONS_STORAGE;\n annotationHash = this.annotationStorage.hash;\n break;\n\n default:\n (0, _util.warn)(\"getRenderingIntent - invalid annotationMode: \".concat(annotationMode));\n }\n\n if (isOpList) {\n renderingIntent += _util.RenderingIntentFlag.OPLIST;\n }\n\n return {\n renderingIntent: renderingIntent,\n cacheKey: \"\".concat(renderingIntent, \"_\").concat(annotationHash)\n };\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this12 = this;\n\n if (this.destroyCapability) {\n return this.destroyCapability.promise;\n }\n\n this.destroyed = true;\n this.destroyCapability = (0, _util.createPromiseCapability)();\n\n if (this._passwordCapability) {\n this._passwordCapability.reject(new Error(\"Worker was destroyed during onPassword callback\"));\n }\n\n var waitOn = [];\n\n var _iterator15 = _createForOfIteratorHelper(_classPrivateFieldGet(this, _pageCache).values()),\n _step15;\n\n try {\n for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {\n var page = _step15.value;\n waitOn.push(page._destroy());\n }\n } catch (err) {\n _iterator15.e(err);\n } finally {\n _iterator15.f();\n }\n\n _classPrivateFieldGet(this, _pageCache).clear();\n\n _classPrivateFieldGet(this, _pagePromises).clear();\n\n if (this.hasOwnProperty(\"annotationStorage\")) {\n this.annotationStorage.resetModified();\n }\n\n var terminated = this.messageHandler.sendWithPromise(\"Terminate\", null);\n waitOn.push(terminated);\n Promise.all(waitOn).then(function () {\n _this12.commonObjs.clear();\n\n _this12.fontLoader.clear();\n\n _classPrivateFieldSet(_this12, _metadataPromise, null);\n\n _this12._getFieldObjectsPromise = null;\n _this12._hasJSActionsPromise = null;\n\n if (_this12._networkStream) {\n _this12._networkStream.cancelAllRequests(new _util.AbortException(\"Worker was terminated.\"));\n }\n\n if (_this12.messageHandler) {\n _this12.messageHandler.destroy();\n\n _this12.messageHandler = null;\n }\n\n _this12.destroyCapability.resolve();\n }, this.destroyCapability.reject);\n return this.destroyCapability.promise;\n }\n }, {\n key: \"setupMessageHandler\",\n value: function setupMessageHandler() {\n var _this13 = this;\n\n var messageHandler = this.messageHandler,\n loadingTask = this.loadingTask;\n messageHandler.on(\"GetReader\", function (data, sink) {\n (0, _util.assert)(_this13._networkStream, \"GetReader - no `IPDFStream` instance available.\");\n _this13._fullReader = _this13._networkStream.getFullReader();\n\n _this13._fullReader.onProgress = function (evt) {\n _this13._lastProgress = {\n loaded: evt.loaded,\n total: evt.total\n };\n };\n\n sink.onPull = function () {\n _this13._fullReader.read().then(function (_ref16) {\n var value = _ref16.value,\n done = _ref16.done;\n\n if (done) {\n sink.close();\n return;\n }\n\n (0, _util.assert)((0, _util.isArrayBuffer)(value), \"GetReader - expected an ArrayBuffer.\");\n sink.enqueue(new Uint8Array(value), 1, [value]);\n })[\"catch\"](function (reason) {\n sink.error(reason);\n });\n };\n\n sink.onCancel = function (reason) {\n _this13._fullReader.cancel(reason);\n\n sink.ready[\"catch\"](function (readyReason) {\n if (_this13.destroyed) {\n return;\n }\n\n throw readyReason;\n });\n };\n });\n messageHandler.on(\"ReaderHeadersReady\", function (data) {\n var headersCapability = (0, _util.createPromiseCapability)();\n var fullReader = _this13._fullReader;\n fullReader.headersReady.then(function () {\n if (!fullReader.isStreamingSupported || !fullReader.isRangeSupported) {\n if (_this13._lastProgress) {\n var _loadingTask$onProgre;\n\n (_loadingTask$onProgre = loadingTask.onProgress) === null || _loadingTask$onProgre === void 0 ? void 0 : _loadingTask$onProgre.call(loadingTask, _this13._lastProgress);\n }\n\n fullReader.onProgress = function (evt) {\n var _loadingTask$onProgre2;\n\n (_loadingTask$onProgre2 = loadingTask.onProgress) === null || _loadingTask$onProgre2 === void 0 ? void 0 : _loadingTask$onProgre2.call(loadingTask, {\n loaded: evt.loaded,\n total: evt.total\n });\n };\n }\n\n headersCapability.resolve({\n isStreamingSupported: fullReader.isStreamingSupported,\n isRangeSupported: fullReader.isRangeSupported,\n contentLength: fullReader.contentLength\n });\n }, headersCapability.reject);\n return headersCapability.promise;\n });\n messageHandler.on(\"GetRangeReader\", function (data, sink) {\n (0, _util.assert)(_this13._networkStream, \"GetRangeReader - no `IPDFStream` instance available.\");\n\n var rangeReader = _this13._networkStream.getRangeReader(data.begin, data.end);\n\n if (!rangeReader) {\n sink.close();\n return;\n }\n\n sink.onPull = function () {\n rangeReader.read().then(function (_ref17) {\n var value = _ref17.value,\n done = _ref17.done;\n\n if (done) {\n sink.close();\n return;\n }\n\n (0, _util.assert)((0, _util.isArrayBuffer)(value), \"GetRangeReader - expected an ArrayBuffer.\");\n sink.enqueue(new Uint8Array(value), 1, [value]);\n })[\"catch\"](function (reason) {\n sink.error(reason);\n });\n };\n\n sink.onCancel = function (reason) {\n rangeReader.cancel(reason);\n sink.ready[\"catch\"](function (readyReason) {\n if (_this13.destroyed) {\n return;\n }\n\n throw readyReason;\n });\n };\n });\n messageHandler.on(\"GetDoc\", function (_ref18) {\n var pdfInfo = _ref18.pdfInfo;\n _this13._numPages = pdfInfo.numPages;\n _this13._htmlForXfa = pdfInfo.htmlForXfa;\n delete pdfInfo.htmlForXfa;\n\n loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo, _this13));\n });\n messageHandler.on(\"DocException\", function (ex) {\n var reason;\n\n switch (ex.name) {\n case \"PasswordException\":\n reason = new _util.PasswordException(ex.message, ex.code);\n break;\n\n case \"InvalidPDFException\":\n reason = new _util.InvalidPDFException(ex.message);\n break;\n\n case \"MissingPDFException\":\n reason = new _util.MissingPDFException(ex.message);\n break;\n\n case \"UnexpectedResponseException\":\n reason = new _util.UnexpectedResponseException(ex.message, ex.status);\n break;\n\n case \"UnknownErrorException\":\n reason = new _util.UnknownErrorException(ex.message, ex.details);\n break;\n\n default:\n (0, _util.unreachable)(\"DocException - expected a valid Error.\");\n }\n\n loadingTask._capability.reject(reason);\n });\n messageHandler.on(\"PasswordRequest\", function (exception) {\n _this13._passwordCapability = (0, _util.createPromiseCapability)();\n\n if (loadingTask.onPassword) {\n var updatePassword = function updatePassword(password) {\n if (password instanceof Error) {\n _this13._passwordCapability.reject(password);\n } else {\n _this13._passwordCapability.resolve({\n password: password\n });\n }\n };\n\n try {\n loadingTask.onPassword(updatePassword, exception.code);\n } catch (ex) {\n _this13._passwordCapability.reject(ex);\n }\n } else {\n _this13._passwordCapability.reject(new _util.PasswordException(exception.message, exception.code));\n }\n\n return _this13._passwordCapability.promise;\n });\n messageHandler.on(\"DataLoaded\", function (data) {\n var _loadingTask$onProgre3;\n\n (_loadingTask$onProgre3 = loadingTask.onProgress) === null || _loadingTask$onProgre3 === void 0 ? void 0 : _loadingTask$onProgre3.call(loadingTask, {\n loaded: data.length,\n total: data.length\n });\n\n _this13.downloadInfoCapability.resolve(data);\n });\n messageHandler.on(\"StartRenderPage\", function (data) {\n if (_this13.destroyed) {\n return;\n }\n\n var page = _classPrivateFieldGet(_this13, _pageCache).get(data.pageIndex);\n\n page._startRenderPage(data.transparency, data.cacheKey);\n });\n messageHandler.on(\"commonobj\", function (_ref19) {\n var _globalThis$FontInspe;\n\n var _ref20 = _slicedToArray(_ref19, 3),\n id = _ref20[0],\n type = _ref20[1],\n exportedData = _ref20[2];\n\n if (_this13.destroyed) {\n return;\n }\n\n if (_this13.commonObjs.has(id)) {\n return;\n }\n\n switch (type) {\n case \"Font\":\n var params = _this13._params;\n\n if (\"error\" in exportedData) {\n var exportedError = exportedData.error;\n (0, _util.warn)(\"Error during font loading: \".concat(exportedError));\n\n _this13.commonObjs.resolve(id, exportedError);\n\n break;\n }\n\n var fontRegistry = null;\n\n if (params.pdfBug && (_globalThis$FontInspe = globalThis.FontInspector) !== null && _globalThis$FontInspe !== void 0 && _globalThis$FontInspe.enabled) {\n fontRegistry = {\n registerFont: function registerFont(font, url) {\n globalThis.FontInspector.fontAdded(font, url);\n }\n };\n }\n\n var font = new _font_loader.FontFaceObject(exportedData, {\n isEvalSupported: params.isEvalSupported,\n disableFontFace: params.disableFontFace,\n ignoreErrors: params.ignoreErrors,\n onUnsupportedFeature: _this13._onUnsupportedFeature.bind(_this13),\n fontRegistry: fontRegistry\n });\n\n _this13.fontLoader.bind(font)[\"catch\"](function (reason) {\n return messageHandler.sendWithPromise(\"FontFallback\", {\n id: id\n });\n })[\"finally\"](function () {\n if (!params.fontExtraProperties && font.data) {\n font.data = null;\n }\n\n _this13.commonObjs.resolve(id, font);\n });\n\n break;\n\n case \"FontPath\":\n case \"Image\":\n _this13.commonObjs.resolve(id, exportedData);\n\n break;\n\n default:\n throw new Error(\"Got unknown common object type \".concat(type));\n }\n });\n messageHandler.on(\"obj\", function (_ref21) {\n var _ref22 = _slicedToArray(_ref21, 4),\n id = _ref22[0],\n pageIndex = _ref22[1],\n type = _ref22[2],\n imageData = _ref22[3];\n\n if (_this13.destroyed) {\n return;\n }\n\n var pageProxy = _classPrivateFieldGet(_this13, _pageCache).get(pageIndex);\n\n if (pageProxy.objs.has(id)) {\n return;\n }\n\n switch (type) {\n case \"Image\":\n pageProxy.objs.resolve(id, imageData);\n var MAX_IMAGE_SIZE_TO_STORE = 8000000;\n\n if (imageData) {\n var length;\n\n if (imageData.bitmap) {\n var bitmap = imageData.bitmap,\n width = imageData.width,\n height = imageData.height;\n length = width * height * 4;\n\n pageProxy._bitmaps.add(bitmap);\n } else {\n var _imageData$data;\n\n length = ((_imageData$data = imageData.data) === null || _imageData$data === void 0 ? void 0 : _imageData$data.length) || 0;\n }\n\n if (length > MAX_IMAGE_SIZE_TO_STORE) {\n pageProxy.cleanupAfterRender = true;\n }\n }\n\n break;\n\n case \"Pattern\":\n pageProxy.objs.resolve(id, imageData);\n break;\n\n default:\n throw new Error(\"Got unknown object type \".concat(type));\n }\n });\n messageHandler.on(\"DocProgress\", function (data) {\n var _loadingTask$onProgre4;\n\n if (_this13.destroyed) {\n return;\n }\n\n (_loadingTask$onProgre4 = loadingTask.onProgress) === null || _loadingTask$onProgre4 === void 0 ? void 0 : _loadingTask$onProgre4.call(loadingTask, {\n loaded: data.loaded,\n total: data.total\n });\n });\n messageHandler.on(\"DocStats\", function (data) {\n if (_this13.destroyed) {\n return;\n }\n\n _classPrivateFieldSet(_this13, _docStats, Object.freeze({\n streamTypes: Object.freeze(data.streamTypes),\n fontTypes: Object.freeze(data.fontTypes)\n }));\n });\n messageHandler.on(\"UnsupportedFeature\", this._onUnsupportedFeature.bind(this));\n messageHandler.on(\"FetchBuiltInCMap\", function (data) {\n if (_this13.destroyed) {\n return Promise.reject(new Error(\"Worker was destroyed.\"));\n }\n\n if (!_this13.CMapReaderFactory) {\n return Promise.reject(new Error(\"CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.\"));\n }\n\n return _this13.CMapReaderFactory.fetch(data);\n });\n messageHandler.on(\"FetchStandardFontData\", function (data) {\n if (_this13.destroyed) {\n return Promise.reject(new Error(\"Worker was destroyed.\"));\n }\n\n if (!_this13.StandardFontDataFactory) {\n return Promise.reject(new Error(\"StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.\"));\n }\n\n return _this13.StandardFontDataFactory.fetch(data);\n });\n }\n }, {\n key: \"_onUnsupportedFeature\",\n value: function _onUnsupportedFeature(_ref23) {\n var _this$loadingTask$onU, _this$loadingTask;\n\n var featureId = _ref23.featureId;\n\n if (this.destroyed) {\n return;\n }\n\n (_this$loadingTask$onU = (_this$loadingTask = this.loadingTask).onUnsupportedFeature) === null || _this$loadingTask$onU === void 0 ? void 0 : _this$loadingTask$onU.call(_this$loadingTask, featureId);\n }\n }, {\n key: \"getData\",\n value: function getData() {\n return this.messageHandler.sendWithPromise(\"GetData\", null);\n }\n }, {\n key: \"getPage\",\n value: function getPage(pageNumber) {\n var _this14 = this;\n\n if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this._numPages) {\n return Promise.reject(new Error(\"Invalid page request.\"));\n }\n\n var pageIndex = pageNumber - 1,\n cachedPromise = _classPrivateFieldGet(this, _pagePromises).get(pageIndex);\n\n if (cachedPromise) {\n return cachedPromise;\n }\n\n var promise = this.messageHandler.sendWithPromise(\"GetPage\", {\n pageIndex: pageIndex\n }).then(function (pageInfo) {\n if (_this14.destroyed) {\n throw new Error(\"Transport destroyed\");\n }\n\n var page = new PDFPageProxy(pageIndex, pageInfo, _this14, _this14._params.ownerDocument, _this14._params.pdfBug);\n\n _classPrivateFieldGet(_this14, _pageCache).set(pageIndex, page);\n\n return page;\n });\n\n _classPrivateFieldGet(this, _pagePromises).set(pageIndex, promise);\n\n return promise;\n }\n }, {\n key: \"getPageIndex\",\n value: function getPageIndex(ref) {\n if (_typeof(ref) !== \"object\" || ref === null || !Number.isInteger(ref.num) || ref.num < 0 || !Number.isInteger(ref.gen) || ref.gen < 0) {\n return Promise.reject(new Error(\"Invalid pageIndex request.\"));\n }\n\n return this.messageHandler.sendWithPromise(\"GetPageIndex\", {\n num: ref.num,\n gen: ref.gen\n });\n }\n }, {\n key: \"getAnnotations\",\n value: function getAnnotations(pageIndex, intent) {\n return this.messageHandler.sendWithPromise(\"GetAnnotations\", {\n pageIndex: pageIndex,\n intent: intent\n });\n }\n }, {\n key: \"saveDocument\",\n value: function saveDocument() {\n var _this$_fullReader$fil,\n _this$_fullReader,\n _this15 = this;\n\n return this.messageHandler.sendWithPromise(\"SaveDocument\", {\n isPureXfa: !!this._htmlForXfa,\n numPages: this._numPages,\n annotationStorage: this.annotationStorage.serializable,\n filename: (_this$_fullReader$fil = (_this$_fullReader = this._fullReader) === null || _this$_fullReader === void 0 ? void 0 : _this$_fullReader.filename) !== null && _this$_fullReader$fil !== void 0 ? _this$_fullReader$fil : null\n })[\"finally\"](function () {\n _this15.annotationStorage.resetModified();\n });\n }\n }, {\n key: \"getFieldObjects\",\n value: function getFieldObjects() {\n return this._getFieldObjectsPromise || (this._getFieldObjectsPromise = this.messageHandler.sendWithPromise(\"GetFieldObjects\", null));\n }\n }, {\n key: \"hasJSActions\",\n value: function hasJSActions() {\n return this._hasJSActionsPromise || (this._hasJSActionsPromise = this.messageHandler.sendWithPromise(\"HasJSActions\", null));\n }\n }, {\n key: \"getCalculationOrderIds\",\n value: function getCalculationOrderIds() {\n return this.messageHandler.sendWithPromise(\"GetCalculationOrderIds\", null);\n }\n }, {\n key: \"getDestinations\",\n value: function getDestinations() {\n return this.messageHandler.sendWithPromise(\"GetDestinations\", null);\n }\n }, {\n key: \"getDestination\",\n value: function getDestination(id) {\n if (typeof id !== \"string\") {\n return Promise.reject(new Error(\"Invalid destination request.\"));\n }\n\n return this.messageHandler.sendWithPromise(\"GetDestination\", {\n id: id\n });\n }\n }, {\n key: \"getPageLabels\",\n value: function getPageLabels() {\n return this.messageHandler.sendWithPromise(\"GetPageLabels\", null);\n }\n }, {\n key: \"getPageLayout\",\n value: function getPageLayout() {\n return this.messageHandler.sendWithPromise(\"GetPageLayout\", null);\n }\n }, {\n key: \"getPageMode\",\n value: function getPageMode() {\n return this.messageHandler.sendWithPromise(\"GetPageMode\", null);\n }\n }, {\n key: \"getViewerPreferences\",\n value: function getViewerPreferences() {\n return this.messageHandler.sendWithPromise(\"GetViewerPreferences\", null);\n }\n }, {\n key: \"getOpenAction\",\n value: function getOpenAction() {\n return this.messageHandler.sendWithPromise(\"GetOpenAction\", null);\n }\n }, {\n key: \"getAttachments\",\n value: function getAttachments() {\n return this.messageHandler.sendWithPromise(\"GetAttachments\", null);\n }\n }, {\n key: \"getJavaScript\",\n value: function getJavaScript() {\n return this.messageHandler.sendWithPromise(\"GetJavaScript\", null);\n }\n }, {\n key: \"getDocJSActions\",\n value: function getDocJSActions() {\n return this.messageHandler.sendWithPromise(\"GetDocJSActions\", null);\n }\n }, {\n key: \"getPageJSActions\",\n value: function getPageJSActions(pageIndex) {\n return this.messageHandler.sendWithPromise(\"GetPageJSActions\", {\n pageIndex: pageIndex\n });\n }\n }, {\n key: \"getStructTree\",\n value: function getStructTree(pageIndex) {\n return this.messageHandler.sendWithPromise(\"GetStructTree\", {\n pageIndex: pageIndex\n });\n }\n }, {\n key: \"getOutline\",\n value: function getOutline() {\n return this.messageHandler.sendWithPromise(\"GetOutline\", null);\n }\n }, {\n key: \"getOptionalContentConfig\",\n value: function getOptionalContentConfig() {\n return this.messageHandler.sendWithPromise(\"GetOptionalContentConfig\", null).then(function (results) {\n return new _optional_content_config.OptionalContentConfig(results);\n });\n }\n }, {\n key: \"getPermissions\",\n value: function getPermissions() {\n return this.messageHandler.sendWithPromise(\"GetPermissions\", null);\n }\n }, {\n key: \"getMetadata\",\n value: function getMetadata() {\n var _this16 = this;\n\n return _classPrivateFieldGet(this, _metadataPromise) || _classPrivateFieldSet(this, _metadataPromise, this.messageHandler.sendWithPromise(\"GetMetadata\", null).then(function (results) {\n var _this16$_fullReader$f, _this16$_fullReader, _this16$_fullReader$c, _this16$_fullReader2;\n\n return {\n info: results[0],\n metadata: results[1] ? new _metadata.Metadata(results[1]) : null,\n contentDispositionFilename: (_this16$_fullReader$f = (_this16$_fullReader = _this16._fullReader) === null || _this16$_fullReader === void 0 ? void 0 : _this16$_fullReader.filename) !== null && _this16$_fullReader$f !== void 0 ? _this16$_fullReader$f : null,\n contentLength: (_this16$_fullReader$c = (_this16$_fullReader2 = _this16._fullReader) === null || _this16$_fullReader2 === void 0 ? void 0 : _this16$_fullReader2.contentLength) !== null && _this16$_fullReader$c !== void 0 ? _this16$_fullReader$c : null\n };\n }));\n }\n }, {\n key: \"getMarkInfo\",\n value: function getMarkInfo() {\n return this.messageHandler.sendWithPromise(\"GetMarkInfo\", null);\n }\n }, {\n key: \"startCleanup\",\n value: function () {\n var _startCleanup = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee5() {\n var keepLoadedFonts,\n _iterator16,\n _step16,\n page,\n cleanupSuccessful,\n _args5 = arguments;\n\n return _regenerator[\"default\"].wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n keepLoadedFonts = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : false;\n _context5.next = 3;\n return this.messageHandler.sendWithPromise(\"Cleanup\", null);\n\n case 3:\n if (!this.destroyed) {\n _context5.next = 5;\n break;\n }\n\n return _context5.abrupt(\"return\");\n\n case 5:\n _iterator16 = _createForOfIteratorHelper(_classPrivateFieldGet(this, _pageCache).values());\n _context5.prev = 6;\n\n _iterator16.s();\n\n case 8:\n if ((_step16 = _iterator16.n()).done) {\n _context5.next = 15;\n break;\n }\n\n page = _step16.value;\n cleanupSuccessful = page.cleanup();\n\n if (cleanupSuccessful) {\n _context5.next = 13;\n break;\n }\n\n throw new Error(\"startCleanup: Page \".concat(page.pageNumber, \" is currently rendering.\"));\n\n case 13:\n _context5.next = 8;\n break;\n\n case 15:\n _context5.next = 20;\n break;\n\n case 17:\n _context5.prev = 17;\n _context5.t0 = _context5[\"catch\"](6);\n\n _iterator16.e(_context5.t0);\n\n case 20:\n _context5.prev = 20;\n\n _iterator16.f();\n\n return _context5.finish(20);\n\n case 23:\n this.commonObjs.clear();\n\n if (!keepLoadedFonts) {\n this.fontLoader.clear();\n }\n\n _classPrivateFieldSet(this, _metadataPromise, null);\n\n this._getFieldObjectsPromise = null;\n this._hasJSActionsPromise = null;\n\n case 28:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this, [[6, 17, 20, 23]]);\n }));\n\n function startCleanup() {\n return _startCleanup.apply(this, arguments);\n }\n\n return startCleanup;\n }()\n }, {\n key: \"loadingParams\",\n get: function get() {\n var params = this._params;\n return (0, _util.shadow)(this, \"loadingParams\", {\n disableAutoFetch: params.disableAutoFetch,\n enableXfa: params.enableXfa\n });\n }\n }]);\n\n return WorkerTransport;\n}();\n\nvar _objs = /*#__PURE__*/new WeakMap();\n\nvar _ensureObj = /*#__PURE__*/new WeakSet();\n\nvar PDFObjects = /*#__PURE__*/function () {\n function PDFObjects() {\n _classCallCheck(this, PDFObjects);\n\n _classPrivateMethodInitSpec(this, _ensureObj);\n\n _classPrivateFieldInitSpec(this, _objs, {\n writable: true,\n value: Object.create(null)\n });\n }\n\n _createClass(PDFObjects, [{\n key: \"get\",\n value: function get(objId) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if (callback) {\n var _obj = _classPrivateMethodGet(this, _ensureObj, _ensureObj2).call(this, objId);\n\n _obj.capability.promise.then(function () {\n return callback(_obj.data);\n });\n\n return null;\n }\n\n var obj = _classPrivateFieldGet(this, _objs)[objId];\n\n if (!(obj !== null && obj !== void 0 && obj.capability.settled)) {\n throw new Error(\"Requesting object that isn't resolved yet \".concat(objId, \".\"));\n }\n\n return obj.data;\n }\n }, {\n key: \"has\",\n value: function has(objId) {\n var obj = _classPrivateFieldGet(this, _objs)[objId];\n\n return (obj === null || obj === void 0 ? void 0 : obj.capability.settled) || false;\n }\n }, {\n key: \"resolve\",\n value: function resolve(objId) {\n var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n var obj = _classPrivateMethodGet(this, _ensureObj, _ensureObj2).call(this, objId);\n\n obj.data = data;\n obj.capability.resolve();\n }\n }, {\n key: \"clear\",\n value: function clear() {\n _classPrivateFieldSet(this, _objs, Object.create(null));\n }\n }]);\n\n return PDFObjects;\n}();\n\nfunction _ensureObj2(objId) {\n var obj = _classPrivateFieldGet(this, _objs)[objId];\n\n if (obj) {\n return obj;\n }\n\n return _classPrivateFieldGet(this, _objs)[objId] = {\n capability: (0, _util.createPromiseCapability)(),\n data: null\n };\n}\n\nvar RenderTask = /*#__PURE__*/function () {\n function RenderTask(internalRenderTask) {\n _classCallCheck(this, RenderTask);\n\n this._internalRenderTask = internalRenderTask;\n this.onContinue = null;\n }\n\n _createClass(RenderTask, [{\n key: \"promise\",\n get: function get() {\n return this._internalRenderTask.capability.promise;\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n this._internalRenderTask.cancel();\n }\n }]);\n\n return RenderTask;\n}();\n\nexports.RenderTask = RenderTask;\n\nvar InternalRenderTask = /*#__PURE__*/function () {\n function InternalRenderTask(_ref24) {\n var callback = _ref24.callback,\n params = _ref24.params,\n objs = _ref24.objs,\n commonObjs = _ref24.commonObjs,\n annotationCanvasMap = _ref24.annotationCanvasMap,\n operatorList = _ref24.operatorList,\n pageIndex = _ref24.pageIndex,\n canvasFactory = _ref24.canvasFactory,\n _ref24$useRequestAnim = _ref24.useRequestAnimationFrame,\n useRequestAnimationFrame = _ref24$useRequestAnim === void 0 ? false : _ref24$useRequestAnim,\n _ref24$pdfBug = _ref24.pdfBug,\n pdfBug = _ref24$pdfBug === void 0 ? false : _ref24$pdfBug,\n _ref24$pageColors = _ref24.pageColors,\n pageColors = _ref24$pageColors === void 0 ? null : _ref24$pageColors;\n\n _classCallCheck(this, InternalRenderTask);\n\n this.callback = callback;\n this.params = params;\n this.objs = objs;\n this.commonObjs = commonObjs;\n this.annotationCanvasMap = annotationCanvasMap;\n this.operatorListIdx = null;\n this.operatorList = operatorList;\n this._pageIndex = pageIndex;\n this.canvasFactory = canvasFactory;\n this._pdfBug = pdfBug;\n this.pageColors = pageColors;\n this.running = false;\n this.graphicsReadyCallback = null;\n this.graphicsReady = false;\n this._useRequestAnimationFrame = useRequestAnimationFrame === true && typeof window !== \"undefined\";\n this.cancelled = false;\n this.capability = (0, _util.createPromiseCapability)();\n this.task = new RenderTask(this);\n this._cancelBound = this.cancel.bind(this);\n this._continueBound = this._continue.bind(this);\n this._scheduleNextBound = this._scheduleNext.bind(this);\n this._nextBound = this._next.bind(this);\n this._canvas = params.canvasContext.canvas;\n }\n\n _createClass(InternalRenderTask, [{\n key: \"completed\",\n get: function get() {\n return this.capability.promise[\"catch\"](function () {});\n }\n }, {\n key: \"initializeGraphics\",\n value: function initializeGraphics(_ref25) {\n var _globalThis$StepperMa;\n\n var _ref25$transparency = _ref25.transparency,\n transparency = _ref25$transparency === void 0 ? false : _ref25$transparency,\n optionalContentConfig = _ref25.optionalContentConfig;\n\n if (this.cancelled) {\n return;\n }\n\n if (this._canvas) {\n if (_classStaticPrivateFieldSpecGet(InternalRenderTask, InternalRenderTask, _canvasInUse).has(this._canvas)) {\n throw new Error(\"Cannot use the same canvas during multiple render() operations. \" + \"Use different canvas or ensure previous operations were \" + \"cancelled or completed.\");\n }\n\n _classStaticPrivateFieldSpecGet(InternalRenderTask, InternalRenderTask, _canvasInUse).add(this._canvas);\n }\n\n if (this._pdfBug && (_globalThis$StepperMa = globalThis.StepperManager) !== null && _globalThis$StepperMa !== void 0 && _globalThis$StepperMa.enabled) {\n this.stepper = globalThis.StepperManager.create(this._pageIndex);\n this.stepper.init(this.operatorList);\n this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();\n }\n\n var _this$params = this.params,\n canvasContext = _this$params.canvasContext,\n viewport = _this$params.viewport,\n transform = _this$params.transform,\n imageLayer = _this$params.imageLayer,\n background = _this$params.background;\n this.gfx = new _canvas.CanvasGraphics(canvasContext, this.commonObjs, this.objs, this.canvasFactory, imageLayer, optionalContentConfig, this.annotationCanvasMap, this.pageColors);\n this.gfx.beginDrawing({\n transform: transform,\n viewport: viewport,\n transparency: transparency,\n background: background\n });\n this.operatorListIdx = 0;\n this.graphicsReady = true;\n\n if (this.graphicsReadyCallback) {\n this.graphicsReadyCallback();\n }\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n this.running = false;\n this.cancelled = true;\n\n if (this.gfx) {\n this.gfx.endDrawing();\n }\n\n if (this._canvas) {\n _classStaticPrivateFieldSpecGet(InternalRenderTask, InternalRenderTask, _canvasInUse)[\"delete\"](this._canvas);\n }\n\n this.callback(error || new _display_utils.RenderingCancelledException(\"Rendering cancelled, page \".concat(this._pageIndex + 1), \"canvas\"));\n }\n }, {\n key: \"operatorListChanged\",\n value: function operatorListChanged() {\n if (!this.graphicsReady) {\n if (!this.graphicsReadyCallback) {\n this.graphicsReadyCallback = this._continueBound;\n }\n\n return;\n }\n\n if (this.stepper) {\n this.stepper.updateOperatorList(this.operatorList);\n }\n\n if (this.running) {\n return;\n }\n\n this._continue();\n }\n }, {\n key: \"_continue\",\n value: function _continue() {\n this.running = true;\n\n if (this.cancelled) {\n return;\n }\n\n if (this.task.onContinue) {\n this.task.onContinue(this._scheduleNextBound);\n } else {\n this._scheduleNext();\n }\n }\n }, {\n key: \"_scheduleNext\",\n value: function _scheduleNext() {\n var _this17 = this;\n\n if (this._useRequestAnimationFrame) {\n window.requestAnimationFrame(function () {\n _this17._nextBound()[\"catch\"](_this17._cancelBound);\n });\n } else {\n Promise.resolve().then(this._nextBound)[\"catch\"](this._cancelBound);\n }\n }\n }, {\n key: \"_next\",\n value: function () {\n var _next2 = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee6() {\n return _regenerator[\"default\"].wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n if (!this.cancelled) {\n _context6.next = 2;\n break;\n }\n\n return _context6.abrupt(\"return\");\n\n case 2:\n this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper);\n\n if (this.operatorListIdx === this.operatorList.argsArray.length) {\n this.running = false;\n\n if (this.operatorList.lastChunk) {\n this.gfx.endDrawing();\n\n if (this._canvas) {\n _classStaticPrivateFieldSpecGet(InternalRenderTask, InternalRenderTask, _canvasInUse)[\"delete\"](this._canvas);\n }\n\n this.callback();\n }\n }\n\n case 4:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n\n function _next() {\n return _next2.apply(this, arguments);\n }\n\n return _next;\n }()\n }]);\n\n return InternalRenderTask;\n}();\n\nvar _canvasInUse = {\n writable: true,\n value: new WeakSet()\n};\nvar version = '2.14.305';\nexports.version = version;\nvar build = 'eaaa8b4ad';\nexports.build = build;\n\n/***/ }),\n/* 156 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nmodule.exports = __w_pdfjs_require__(157);\n\n/***/ }),\n/* 157 */\n/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n/* module decorator */ module = __w_pdfjs_require__.nmd(module);\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar runtime = function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined;\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n return generator;\n }\n\n exports.wrap = wrap;\n\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n var ContinueSentinel = {};\n\n function Generator() {}\n\n function GeneratorFunction() {}\n\n function GeneratorFunctionPrototype() {}\n\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n\n if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\");\n\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function (genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === \"GeneratorFunction\" : false;\n };\n\n exports.mark = function (genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n exports.awrap = function (arg) {\n return {\n __await: arg\n };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n\n if (value && _typeof(value) === \"object\" && hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped;\n resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n context.sent = context._sent = context.arg;\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n var record = tryCatch(innerFn, self, context);\n\n if (record.type === \"normal\") {\n state = context.done ? GenStateCompleted : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n\n if (method === undefined) {\n context.delegate = null;\n\n if (context.method === \"throw\") {\n if (delegate.iterator[\"return\"]) {\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (!info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n context[delegate.resultName] = info.value;\n context.next = delegate.nextLoc;\n\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n } else {\n return info;\n }\n\n context.delegate = null;\n return ContinueSentinel;\n }\n\n defineIteratorMethods(Gp);\n define(Gp, toStringTagSymbol, \"Generator\");\n define(Gp, iteratorSymbol, function () {\n return this;\n });\n define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function (object) {\n var keys = [];\n\n for (var key in object) {\n keys.push(key);\n }\n\n keys.reverse();\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n return next;\n };\n\n return next.next = next;\n }\n }\n\n return {\n next: doneResult\n };\n }\n\n exports.values = values;\n\n function doneResult() {\n return {\n value: undefined,\n done: true\n };\n }\n\n Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n this.method = \"next\";\n this.arg = undefined;\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n if (name.charAt(0) === \"t\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n stop: function stop() {\n this.done = true;\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !!caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry && (type === \"break\" || type === \"continue\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" || record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n\n return thrown;\n }\n }\n\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n return exports;\n}(( false ? 0 : _typeof(module)) === \"object\" ? module.exports : {});\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if ((typeof globalThis === \"undefined\" ? \"undefined\" : _typeof(globalThis)) === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n\n/***/ }),\n/* 158 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.StatTimer = exports.RenderingCancelledException = exports.PixelsPerInch = exports.PageViewport = exports.PDFDateString = exports.DOMStandardFontDataFactory = exports.DOMSVGFactory = exports.DOMCanvasFactory = exports.DOMCMapReaderFactory = void 0;\nexports.deprecated = deprecated;\nexports.getFilenameFromUrl = getFilenameFromUrl;\nexports.getPdfFilenameFromUrl = getPdfFilenameFromUrl;\nexports.getXfaPageViewport = getXfaPageViewport;\nexports.isDataScheme = isDataScheme;\nexports.isPdfFile = isPdfFile;\nexports.isValidFetchUrl = isValidFetchUrl;\nexports.loadScript = loadScript;\n\nvar _regenerator = _interopRequireDefault(__w_pdfjs_require__(156));\n\nvar _base_factory = __w_pdfjs_require__(159);\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar SVG_NS = \"http://www.w3.org/2000/svg\";\n\nvar PixelsPerInch = /*#__PURE__*/_createClass(function PixelsPerInch() {\n _classCallCheck(this, PixelsPerInch);\n});\n\nexports.PixelsPerInch = PixelsPerInch;\n\n_defineProperty(PixelsPerInch, \"CSS\", 96.0);\n\n_defineProperty(PixelsPerInch, \"PDF\", 72.0);\n\n_defineProperty(PixelsPerInch, \"PDF_TO_CSS_UNITS\", PixelsPerInch.CSS / PixelsPerInch.PDF);\n\nvar DOMCanvasFactory = /*#__PURE__*/function (_BaseCanvasFactory) {\n _inherits(DOMCanvasFactory, _BaseCanvasFactory);\n\n var _super = _createSuper(DOMCanvasFactory);\n\n function DOMCanvasFactory() {\n var _this;\n\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$ownerDocument = _ref.ownerDocument,\n ownerDocument = _ref$ownerDocument === void 0 ? globalThis.document : _ref$ownerDocument;\n\n _classCallCheck(this, DOMCanvasFactory);\n\n _this = _super.call(this);\n _this._document = ownerDocument;\n return _this;\n }\n\n _createClass(DOMCanvasFactory, [{\n key: \"_createCanvas\",\n value: function _createCanvas(width, height) {\n var canvas = this._document.createElement(\"canvas\");\n\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n }]);\n\n return DOMCanvasFactory;\n}(_base_factory.BaseCanvasFactory);\n\nexports.DOMCanvasFactory = DOMCanvasFactory;\n\nfunction fetchData(_x) {\n return _fetchData.apply(this, arguments);\n}\n\nfunction _fetchData() {\n _fetchData = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee(url) {\n var asTypedArray,\n response,\n _args = arguments;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n asTypedArray = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;\n\n if (!isValidFetchUrl(url, document.baseURI)) {\n _context.next = 21;\n break;\n }\n\n _context.next = 4;\n return fetch(url);\n\n case 4:\n response = _context.sent;\n\n if (response.ok) {\n _context.next = 7;\n break;\n }\n\n throw new Error(response.statusText);\n\n case 7:\n if (!asTypedArray) {\n _context.next = 15;\n break;\n }\n\n _context.t1 = Uint8Array;\n _context.next = 11;\n return response.arrayBuffer();\n\n case 11:\n _context.t2 = _context.sent;\n _context.t0 = new _context.t1(_context.t2);\n _context.next = 20;\n break;\n\n case 15:\n _context.t3 = _util.stringToBytes;\n _context.next = 18;\n return response.text();\n\n case 18:\n _context.t4 = _context.sent;\n _context.t0 = (0, _context.t3)(_context.t4);\n\n case 20:\n return _context.abrupt(\"return\", _context.t0);\n\n case 21:\n return _context.abrupt(\"return\", new Promise(function (resolve, reject) {\n var request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n\n if (asTypedArray) {\n request.responseType = \"arraybuffer\";\n }\n\n request.onreadystatechange = function () {\n if (request.readyState !== XMLHttpRequest.DONE) {\n return;\n }\n\n if (request.status === 200 || request.status === 0) {\n var data;\n\n if (asTypedArray && request.response) {\n data = new Uint8Array(request.response);\n } else if (!asTypedArray && request.responseText) {\n data = (0, _util.stringToBytes)(request.responseText);\n }\n\n if (data) {\n resolve(data);\n return;\n }\n }\n\n reject(new Error(request.statusText));\n };\n\n request.send(null);\n }));\n\n case 22:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _fetchData.apply(this, arguments);\n}\n\nvar DOMCMapReaderFactory = /*#__PURE__*/function (_BaseCMapReaderFactor) {\n _inherits(DOMCMapReaderFactory, _BaseCMapReaderFactor);\n\n var _super2 = _createSuper(DOMCMapReaderFactory);\n\n function DOMCMapReaderFactory() {\n _classCallCheck(this, DOMCMapReaderFactory);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(DOMCMapReaderFactory, [{\n key: \"_fetchData\",\n value: function _fetchData(url, compressionType) {\n return fetchData(url, this.isCompressed).then(function (data) {\n return {\n cMapData: data,\n compressionType: compressionType\n };\n });\n }\n }]);\n\n return DOMCMapReaderFactory;\n}(_base_factory.BaseCMapReaderFactory);\n\nexports.DOMCMapReaderFactory = DOMCMapReaderFactory;\n\nvar DOMStandardFontDataFactory = /*#__PURE__*/function (_BaseStandardFontData) {\n _inherits(DOMStandardFontDataFactory, _BaseStandardFontData);\n\n var _super3 = _createSuper(DOMStandardFontDataFactory);\n\n function DOMStandardFontDataFactory() {\n _classCallCheck(this, DOMStandardFontDataFactory);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(DOMStandardFontDataFactory, [{\n key: \"_fetchData\",\n value: function _fetchData(url) {\n return fetchData(url, true);\n }\n }]);\n\n return DOMStandardFontDataFactory;\n}(_base_factory.BaseStandardFontDataFactory);\n\nexports.DOMStandardFontDataFactory = DOMStandardFontDataFactory;\n\nvar DOMSVGFactory = /*#__PURE__*/function (_BaseSVGFactory) {\n _inherits(DOMSVGFactory, _BaseSVGFactory);\n\n var _super4 = _createSuper(DOMSVGFactory);\n\n function DOMSVGFactory() {\n _classCallCheck(this, DOMSVGFactory);\n\n return _super4.apply(this, arguments);\n }\n\n _createClass(DOMSVGFactory, [{\n key: \"_createSVG\",\n value: function _createSVG(type) {\n return document.createElementNS(SVG_NS, type);\n }\n }]);\n\n return DOMSVGFactory;\n}(_base_factory.BaseSVGFactory);\n\nexports.DOMSVGFactory = DOMSVGFactory;\n\nvar PageViewport = /*#__PURE__*/function () {\n function PageViewport(_ref2) {\n var viewBox = _ref2.viewBox,\n scale = _ref2.scale,\n rotation = _ref2.rotation,\n _ref2$offsetX = _ref2.offsetX,\n offsetX = _ref2$offsetX === void 0 ? 0 : _ref2$offsetX,\n _ref2$offsetY = _ref2.offsetY,\n offsetY = _ref2$offsetY === void 0 ? 0 : _ref2$offsetY,\n _ref2$dontFlip = _ref2.dontFlip,\n dontFlip = _ref2$dontFlip === void 0 ? false : _ref2$dontFlip;\n\n _classCallCheck(this, PageViewport);\n\n this.viewBox = viewBox;\n this.scale = scale;\n this.rotation = rotation;\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n var centerX = (viewBox[2] + viewBox[0]) / 2;\n var centerY = (viewBox[3] + viewBox[1]) / 2;\n var rotateA, rotateB, rotateC, rotateD;\n rotation %= 360;\n\n if (rotation < 0) {\n rotation += 360;\n }\n\n switch (rotation) {\n case 180:\n rotateA = -1;\n rotateB = 0;\n rotateC = 0;\n rotateD = 1;\n break;\n\n case 90:\n rotateA = 0;\n rotateB = 1;\n rotateC = 1;\n rotateD = 0;\n break;\n\n case 270:\n rotateA = 0;\n rotateB = -1;\n rotateC = -1;\n rotateD = 0;\n break;\n\n case 0:\n rotateA = 1;\n rotateB = 0;\n rotateC = 0;\n rotateD = -1;\n break;\n\n default:\n throw new Error(\"PageViewport: Invalid rotation, must be a multiple of 90 degrees.\");\n }\n\n if (dontFlip) {\n rotateC = -rotateC;\n rotateD = -rotateD;\n }\n\n var offsetCanvasX, offsetCanvasY;\n var width, height;\n\n if (rotateA === 0) {\n offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;\n offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;\n width = Math.abs(viewBox[3] - viewBox[1]) * scale;\n height = Math.abs(viewBox[2] - viewBox[0]) * scale;\n } else {\n offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;\n offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;\n width = Math.abs(viewBox[2] - viewBox[0]) * scale;\n height = Math.abs(viewBox[3] - viewBox[1]) * scale;\n }\n\n this.transform = [rotateA * scale, rotateB * scale, rotateC * scale, rotateD * scale, offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY, offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY];\n this.width = width;\n this.height = height;\n }\n\n _createClass(PageViewport, [{\n key: \"clone\",\n value: function clone() {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref3$scale = _ref3.scale,\n scale = _ref3$scale === void 0 ? this.scale : _ref3$scale,\n _ref3$rotation = _ref3.rotation,\n rotation = _ref3$rotation === void 0 ? this.rotation : _ref3$rotation,\n _ref3$offsetX = _ref3.offsetX,\n offsetX = _ref3$offsetX === void 0 ? this.offsetX : _ref3$offsetX,\n _ref3$offsetY = _ref3.offsetY,\n offsetY = _ref3$offsetY === void 0 ? this.offsetY : _ref3$offsetY,\n _ref3$dontFlip = _ref3.dontFlip,\n dontFlip = _ref3$dontFlip === void 0 ? false : _ref3$dontFlip;\n\n return new PageViewport({\n viewBox: this.viewBox.slice(),\n scale: scale,\n rotation: rotation,\n offsetX: offsetX,\n offsetY: offsetY,\n dontFlip: dontFlip\n });\n }\n }, {\n key: \"convertToViewportPoint\",\n value: function convertToViewportPoint(x, y) {\n return _util.Util.applyTransform([x, y], this.transform);\n }\n }, {\n key: \"convertToViewportRectangle\",\n value: function convertToViewportRectangle(rect) {\n var topLeft = _util.Util.applyTransform([rect[0], rect[1]], this.transform);\n\n var bottomRight = _util.Util.applyTransform([rect[2], rect[3]], this.transform);\n\n return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]];\n }\n }, {\n key: \"convertToPdfPoint\",\n value: function convertToPdfPoint(x, y) {\n return _util.Util.applyInverseTransform([x, y], this.transform);\n }\n }]);\n\n return PageViewport;\n}();\n\nexports.PageViewport = PageViewport;\n\nvar RenderingCancelledException = /*#__PURE__*/function (_BaseException) {\n _inherits(RenderingCancelledException, _BaseException);\n\n var _super5 = _createSuper(RenderingCancelledException);\n\n function RenderingCancelledException(msg, type) {\n var _this2;\n\n _classCallCheck(this, RenderingCancelledException);\n\n _this2 = _super5.call(this, msg, \"RenderingCancelledException\");\n _this2.type = type;\n return _this2;\n }\n\n return _createClass(RenderingCancelledException);\n}(_util.BaseException);\n\nexports.RenderingCancelledException = RenderingCancelledException;\n\nfunction isDataScheme(url) {\n var ii = url.length;\n var i = 0;\n\n while (i < ii && url[i].trim() === \"\") {\n i++;\n }\n\n return url.substring(i, i + 5).toLowerCase() === \"data:\";\n}\n\nfunction isPdfFile(filename) {\n return typeof filename === \"string\" && /\\.pdf$/i.test(filename);\n}\n\nfunction getFilenameFromUrl(url) {\n var anchor = url.indexOf(\"#\");\n var query = url.indexOf(\"?\");\n var end = Math.min(anchor > 0 ? anchor : url.length, query > 0 ? query : url.length);\n return url.substring(url.lastIndexOf(\"/\", end) + 1, end);\n}\n\nfunction getPdfFilenameFromUrl(url) {\n var defaultFilename = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"document.pdf\";\n\n if (typeof url !== \"string\") {\n return defaultFilename;\n }\n\n if (isDataScheme(url)) {\n (0, _util.warn)('getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons.');\n return defaultFilename;\n }\n\n var reURI = /^(?:(?:[^:]+:)?\\/\\/[^/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/;\n var reFilename = /[^/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i;\n var splitURI = reURI.exec(url);\n var suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]);\n\n if (suggestedFilename) {\n suggestedFilename = suggestedFilename[0];\n\n if (suggestedFilename.includes(\"%\")) {\n try {\n suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0];\n } catch (ex) {}\n }\n }\n\n return suggestedFilename || defaultFilename;\n}\n\nvar StatTimer = /*#__PURE__*/function () {\n function StatTimer() {\n _classCallCheck(this, StatTimer);\n\n this.started = Object.create(null);\n this.times = [];\n }\n\n _createClass(StatTimer, [{\n key: \"time\",\n value: function time(name) {\n if (name in this.started) {\n (0, _util.warn)(\"Timer is already running for \".concat(name));\n }\n\n this.started[name] = Date.now();\n }\n }, {\n key: \"timeEnd\",\n value: function timeEnd(name) {\n if (!(name in this.started)) {\n (0, _util.warn)(\"Timer has not been started for \".concat(name));\n }\n\n this.times.push({\n name: name,\n start: this.started[name],\n end: Date.now()\n });\n delete this.started[name];\n }\n }, {\n key: \"toString\",\n value: function toString() {\n var outBuf = [];\n var longest = 0;\n\n var _iterator = _createForOfIteratorHelper(this.times),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var time = _step.value;\n var name = time.name;\n\n if (name.length > longest) {\n longest = name.length;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n var _iterator2 = _createForOfIteratorHelper(this.times),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _time = _step2.value;\n var duration = _time.end - _time.start;\n outBuf.push(\"\".concat(_time.name.padEnd(longest), \" \").concat(duration, \"ms\\n\"));\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return outBuf.join(\"\");\n }\n }]);\n\n return StatTimer;\n}();\n\nexports.StatTimer = StatTimer;\n\nfunction isValidFetchUrl(url, baseUrl) {\n try {\n var _ref4 = baseUrl ? new URL(url, baseUrl) : new URL(url),\n protocol = _ref4.protocol;\n\n return protocol === \"http:\" || protocol === \"https:\";\n } catch (ex) {\n return false;\n }\n}\n\nfunction loadScript(src) {\n var removeScriptElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return new Promise(function (resolve, reject) {\n var script = document.createElement(\"script\");\n script.src = src;\n\n script.onload = function (evt) {\n if (removeScriptElement) {\n script.remove();\n }\n\n resolve(evt);\n };\n\n script.onerror = function () {\n reject(new Error(\"Cannot load script at: \".concat(script.src)));\n };\n\n (document.head || document.documentElement).appendChild(script);\n });\n}\n\nfunction deprecated(details) {\n console.log(\"Deprecated API usage: \" + details);\n}\n\nvar pdfDateStringRegex;\n\nvar PDFDateString = /*#__PURE__*/function () {\n function PDFDateString() {\n _classCallCheck(this, PDFDateString);\n }\n\n _createClass(PDFDateString, null, [{\n key: \"toDateObject\",\n value: function toDateObject(input) {\n if (!input || typeof input !== \"string\") {\n return null;\n }\n\n if (!pdfDateStringRegex) {\n pdfDateStringRegex = new RegExp(\"^D:\" + \"(\\\\d{4})\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"([Z|+|-])?\" + \"(\\\\d{2})?\" + \"'?\" + \"(\\\\d{2})?\" + \"'?\");\n }\n\n var matches = pdfDateStringRegex.exec(input);\n\n if (!matches) {\n return null;\n }\n\n var year = parseInt(matches[1], 10);\n var month = parseInt(matches[2], 10);\n month = month >= 1 && month <= 12 ? month - 1 : 0;\n var day = parseInt(matches[3], 10);\n day = day >= 1 && day <= 31 ? day : 1;\n var hour = parseInt(matches[4], 10);\n hour = hour >= 0 && hour <= 23 ? hour : 0;\n var minute = parseInt(matches[5], 10);\n minute = minute >= 0 && minute <= 59 ? minute : 0;\n var second = parseInt(matches[6], 10);\n second = second >= 0 && second <= 59 ? second : 0;\n var universalTimeRelation = matches[7] || \"Z\";\n var offsetHour = parseInt(matches[8], 10);\n offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0;\n var offsetMinute = parseInt(matches[9], 10) || 0;\n offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0;\n\n if (universalTimeRelation === \"-\") {\n hour += offsetHour;\n minute += offsetMinute;\n } else if (universalTimeRelation === \"+\") {\n hour -= offsetHour;\n minute -= offsetMinute;\n }\n\n return new Date(Date.UTC(year, month, day, hour, minute, second));\n }\n }]);\n\n return PDFDateString;\n}();\n\nexports.PDFDateString = PDFDateString;\n\nfunction getXfaPageViewport(xfaPage, _ref5) {\n var _ref5$scale = _ref5.scale,\n scale = _ref5$scale === void 0 ? 1 : _ref5$scale,\n _ref5$rotation = _ref5.rotation,\n rotation = _ref5$rotation === void 0 ? 0 : _ref5$rotation;\n var _xfaPage$attributes$s = xfaPage.attributes.style,\n width = _xfaPage$attributes$s.width,\n height = _xfaPage$attributes$s.height;\n var viewBox = [0, 0, parseInt(width), parseInt(height)];\n return new PageViewport({\n viewBox: viewBox,\n scale: scale,\n rotation: rotation\n });\n}\n\n/***/ }),\n/* 159 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.BaseStandardFontDataFactory = exports.BaseSVGFactory = exports.BaseCanvasFactory = exports.BaseCMapReaderFactory = void 0;\n\nvar _regenerator = _interopRequireDefault(__w_pdfjs_require__(156));\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar BaseCanvasFactory = /*#__PURE__*/function () {\n function BaseCanvasFactory() {\n _classCallCheck(this, BaseCanvasFactory);\n\n if (this.constructor === BaseCanvasFactory) {\n (0, _util.unreachable)(\"Cannot initialize BaseCanvasFactory.\");\n }\n }\n\n _createClass(BaseCanvasFactory, [{\n key: \"create\",\n value: function create(width, height) {\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid canvas size\");\n }\n\n var canvas = this._createCanvas(width, height);\n\n return {\n canvas: canvas,\n context: canvas.getContext(\"2d\")\n };\n }\n }, {\n key: \"reset\",\n value: function reset(canvasAndContext, width, height) {\n if (!canvasAndContext.canvas) {\n throw new Error(\"Canvas is not specified\");\n }\n\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid canvas size\");\n }\n\n canvasAndContext.canvas.width = width;\n canvasAndContext.canvas.height = height;\n }\n }, {\n key: \"destroy\",\n value: function destroy(canvasAndContext) {\n if (!canvasAndContext.canvas) {\n throw new Error(\"Canvas is not specified\");\n }\n\n canvasAndContext.canvas.width = 0;\n canvasAndContext.canvas.height = 0;\n canvasAndContext.canvas = null;\n canvasAndContext.context = null;\n }\n }, {\n key: \"_createCanvas\",\n value: function _createCanvas(width, height) {\n (0, _util.unreachable)(\"Abstract method `_createCanvas` called.\");\n }\n }]);\n\n return BaseCanvasFactory;\n}();\n\nexports.BaseCanvasFactory = BaseCanvasFactory;\n\nvar BaseCMapReaderFactory = /*#__PURE__*/function () {\n function BaseCMapReaderFactory(_ref) {\n var _ref$baseUrl = _ref.baseUrl,\n baseUrl = _ref$baseUrl === void 0 ? null : _ref$baseUrl,\n _ref$isCompressed = _ref.isCompressed,\n isCompressed = _ref$isCompressed === void 0 ? false : _ref$isCompressed;\n\n _classCallCheck(this, BaseCMapReaderFactory);\n\n if (this.constructor === BaseCMapReaderFactory) {\n (0, _util.unreachable)(\"Cannot initialize BaseCMapReaderFactory.\");\n }\n\n this.baseUrl = baseUrl;\n this.isCompressed = isCompressed;\n }\n\n _createClass(BaseCMapReaderFactory, [{\n key: \"fetch\",\n value: function () {\n var _fetch = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee(_ref2) {\n var _this = this;\n\n var name, url, compressionType;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n name = _ref2.name;\n\n if (this.baseUrl) {\n _context.next = 3;\n break;\n }\n\n throw new Error('The CMap \"baseUrl\" parameter must be specified, ensure that ' + 'the \"cMapUrl\" and \"cMapPacked\" API parameters are provided.');\n\n case 3:\n if (name) {\n _context.next = 5;\n break;\n }\n\n throw new Error(\"CMap name must be specified.\");\n\n case 5:\n url = this.baseUrl + name + (this.isCompressed ? \".bcmap\" : \"\");\n compressionType = this.isCompressed ? _util.CMapCompressionType.BINARY : _util.CMapCompressionType.NONE;\n return _context.abrupt(\"return\", this._fetchData(url, compressionType)[\"catch\"](function (reason) {\n throw new Error(\"Unable to load \".concat(_this.isCompressed ? \"binary \" : \"\", \"CMap at: \").concat(url));\n }));\n\n case 8:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function fetch(_x) {\n return _fetch.apply(this, arguments);\n }\n\n return fetch;\n }()\n }, {\n key: \"_fetchData\",\n value: function _fetchData(url, compressionType) {\n (0, _util.unreachable)(\"Abstract method `_fetchData` called.\");\n }\n }]);\n\n return BaseCMapReaderFactory;\n}();\n\nexports.BaseCMapReaderFactory = BaseCMapReaderFactory;\n\nvar BaseStandardFontDataFactory = /*#__PURE__*/function () {\n function BaseStandardFontDataFactory(_ref3) {\n var _ref3$baseUrl = _ref3.baseUrl,\n baseUrl = _ref3$baseUrl === void 0 ? null : _ref3$baseUrl;\n\n _classCallCheck(this, BaseStandardFontDataFactory);\n\n if (this.constructor === BaseStandardFontDataFactory) {\n (0, _util.unreachable)(\"Cannot initialize BaseStandardFontDataFactory.\");\n }\n\n this.baseUrl = baseUrl;\n }\n\n _createClass(BaseStandardFontDataFactory, [{\n key: \"fetch\",\n value: function () {\n var _fetch2 = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2(_ref4) {\n var filename, url;\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n filename = _ref4.filename;\n\n if (this.baseUrl) {\n _context2.next = 3;\n break;\n }\n\n throw new Error('The standard font \"baseUrl\" parameter must be specified, ensure that ' + 'the \"standardFontDataUrl\" API parameter is provided.');\n\n case 3:\n if (filename) {\n _context2.next = 5;\n break;\n }\n\n throw new Error(\"Font filename must be specified.\");\n\n case 5:\n url = \"\".concat(this.baseUrl).concat(filename);\n return _context2.abrupt(\"return\", this._fetchData(url)[\"catch\"](function (reason) {\n throw new Error(\"Unable to load font data at: \".concat(url));\n }));\n\n case 7:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function fetch(_x2) {\n return _fetch2.apply(this, arguments);\n }\n\n return fetch;\n }()\n }, {\n key: \"_fetchData\",\n value: function _fetchData(url) {\n (0, _util.unreachable)(\"Abstract method `_fetchData` called.\");\n }\n }]);\n\n return BaseStandardFontDataFactory;\n}();\n\nexports.BaseStandardFontDataFactory = BaseStandardFontDataFactory;\n\nvar BaseSVGFactory = /*#__PURE__*/function () {\n function BaseSVGFactory() {\n _classCallCheck(this, BaseSVGFactory);\n\n if (this.constructor === BaseSVGFactory) {\n (0, _util.unreachable)(\"Cannot initialize BaseSVGFactory.\");\n }\n }\n\n _createClass(BaseSVGFactory, [{\n key: \"create\",\n value: function create(width, height) {\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid SVG dimensions\");\n }\n\n var svg = this._createSVG(\"svg:svg\");\n\n svg.setAttribute(\"version\", \"1.1\");\n svg.setAttribute(\"width\", \"\".concat(width, \"px\"));\n svg.setAttribute(\"height\", \"\".concat(height, \"px\"));\n svg.setAttribute(\"preserveAspectRatio\", \"none\");\n svg.setAttribute(\"viewBox\", \"0 0 \".concat(width, \" \").concat(height));\n return svg;\n }\n }, {\n key: \"createElement\",\n value: function createElement(type) {\n if (typeof type !== \"string\") {\n throw new Error(\"Invalid SVG element type\");\n }\n\n return this._createSVG(type);\n }\n }, {\n key: \"_createSVG\",\n value: function _createSVG(type) {\n (0, _util.unreachable)(\"Abstract method `_createSVG` called.\");\n }\n }]);\n\n return BaseSVGFactory;\n}();\n\nexports.BaseSVGFactory = BaseSVGFactory;\n\n/***/ }),\n/* 160 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.FontLoader = exports.FontFaceObject = void 0;\n\nvar _regenerator = _interopRequireDefault(__w_pdfjs_require__(156));\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar BaseFontLoader = /*#__PURE__*/function () {\n function BaseFontLoader(_ref) {\n var docId = _ref.docId,\n onUnsupportedFeature = _ref.onUnsupportedFeature,\n _ref$ownerDocument = _ref.ownerDocument,\n ownerDocument = _ref$ownerDocument === void 0 ? globalThis.document : _ref$ownerDocument,\n _ref$styleElement = _ref.styleElement,\n styleElement = _ref$styleElement === void 0 ? null : _ref$styleElement;\n\n _classCallCheck(this, BaseFontLoader);\n\n if (this.constructor === BaseFontLoader) {\n (0, _util.unreachable)(\"Cannot initialize BaseFontLoader.\");\n }\n\n this.docId = docId;\n this._onUnsupportedFeature = onUnsupportedFeature;\n this._document = ownerDocument;\n this.nativeFontFaces = [];\n this.styleElement = null;\n }\n\n _createClass(BaseFontLoader, [{\n key: \"addNativeFontFace\",\n value: function addNativeFontFace(nativeFontFace) {\n this.nativeFontFaces.push(nativeFontFace);\n\n this._document.fonts.add(nativeFontFace);\n }\n }, {\n key: \"insertRule\",\n value: function insertRule(rule) {\n var styleElement = this.styleElement;\n\n if (!styleElement) {\n styleElement = this.styleElement = this._document.createElement(\"style\");\n styleElement.id = \"PDFJS_FONT_STYLE_TAG_\".concat(this.docId);\n\n this._document.documentElement.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n\n var styleSheet = styleElement.sheet;\n styleSheet.insertRule(rule, styleSheet.cssRules.length);\n }\n }, {\n key: \"clear\",\n value: function clear() {\n var _iterator = _createForOfIteratorHelper(this.nativeFontFaces),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var nativeFontFace = _step.value;\n\n this._document.fonts[\"delete\"](nativeFontFace);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n this.nativeFontFaces.length = 0;\n\n if (this.styleElement) {\n this.styleElement.remove();\n this.styleElement = null;\n }\n }\n }, {\n key: \"bind\",\n value: function () {\n var _bind = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee(font) {\n var _this = this;\n\n var nativeFontFace, rule;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(font.attached || font.missingFile)) {\n _context.next = 2;\n break;\n }\n\n return _context.abrupt(\"return\");\n\n case 2:\n font.attached = true;\n\n if (!this.isFontLoadingAPISupported) {\n _context.next = 19;\n break;\n }\n\n nativeFontFace = font.createNativeFontFace();\n\n if (!nativeFontFace) {\n _context.next = 18;\n break;\n }\n\n this.addNativeFontFace(nativeFontFace);\n _context.prev = 7;\n _context.next = 10;\n return nativeFontFace.loaded;\n\n case 10:\n _context.next = 18;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context[\"catch\"](7);\n\n this._onUnsupportedFeature({\n featureId: _util.UNSUPPORTED_FEATURES.errorFontLoadNative\n });\n\n (0, _util.warn)(\"Failed to load font '\".concat(nativeFontFace.family, \"': '\").concat(_context.t0, \"'.\"));\n font.disableFontFace = true;\n throw _context.t0;\n\n case 18:\n return _context.abrupt(\"return\");\n\n case 19:\n rule = font.createFontFaceRule();\n\n if (!rule) {\n _context.next = 26;\n break;\n }\n\n this.insertRule(rule);\n\n if (!this.isSyncFontLoadingSupported) {\n _context.next = 24;\n break;\n }\n\n return _context.abrupt(\"return\");\n\n case 24:\n _context.next = 26;\n return new Promise(function (resolve) {\n var request = _this._queueLoadingCallback(resolve);\n\n _this._prepareFontLoadEvent([rule], [font], request);\n });\n\n case 26:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this, [[7, 12]]);\n }));\n\n function bind(_x) {\n return _bind.apply(this, arguments);\n }\n\n return bind;\n }()\n }, {\n key: \"_queueLoadingCallback\",\n value: function _queueLoadingCallback(callback) {\n (0, _util.unreachable)(\"Abstract method `_queueLoadingCallback`.\");\n }\n }, {\n key: \"isFontLoadingAPISupported\",\n get: function get() {\n var _this$_document;\n\n var hasFonts = !!((_this$_document = this._document) !== null && _this$_document !== void 0 && _this$_document.fonts);\n return (0, _util.shadow)(this, \"isFontLoadingAPISupported\", hasFonts);\n }\n }, {\n key: \"isSyncFontLoadingSupported\",\n get: function get() {\n (0, _util.unreachable)(\"Abstract method `isSyncFontLoadingSupported`.\");\n }\n }, {\n key: \"_loadTestFont\",\n get: function get() {\n (0, _util.unreachable)(\"Abstract method `_loadTestFont`.\");\n }\n }, {\n key: \"_prepareFontLoadEvent\",\n value: function _prepareFontLoadEvent(rules, fontsToLoad, request) {\n (0, _util.unreachable)(\"Abstract method `_prepareFontLoadEvent`.\");\n }\n }]);\n\n return BaseFontLoader;\n}();\n\nvar FontLoader;\nexports.FontLoader = FontLoader;\n{\n exports.FontLoader = FontLoader = /*#__PURE__*/function (_BaseFontLoader) {\n _inherits(GenericFontLoader, _BaseFontLoader);\n\n var _super = _createSuper(GenericFontLoader);\n\n function GenericFontLoader(params) {\n var _this2;\n\n _classCallCheck(this, GenericFontLoader);\n\n _this2 = _super.call(this, params);\n _this2.loadingContext = {\n requests: [],\n nextRequestId: 0\n };\n _this2.loadTestFontId = 0;\n return _this2;\n }\n\n _createClass(GenericFontLoader, [{\n key: \"isSyncFontLoadingSupported\",\n get: function get() {\n var supported = false;\n\n if (typeof navigator === \"undefined\") {\n supported = true;\n } else {\n var m = /Mozilla\\/5.0.*?rv:(\\d+).*? Gecko/.exec(navigator.userAgent);\n\n if ((m === null || m === void 0 ? void 0 : m[1]) >= 14) {\n supported = true;\n }\n }\n\n return (0, _util.shadow)(this, \"isSyncFontLoadingSupported\", supported);\n }\n }, {\n key: \"_queueLoadingCallback\",\n value: function _queueLoadingCallback(callback) {\n function completeRequest() {\n (0, _util.assert)(!request.done, \"completeRequest() cannot be called twice.\");\n request.done = true;\n\n while (context.requests.length > 0 && context.requests[0].done) {\n var otherRequest = context.requests.shift();\n setTimeout(otherRequest.callback, 0);\n }\n }\n\n var context = this.loadingContext;\n var request = {\n id: \"pdfjs-font-loading-\".concat(context.nextRequestId++),\n done: false,\n complete: completeRequest,\n callback: callback\n };\n context.requests.push(request);\n return request;\n }\n }, {\n key: \"_loadTestFont\",\n get: function get() {\n var getLoadTestFont = function getLoadTestFont() {\n return atob(\"T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQA\" + \"FQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAA\" + \"ALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgA\" + \"AAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1\" + \"AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD\" + \"6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACM\" + \"AooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4D\" + \"IP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAA\" + \"AAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUA\" + \"AQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgAB\" + \"AAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABY\" + \"AAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAA\" + \"AC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + \"AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAA\" + \"AAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQAC\" + \"AQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3\" + \"Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTj\" + \"FQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==\");\n };\n\n return (0, _util.shadow)(this, \"_loadTestFont\", getLoadTestFont());\n }\n }, {\n key: \"_prepareFontLoadEvent\",\n value: function _prepareFontLoadEvent(rules, fonts, request) {\n function int32(data, offset) {\n return data.charCodeAt(offset) << 24 | data.charCodeAt(offset + 1) << 16 | data.charCodeAt(offset + 2) << 8 | data.charCodeAt(offset + 3) & 0xff;\n }\n\n function spliceString(s, offset, remove, insert) {\n var chunk1 = s.substring(0, offset);\n var chunk2 = s.substring(offset + remove);\n return chunk1 + insert + chunk2;\n }\n\n var i, ii;\n\n var canvas = this._document.createElement(\"canvas\");\n\n canvas.width = 1;\n canvas.height = 1;\n var ctx = canvas.getContext(\"2d\");\n var called = 0;\n\n function isFontReady(name, callback) {\n called++;\n\n if (called > 30) {\n (0, _util.warn)(\"Load test font never loaded.\");\n callback();\n return;\n }\n\n ctx.font = \"30px \" + name;\n ctx.fillText(\".\", 0, 20);\n var imageData = ctx.getImageData(0, 0, 1, 1);\n\n if (imageData.data[3] > 0) {\n callback();\n return;\n }\n\n setTimeout(isFontReady.bind(null, name, callback));\n }\n\n var loadTestFontId = \"lt\".concat(Date.now()).concat(this.loadTestFontId++);\n var data = this._loadTestFont;\n var COMMENT_OFFSET = 976;\n data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length, loadTestFontId);\n var CFF_CHECKSUM_OFFSET = 16;\n var XXXX_VALUE = 0x58585858;\n var checksum = int32(data, CFF_CHECKSUM_OFFSET);\n\n for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {\n checksum = checksum - XXXX_VALUE + int32(loadTestFontId, i) | 0;\n }\n\n if (i < loadTestFontId.length) {\n checksum = checksum - XXXX_VALUE + int32(loadTestFontId + \"XXX\", i) | 0;\n }\n\n data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, (0, _util.string32)(checksum));\n var url = \"url(data:font/opentype;base64,\".concat(btoa(data), \");\");\n var rule = \"@font-face {font-family:\\\"\".concat(loadTestFontId, \"\\\";src:\").concat(url, \"}\");\n this.insertRule(rule);\n var names = [];\n\n var _iterator2 = _createForOfIteratorHelper(fonts),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var font = _step2.value;\n names.push(font.loadedName);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n names.push(loadTestFontId);\n\n var div = this._document.createElement(\"div\");\n\n div.style.visibility = \"hidden\";\n div.style.width = div.style.height = \"10px\";\n div.style.position = \"absolute\";\n div.style.top = div.style.left = \"0px\";\n\n for (var _i = 0, _names = names; _i < _names.length; _i++) {\n var name = _names[_i];\n\n var span = this._document.createElement(\"span\");\n\n span.textContent = \"Hi\";\n span.style.fontFamily = name;\n div.appendChild(span);\n }\n\n this._document.body.appendChild(div);\n\n isFontReady(loadTestFontId, function () {\n div.remove();\n request.complete();\n });\n }\n }]);\n\n return GenericFontLoader;\n }(BaseFontLoader);\n}\n\nvar FontFaceObject = /*#__PURE__*/function () {\n function FontFaceObject(translatedData, _ref2) {\n var _ref2$isEvalSupported = _ref2.isEvalSupported,\n isEvalSupported = _ref2$isEvalSupported === void 0 ? true : _ref2$isEvalSupported,\n _ref2$disableFontFace = _ref2.disableFontFace,\n disableFontFace = _ref2$disableFontFace === void 0 ? false : _ref2$disableFontFace,\n _ref2$ignoreErrors = _ref2.ignoreErrors,\n ignoreErrors = _ref2$ignoreErrors === void 0 ? false : _ref2$ignoreErrors,\n onUnsupportedFeature = _ref2.onUnsupportedFeature,\n _ref2$fontRegistry = _ref2.fontRegistry,\n fontRegistry = _ref2$fontRegistry === void 0 ? null : _ref2$fontRegistry;\n\n _classCallCheck(this, FontFaceObject);\n\n this.compiledGlyphs = Object.create(null);\n\n for (var i in translatedData) {\n this[i] = translatedData[i];\n }\n\n this.isEvalSupported = isEvalSupported !== false;\n this.disableFontFace = disableFontFace === true;\n this.ignoreErrors = ignoreErrors === true;\n this._onUnsupportedFeature = onUnsupportedFeature;\n this.fontRegistry = fontRegistry;\n }\n\n _createClass(FontFaceObject, [{\n key: \"createNativeFontFace\",\n value: function createNativeFontFace() {\n if (!this.data || this.disableFontFace) {\n return null;\n }\n\n var nativeFontFace;\n\n if (!this.cssFontInfo) {\n nativeFontFace = new FontFace(this.loadedName, this.data, {});\n } else {\n var css = {\n weight: this.cssFontInfo.fontWeight\n };\n\n if (this.cssFontInfo.italicAngle) {\n css.style = \"oblique \".concat(this.cssFontInfo.italicAngle, \"deg\");\n }\n\n nativeFontFace = new FontFace(this.cssFontInfo.fontFamily, this.data, css);\n }\n\n if (this.fontRegistry) {\n this.fontRegistry.registerFont(this);\n }\n\n return nativeFontFace;\n }\n }, {\n key: \"createFontFaceRule\",\n value: function createFontFaceRule() {\n if (!this.data || this.disableFontFace) {\n return null;\n }\n\n var data = (0, _util.bytesToString)(this.data);\n var url = \"url(data:\".concat(this.mimetype, \";base64,\").concat(btoa(data), \");\");\n var rule;\n\n if (!this.cssFontInfo) {\n rule = \"@font-face {font-family:\\\"\".concat(this.loadedName, \"\\\";src:\").concat(url, \"}\");\n } else {\n var css = \"font-weight: \".concat(this.cssFontInfo.fontWeight, \";\");\n\n if (this.cssFontInfo.italicAngle) {\n css += \"font-style: oblique \".concat(this.cssFontInfo.italicAngle, \"deg;\");\n }\n\n rule = \"@font-face {font-family:\\\"\".concat(this.cssFontInfo.fontFamily, \"\\\";\").concat(css, \"src:\").concat(url, \"}\");\n }\n\n if (this.fontRegistry) {\n this.fontRegistry.registerFont(this, url);\n }\n\n return rule;\n }\n }, {\n key: \"getPathGenerator\",\n value: function getPathGenerator(objs, character) {\n if (this.compiledGlyphs[character] !== undefined) {\n return this.compiledGlyphs[character];\n }\n\n var cmds;\n\n try {\n cmds = objs.get(this.loadedName + \"_path_\" + character);\n } catch (ex) {\n if (!this.ignoreErrors) {\n throw ex;\n }\n\n this._onUnsupportedFeature({\n featureId: _util.UNSUPPORTED_FEATURES.errorFontGetPath\n });\n\n (0, _util.warn)(\"getPathGenerator - ignoring character: \\\"\".concat(ex, \"\\\".\"));\n return this.compiledGlyphs[character] = function (c, size) {};\n }\n\n if (this.isEvalSupported && _util.FeatureTest.isEvalSupported) {\n var jsBuf = [];\n\n var _iterator3 = _createForOfIteratorHelper(cmds),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var current = _step3.value;\n var args = current.args !== undefined ? current.args.join(\",\") : \"\";\n jsBuf.push(\"c.\", current.cmd, \"(\", args, \");\\n\");\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n return this.compiledGlyphs[character] = new Function(\"c\", \"size\", jsBuf.join(\"\"));\n }\n\n return this.compiledGlyphs[character] = function (c, size) {\n var _iterator4 = _createForOfIteratorHelper(cmds),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var _current = _step4.value;\n\n if (_current.cmd === \"scale\") {\n _current.args = [size, -size];\n }\n\n c[_current.cmd].apply(c, _current.args);\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n };\n }\n }]);\n\n return FontFaceObject;\n}();\n\nexports.FontFaceObject = FontFaceObject;\n\n/***/ }),\n/* 161 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.AnnotationStorage = void 0;\n\nvar _murmurhash = __w_pdfjs_require__(162);\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar AnnotationStorage = /*#__PURE__*/function () {\n function AnnotationStorage() {\n _classCallCheck(this, AnnotationStorage);\n\n this._storage = new Map();\n this._modified = false;\n this.onSetModified = null;\n this.onResetModified = null;\n }\n\n _createClass(AnnotationStorage, [{\n key: \"getValue\",\n value: function getValue(key, defaultValue) {\n var value = this._storage.get(key);\n\n if (value === undefined) {\n return defaultValue;\n }\n\n return Object.assign(defaultValue, value);\n }\n }, {\n key: \"getRawValue\",\n value: function getRawValue(key) {\n return this._storage.get(key);\n }\n }, {\n key: \"setValue\",\n value: function setValue(key, value) {\n var obj = this._storage.get(key);\n\n var modified = false;\n\n if (obj !== undefined) {\n for (var _i = 0, _Object$entries = Object.entries(value); _i < _Object$entries.length; _i++) {\n var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),\n entry = _Object$entries$_i[0],\n val = _Object$entries$_i[1];\n\n if (obj[entry] !== val) {\n modified = true;\n obj[entry] = val;\n }\n }\n } else {\n modified = true;\n\n this._storage.set(key, value);\n }\n\n if (modified) {\n this._setModified();\n }\n }\n }, {\n key: \"getAll\",\n value: function getAll() {\n return this._storage.size > 0 ? (0, _util.objectFromMap)(this._storage) : null;\n }\n }, {\n key: \"size\",\n get: function get() {\n return this._storage.size;\n }\n }, {\n key: \"_setModified\",\n value: function _setModified() {\n if (!this._modified) {\n this._modified = true;\n\n if (typeof this.onSetModified === \"function\") {\n this.onSetModified();\n }\n }\n }\n }, {\n key: \"resetModified\",\n value: function resetModified() {\n if (this._modified) {\n this._modified = false;\n\n if (typeof this.onResetModified === \"function\") {\n this.onResetModified();\n }\n }\n }\n }, {\n key: \"serializable\",\n get: function get() {\n return this._storage.size > 0 ? this._storage : null;\n }\n }, {\n key: \"hash\",\n get: function get() {\n var hash = new _murmurhash.MurmurHash3_64();\n\n var _iterator = _createForOfIteratorHelper(this._storage),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n key = _step$value[0],\n value = _step$value[1];\n\n hash.update(\"\".concat(key, \":\").concat(JSON.stringify(value)));\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return hash.hexdigest();\n }\n }]);\n\n return AnnotationStorage;\n}();\n\nexports.AnnotationStorage = AnnotationStorage;\n\n/***/ }),\n/* 162 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.MurmurHash3_64 = void 0;\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar SEED = 0xc3d2e1f0;\nvar MASK_HIGH = 0xffff0000;\nvar MASK_LOW = 0xffff;\n\nvar MurmurHash3_64 = /*#__PURE__*/function () {\n function MurmurHash3_64(seed) {\n _classCallCheck(this, MurmurHash3_64);\n\n this.h1 = seed ? seed & 0xffffffff : SEED;\n this.h2 = seed ? seed & 0xffffffff : SEED;\n }\n\n _createClass(MurmurHash3_64, [{\n key: \"update\",\n value: function update(input) {\n var data, length;\n\n if (typeof input === \"string\") {\n data = new Uint8Array(input.length * 2);\n length = 0;\n\n for (var i = 0, ii = input.length; i < ii; i++) {\n var code = input.charCodeAt(i);\n\n if (code <= 0xff) {\n data[length++] = code;\n } else {\n data[length++] = code >>> 8;\n data[length++] = code & 0xff;\n }\n }\n } else if ((0, _util.isArrayBuffer)(input)) {\n data = input.slice();\n length = data.byteLength;\n } else {\n throw new Error(\"Wrong data format in MurmurHash3_64_update. \" + \"Input must be a string or array.\");\n }\n\n var blockCounts = length >> 2;\n var tailLength = length - blockCounts * 4;\n var dataUint32 = new Uint32Array(data.buffer, 0, blockCounts);\n var k1 = 0,\n k2 = 0;\n var h1 = this.h1,\n h2 = this.h2;\n var C1 = 0xcc9e2d51,\n C2 = 0x1b873593;\n var C1_LOW = C1 & MASK_LOW,\n C2_LOW = C2 & MASK_LOW;\n\n for (var _i = 0; _i < blockCounts; _i++) {\n if (_i & 1) {\n k1 = dataUint32[_i];\n k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;\n k1 = k1 << 15 | k1 >>> 17;\n k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;\n h1 ^= k1;\n h1 = h1 << 13 | h1 >>> 19;\n h1 = h1 * 5 + 0xe6546b64;\n } else {\n k2 = dataUint32[_i];\n k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW;\n k2 = k2 << 15 | k2 >>> 17;\n k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW;\n h2 ^= k2;\n h2 = h2 << 13 | h2 >>> 19;\n h2 = h2 * 5 + 0xe6546b64;\n }\n }\n\n k1 = 0;\n\n switch (tailLength) {\n case 3:\n k1 ^= data[blockCounts * 4 + 2] << 16;\n\n case 2:\n k1 ^= data[blockCounts * 4 + 1] << 8;\n\n case 1:\n k1 ^= data[blockCounts * 4];\n k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;\n k1 = k1 << 15 | k1 >>> 17;\n k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;\n\n if (blockCounts & 1) {\n h1 ^= k1;\n } else {\n h2 ^= k1;\n }\n\n }\n\n this.h1 = h1;\n this.h2 = h2;\n }\n }, {\n key: \"hexdigest\",\n value: function hexdigest() {\n var h1 = this.h1,\n h2 = this.h2;\n h1 ^= h2 >>> 1;\n h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW;\n h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16;\n h1 ^= h2 >>> 1;\n h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW;\n h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16;\n h1 ^= h2 >>> 1;\n var hex1 = (h1 >>> 0).toString(16),\n hex2 = (h2 >>> 0).toString(16);\n return hex1.padStart(8, \"0\") + hex2.padStart(8, \"0\");\n }\n }]);\n\n return MurmurHash3_64;\n}();\n\nexports.MurmurHash3_64 = MurmurHash3_64;\n\n/***/ }),\n/* 163 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.CanvasGraphics = void 0;\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _pattern_helper = __w_pdfjs_require__(164);\n\nvar _image_utils = __w_pdfjs_require__(165);\n\nvar _is_node = __w_pdfjs_require__(3);\n\nvar _display_utils = __w_pdfjs_require__(158);\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar MIN_FONT_SIZE = 16;\nvar MAX_FONT_SIZE = 100;\nvar MAX_GROUP_SIZE = 4096;\nvar EXECUTION_TIME = 15;\nvar EXECUTION_STEPS = 10;\nvar COMPILE_TYPE3_GLYPHS = true;\nvar MAX_SIZE_TO_COMPILE = 1000;\nvar FULL_CHUNK_HEIGHT = 16;\nvar LINEWIDTH_SCALE_FACTOR = 1.000001;\n\nfunction mirrorContextOperations(ctx, destCtx) {\n if (ctx._removeMirroring) {\n throw new Error(\"Context is already forwarding operations.\");\n }\n\n ctx.__originalSave = ctx.save;\n ctx.__originalRestore = ctx.restore;\n ctx.__originalRotate = ctx.rotate;\n ctx.__originalScale = ctx.scale;\n ctx.__originalTranslate = ctx.translate;\n ctx.__originalTransform = ctx.transform;\n ctx.__originalSetTransform = ctx.setTransform;\n ctx.__originalResetTransform = ctx.resetTransform;\n ctx.__originalClip = ctx.clip;\n ctx.__originalMoveTo = ctx.moveTo;\n ctx.__originalLineTo = ctx.lineTo;\n ctx.__originalBezierCurveTo = ctx.bezierCurveTo;\n ctx.__originalRect = ctx.rect;\n ctx.__originalClosePath = ctx.closePath;\n ctx.__originalBeginPath = ctx.beginPath;\n\n ctx._removeMirroring = function () {\n ctx.save = ctx.__originalSave;\n ctx.restore = ctx.__originalRestore;\n ctx.rotate = ctx.__originalRotate;\n ctx.scale = ctx.__originalScale;\n ctx.translate = ctx.__originalTranslate;\n ctx.transform = ctx.__originalTransform;\n ctx.setTransform = ctx.__originalSetTransform;\n ctx.resetTransform = ctx.__originalResetTransform;\n ctx.clip = ctx.__originalClip;\n ctx.moveTo = ctx.__originalMoveTo;\n ctx.lineTo = ctx.__originalLineTo;\n ctx.bezierCurveTo = ctx.__originalBezierCurveTo;\n ctx.rect = ctx.__originalRect;\n ctx.closePath = ctx.__originalClosePath;\n ctx.beginPath = ctx.__originalBeginPath;\n delete ctx._removeMirroring;\n };\n\n ctx.save = function ctxSave() {\n destCtx.save();\n\n this.__originalSave();\n };\n\n ctx.restore = function ctxRestore() {\n destCtx.restore();\n\n this.__originalRestore();\n };\n\n ctx.translate = function ctxTranslate(x, y) {\n destCtx.translate(x, y);\n\n this.__originalTranslate(x, y);\n };\n\n ctx.scale = function ctxScale(x, y) {\n destCtx.scale(x, y);\n\n this.__originalScale(x, y);\n };\n\n ctx.transform = function ctxTransform(a, b, c, d, e, f) {\n destCtx.transform(a, b, c, d, e, f);\n\n this.__originalTransform(a, b, c, d, e, f);\n };\n\n ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {\n destCtx.setTransform(a, b, c, d, e, f);\n\n this.__originalSetTransform(a, b, c, d, e, f);\n };\n\n ctx.resetTransform = function ctxResetTransform() {\n destCtx.resetTransform();\n\n this.__originalResetTransform();\n };\n\n ctx.rotate = function ctxRotate(angle) {\n destCtx.rotate(angle);\n\n this.__originalRotate(angle);\n };\n\n ctx.clip = function ctxRotate(rule) {\n destCtx.clip(rule);\n\n this.__originalClip(rule);\n };\n\n ctx.moveTo = function (x, y) {\n destCtx.moveTo(x, y);\n\n this.__originalMoveTo(x, y);\n };\n\n ctx.lineTo = function (x, y) {\n destCtx.lineTo(x, y);\n\n this.__originalLineTo(x, y);\n };\n\n ctx.bezierCurveTo = function (cp1x, cp1y, cp2x, cp2y, x, y) {\n destCtx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n\n this.__originalBezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n };\n\n ctx.rect = function (x, y, width, height) {\n destCtx.rect(x, y, width, height);\n\n this.__originalRect(x, y, width, height);\n };\n\n ctx.closePath = function () {\n destCtx.closePath();\n\n this.__originalClosePath();\n };\n\n ctx.beginPath = function () {\n destCtx.beginPath();\n\n this.__originalBeginPath();\n };\n}\n\nfunction addContextCurrentTransform(ctx) {\n if (ctx._transformStack) {\n ctx._transformStack = [];\n }\n\n if (ctx.mozCurrentTransform) {\n return;\n }\n\n ctx._originalSave = ctx.save;\n ctx._originalRestore = ctx.restore;\n ctx._originalRotate = ctx.rotate;\n ctx._originalScale = ctx.scale;\n ctx._originalTranslate = ctx.translate;\n ctx._originalTransform = ctx.transform;\n ctx._originalSetTransform = ctx.setTransform;\n ctx._originalResetTransform = ctx.resetTransform;\n ctx._transformMatrix = ctx._transformMatrix || [1, 0, 0, 1, 0, 0];\n ctx._transformStack = [];\n\n try {\n var desc = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(ctx), \"lineWidth\");\n ctx._setLineWidth = desc.set;\n ctx._getLineWidth = desc.get;\n Object.defineProperty(ctx, \"lineWidth\", {\n set: function setLineWidth(width) {\n this._setLineWidth(width * LINEWIDTH_SCALE_FACTOR);\n },\n get: function getLineWidth() {\n return this._getLineWidth();\n }\n });\n } catch (_) {}\n\n Object.defineProperty(ctx, \"mozCurrentTransform\", {\n get: function getCurrentTransform() {\n return this._transformMatrix;\n }\n });\n Object.defineProperty(ctx, \"mozCurrentTransformInverse\", {\n get: function getCurrentTransformInverse() {\n var _this$_transformMatri = _slicedToArray(this._transformMatrix, 6),\n a = _this$_transformMatri[0],\n b = _this$_transformMatri[1],\n c = _this$_transformMatri[2],\n d = _this$_transformMatri[3],\n e = _this$_transformMatri[4],\n f = _this$_transformMatri[5];\n\n var ad_bc = a * d - b * c;\n var bc_ad = b * c - a * d;\n return [d / ad_bc, b / bc_ad, c / bc_ad, a / ad_bc, (d * e - c * f) / bc_ad, (b * e - a * f) / ad_bc];\n }\n });\n\n ctx.save = function ctxSave() {\n var old = this._transformMatrix;\n\n this._transformStack.push(old);\n\n this._transformMatrix = old.slice(0, 6);\n\n this._originalSave();\n };\n\n ctx.restore = function ctxRestore() {\n if (this._transformStack.length === 0) {\n (0, _util.warn)(\"Tried to restore a ctx when the stack was already empty.\");\n }\n\n var prev = this._transformStack.pop();\n\n if (prev) {\n this._transformMatrix = prev;\n\n this._originalRestore();\n }\n };\n\n ctx.translate = function ctxTranslate(x, y) {\n var m = this._transformMatrix;\n m[4] = m[0] * x + m[2] * y + m[4];\n m[5] = m[1] * x + m[3] * y + m[5];\n\n this._originalTranslate(x, y);\n };\n\n ctx.scale = function ctxScale(x, y) {\n var m = this._transformMatrix;\n m[0] *= x;\n m[1] *= x;\n m[2] *= y;\n m[3] *= y;\n\n this._originalScale(x, y);\n };\n\n ctx.transform = function ctxTransform(a, b, c, d, e, f) {\n var m = this._transformMatrix;\n this._transformMatrix = [m[0] * a + m[2] * b, m[1] * a + m[3] * b, m[0] * c + m[2] * d, m[1] * c + m[3] * d, m[0] * e + m[2] * f + m[4], m[1] * e + m[3] * f + m[5]];\n\n ctx._originalTransform(a, b, c, d, e, f);\n };\n\n ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {\n this._transformMatrix = [a, b, c, d, e, f];\n\n ctx._originalSetTransform(a, b, c, d, e, f);\n };\n\n ctx.resetTransform = function ctxResetTransform() {\n this._transformMatrix = [1, 0, 0, 1, 0, 0];\n\n ctx._originalResetTransform();\n };\n\n ctx.rotate = function ctxRotate(angle) {\n var cosValue = Math.cos(angle);\n var sinValue = Math.sin(angle);\n var m = this._transformMatrix;\n this._transformMatrix = [m[0] * cosValue + m[2] * sinValue, m[1] * cosValue + m[3] * sinValue, m[0] * -sinValue + m[2] * cosValue, m[1] * -sinValue + m[3] * cosValue, m[4], m[5]];\n\n this._originalRotate(angle);\n };\n}\n\nvar CachedCanvases = /*#__PURE__*/function () {\n function CachedCanvases(canvasFactory) {\n _classCallCheck(this, CachedCanvases);\n\n this.canvasFactory = canvasFactory;\n this.cache = Object.create(null);\n }\n\n _createClass(CachedCanvases, [{\n key: \"getCanvas\",\n value: function getCanvas(id, width, height, trackTransform) {\n var canvasEntry;\n\n if (this.cache[id] !== undefined) {\n canvasEntry = this.cache[id];\n this.canvasFactory.reset(canvasEntry, width, height);\n canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0);\n } else {\n canvasEntry = this.canvasFactory.create(width, height);\n this.cache[id] = canvasEntry;\n }\n\n if (trackTransform) {\n addContextCurrentTransform(canvasEntry.context);\n }\n\n return canvasEntry;\n }\n }, {\n key: \"delete\",\n value: function _delete(id) {\n delete this.cache[id];\n }\n }, {\n key: \"clear\",\n value: function clear() {\n for (var id in this.cache) {\n var canvasEntry = this.cache[id];\n this.canvasFactory.destroy(canvasEntry);\n delete this.cache[id];\n }\n }\n }]);\n\n return CachedCanvases;\n}();\n\nfunction drawImageAtIntegerCoords(ctx, srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH) {\n var _ctx$mozCurrentTransf = _slicedToArray(ctx.mozCurrentTransform, 6),\n a = _ctx$mozCurrentTransf[0],\n b = _ctx$mozCurrentTransf[1],\n c = _ctx$mozCurrentTransf[2],\n d = _ctx$mozCurrentTransf[3],\n tx = _ctx$mozCurrentTransf[4],\n ty = _ctx$mozCurrentTransf[5];\n\n if (b === 0 && c === 0) {\n var tlX = destX * a + tx;\n var rTlX = Math.round(tlX);\n var tlY = destY * d + ty;\n var rTlY = Math.round(tlY);\n var brX = (destX + destW) * a + tx;\n var rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n var brY = (destY + destH) * d + ty;\n var rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n ctx.setTransform(Math.sign(a), 0, 0, Math.sign(d), rTlX, rTlY);\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rWidth, rHeight);\n ctx.setTransform(a, b, c, d, tx, ty);\n return [rWidth, rHeight];\n }\n\n if (a === 0 && d === 0) {\n var _tlX = destY * c + tx;\n\n var _rTlX = Math.round(_tlX);\n\n var _tlY = destX * b + ty;\n\n var _rTlY = Math.round(_tlY);\n\n var _brX = (destY + destH) * c + tx;\n\n var _rWidth = Math.abs(Math.round(_brX) - _rTlX) || 1;\n\n var _brY = (destX + destW) * b + ty;\n\n var _rHeight = Math.abs(Math.round(_brY) - _rTlY) || 1;\n\n ctx.setTransform(0, Math.sign(b), Math.sign(c), 0, _rTlX, _rTlY);\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, _rHeight, _rWidth);\n ctx.setTransform(a, b, c, d, tx, ty);\n return [_rHeight, _rWidth];\n }\n\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH);\n var scaleX = Math.hypot(a, b);\n var scaleY = Math.hypot(c, d);\n return [scaleX * destW, scaleY * destH];\n}\n\nfunction compileType3Glyph(imgData) {\n var width = imgData.width,\n height = imgData.height;\n\n if (!COMPILE_TYPE3_GLYPHS || width > MAX_SIZE_TO_COMPILE || height > MAX_SIZE_TO_COMPILE) {\n return null;\n }\n\n var POINT_TO_PROCESS_LIMIT = 1000;\n var POINT_TYPES = new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);\n var width1 = width + 1;\n var points = new Uint8Array(width1 * (height + 1));\n var i, j, j0;\n var lineSize = width + 7 & ~7;\n var data = new Uint8Array(lineSize * height),\n pos = 0;\n\n var _iterator = _createForOfIteratorHelper(imgData.data),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var elem = _step.value;\n var mask = 128;\n\n while (mask > 0) {\n data[pos++] = elem & mask ? 0 : 255;\n mask >>= 1;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n var count = 0;\n pos = 0;\n\n if (data[pos] !== 0) {\n points[0] = 1;\n ++count;\n }\n\n for (j = 1; j < width; j++) {\n if (data[pos] !== data[pos + 1]) {\n points[j] = data[pos] ? 2 : 1;\n ++count;\n }\n\n pos++;\n }\n\n if (data[pos] !== 0) {\n points[j] = 2;\n ++count;\n }\n\n for (i = 1; i < height; i++) {\n pos = i * lineSize;\n j0 = i * width1;\n\n if (data[pos - lineSize] !== data[pos]) {\n points[j0] = data[pos] ? 1 : 8;\n ++count;\n }\n\n var sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0);\n\n for (j = 1; j < width; j++) {\n sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) + (data[pos - lineSize + 1] ? 8 : 0);\n\n if (POINT_TYPES[sum]) {\n points[j0 + j] = POINT_TYPES[sum];\n ++count;\n }\n\n pos++;\n }\n\n if (data[pos - lineSize] !== data[pos]) {\n points[j0 + j] = data[pos] ? 2 : 4;\n ++count;\n }\n\n if (count > POINT_TO_PROCESS_LIMIT) {\n return null;\n }\n }\n\n pos = lineSize * (height - 1);\n j0 = i * width1;\n\n if (data[pos] !== 0) {\n points[j0] = 8;\n ++count;\n }\n\n for (j = 1; j < width; j++) {\n if (data[pos] !== data[pos + 1]) {\n points[j0 + j] = data[pos] ? 4 : 8;\n ++count;\n }\n\n pos++;\n }\n\n if (data[pos] !== 0) {\n points[j0 + j] = 4;\n ++count;\n }\n\n if (count > POINT_TO_PROCESS_LIMIT) {\n return null;\n }\n\n var steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);\n var path, outlines, coords;\n\n if (!_is_node.isNodeJS) {\n path = new Path2D();\n } else {\n outlines = [];\n }\n\n for (i = 0; count && i <= height; i++) {\n var p = i * width1;\n var end = p + width;\n\n while (p < end && !points[p]) {\n p++;\n }\n\n if (p === end) {\n continue;\n }\n\n if (path) {\n path.moveTo(p % width1, i);\n } else {\n coords = [p % width1, i];\n }\n\n var p0 = p;\n var type = points[p];\n\n do {\n var step = steps[type];\n\n do {\n p += step;\n } while (!points[p]);\n\n var pp = points[p];\n\n if (pp !== 5 && pp !== 10) {\n type = pp;\n points[p] = 0;\n } else {\n type = pp & 0x33 * type >> 4;\n points[p] &= type >> 2 | type << 2;\n }\n\n if (path) {\n path.lineTo(p % width1, p / width1 | 0);\n } else {\n coords.push(p % width1, p / width1 | 0);\n }\n\n if (!points[p]) {\n --count;\n }\n } while (p0 !== p);\n\n if (!path) {\n outlines.push(coords);\n }\n\n --i;\n }\n\n data = null;\n points = null;\n\n var drawOutline = function drawOutline(c) {\n c.save();\n c.scale(1 / width, -1 / height);\n c.translate(0, -height);\n\n if (path) {\n c.fill(path);\n } else {\n c.beginPath();\n\n var _iterator2 = _createForOfIteratorHelper(outlines),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var o = _step2.value;\n c.moveTo(o[0], o[1]);\n\n for (var l = 2, ll = o.length; l < ll; l += 2) {\n c.lineTo(o[l], o[l + 1]);\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n c.fill();\n }\n\n c.beginPath();\n c.restore();\n };\n\n return drawOutline;\n}\n\nvar CanvasExtraState = /*#__PURE__*/function () {\n function CanvasExtraState(width, height) {\n _classCallCheck(this, CanvasExtraState);\n\n this.alphaIsShape = false;\n this.fontSize = 0;\n this.fontSizeScale = 1;\n this.textMatrix = _util.IDENTITY_MATRIX;\n this.textMatrixScale = 1;\n this.fontMatrix = _util.FONT_IDENTITY_MATRIX;\n this.leading = 0;\n this.x = 0;\n this.y = 0;\n this.lineX = 0;\n this.lineY = 0;\n this.charSpacing = 0;\n this.wordSpacing = 0;\n this.textHScale = 1;\n this.textRenderingMode = _util.TextRenderingMode.FILL;\n this.textRise = 0;\n this.fillColor = \"#000000\";\n this.strokeColor = \"#000000\";\n this.patternFill = false;\n this.fillAlpha = 1;\n this.strokeAlpha = 1;\n this.lineWidth = 1;\n this.activeSMask = null;\n this.transferMaps = null;\n this.startNewPathAndClipBox([0, 0, width, height]);\n }\n\n _createClass(CanvasExtraState, [{\n key: \"clone\",\n value: function clone() {\n var clone = Object.create(this);\n clone.clipBox = this.clipBox.slice();\n return clone;\n }\n }, {\n key: \"setCurrentPoint\",\n value: function setCurrentPoint(x, y) {\n this.x = x;\n this.y = y;\n }\n }, {\n key: \"updatePathMinMax\",\n value: function updatePathMinMax(transform, x, y) {\n var _Util$applyTransform = _util.Util.applyTransform([x, y], transform);\n\n var _Util$applyTransform2 = _slicedToArray(_Util$applyTransform, 2);\n\n x = _Util$applyTransform2[0];\n y = _Util$applyTransform2[1];\n this.minX = Math.min(this.minX, x);\n this.minY = Math.min(this.minY, y);\n this.maxX = Math.max(this.maxX, x);\n this.maxY = Math.max(this.maxY, y);\n }\n }, {\n key: \"updateRectMinMax\",\n value: function updateRectMinMax(transform, rect) {\n var p1 = _util.Util.applyTransform(rect, transform);\n\n var p2 = _util.Util.applyTransform(rect.slice(2), transform);\n\n this.minX = Math.min(this.minX, p1[0], p2[0]);\n this.minY = Math.min(this.minY, p1[1], p2[1]);\n this.maxX = Math.max(this.maxX, p1[0], p2[0]);\n this.maxY = Math.max(this.maxY, p1[1], p2[1]);\n }\n }, {\n key: \"updateScalingPathMinMax\",\n value: function updateScalingPathMinMax(transform, minMax) {\n _util.Util.scaleMinMax(transform, minMax);\n\n this.minX = Math.min(this.minX, minMax[0]);\n this.maxX = Math.max(this.maxX, minMax[1]);\n this.minY = Math.min(this.minY, minMax[2]);\n this.maxY = Math.max(this.maxY, minMax[3]);\n }\n }, {\n key: \"updateCurvePathMinMax\",\n value: function updateCurvePathMinMax(transform, x0, y0, x1, y1, x2, y2, x3, y3, minMax) {\n var box = _util.Util.bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3);\n\n if (minMax) {\n minMax[0] = Math.min(minMax[0], box[0], box[2]);\n minMax[1] = Math.max(minMax[1], box[0], box[2]);\n minMax[2] = Math.min(minMax[2], box[1], box[3]);\n minMax[3] = Math.max(minMax[3], box[1], box[3]);\n return;\n }\n\n this.updateRectMinMax(transform, box);\n }\n }, {\n key: \"getPathBoundingBox\",\n value: function getPathBoundingBox() {\n var pathType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pattern_helper.PathType.FILL;\n var transform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var box = [this.minX, this.minY, this.maxX, this.maxY];\n\n if (pathType === _pattern_helper.PathType.STROKE) {\n if (!transform) {\n (0, _util.unreachable)(\"Stroke bounding box must include transform.\");\n }\n\n var scale = _util.Util.singularValueDecompose2dScale(transform);\n\n var xStrokePad = scale[0] * this.lineWidth / 2;\n var yStrokePad = scale[1] * this.lineWidth / 2;\n box[0] -= xStrokePad;\n box[1] -= yStrokePad;\n box[2] += xStrokePad;\n box[3] += yStrokePad;\n }\n\n return box;\n }\n }, {\n key: \"updateClipFromPath\",\n value: function updateClipFromPath() {\n var intersect = _util.Util.intersect(this.clipBox, this.getPathBoundingBox());\n\n this.startNewPathAndClipBox(intersect || [0, 0, 0, 0]);\n }\n }, {\n key: \"isEmptyClip\",\n value: function isEmptyClip() {\n return this.minX === Infinity;\n }\n }, {\n key: \"startNewPathAndClipBox\",\n value: function startNewPathAndClipBox(box) {\n this.clipBox = box;\n this.minX = Infinity;\n this.minY = Infinity;\n this.maxX = 0;\n this.maxY = 0;\n }\n }, {\n key: \"getClippedPathBoundingBox\",\n value: function getClippedPathBoundingBox() {\n var pathType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pattern_helper.PathType.FILL;\n var transform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n return _util.Util.intersect(this.clipBox, this.getPathBoundingBox(pathType, transform));\n }\n }]);\n\n return CanvasExtraState;\n}();\n\nfunction putBinaryImageData(ctx, imgData) {\n var transferMaps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (typeof ImageData !== \"undefined\" && imgData instanceof ImageData) {\n ctx.putImageData(imgData, 0, 0);\n return;\n }\n\n var height = imgData.height,\n width = imgData.width;\n var partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n var fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n var totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n var srcPos = 0,\n destPos;\n var src = imgData.data;\n var dest = chunkImgData.data;\n var i, j, thisChunkHeight, elemsInThisChunk;\n var transferMapRed, transferMapGreen, transferMapBlue, transferMapGray;\n\n if (transferMaps) {\n switch (transferMaps.length) {\n case 1:\n transferMapRed = transferMaps[0];\n transferMapGreen = transferMaps[0];\n transferMapBlue = transferMaps[0];\n transferMapGray = transferMaps[0];\n break;\n\n case 4:\n transferMapRed = transferMaps[0];\n transferMapGreen = transferMaps[1];\n transferMapBlue = transferMaps[2];\n transferMapGray = transferMaps[3];\n break;\n }\n }\n\n if (imgData.kind === _util.ImageKind.GRAYSCALE_1BPP) {\n var srcLength = src.byteLength;\n var dest32 = new Uint32Array(dest.buffer, 0, dest.byteLength >> 2);\n var dest32DataLength = dest32.length;\n var fullSrcDiff = width + 7 >> 3;\n var white = 0xffffffff;\n var black = _util.FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n\n if (transferMapGray) {\n if (transferMapGray[0] === 0xff && transferMapGray[0xff] === 0) {\n var _ref = [black, white];\n white = _ref[0];\n black = _ref[1];\n }\n }\n\n for (i = 0; i < totalChunks; i++) {\n thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n destPos = 0;\n\n for (j = 0; j < thisChunkHeight; j++) {\n var srcDiff = srcLength - srcPos;\n var k = 0;\n var kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7;\n var kEndUnrolled = kEnd & ~7;\n var mask = 0;\n var srcByte = 0;\n\n for (; k < kEndUnrolled; k += 8) {\n srcByte = src[srcPos++];\n dest32[destPos++] = srcByte & 128 ? white : black;\n dest32[destPos++] = srcByte & 64 ? white : black;\n dest32[destPos++] = srcByte & 32 ? white : black;\n dest32[destPos++] = srcByte & 16 ? white : black;\n dest32[destPos++] = srcByte & 8 ? white : black;\n dest32[destPos++] = srcByte & 4 ? white : black;\n dest32[destPos++] = srcByte & 2 ? white : black;\n dest32[destPos++] = srcByte & 1 ? white : black;\n }\n\n for (; k < kEnd; k++) {\n if (mask === 0) {\n srcByte = src[srcPos++];\n mask = 128;\n }\n\n dest32[destPos++] = srcByte & mask ? white : black;\n mask >>= 1;\n }\n }\n\n while (destPos < dest32DataLength) {\n dest32[destPos++] = 0;\n }\n\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n } else if (imgData.kind === _util.ImageKind.RGBA_32BPP) {\n var hasTransferMaps = !!(transferMapRed || transferMapGreen || transferMapBlue);\n j = 0;\n elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4;\n\n for (i = 0; i < fullChunks; i++) {\n dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n srcPos += elemsInThisChunk;\n\n if (hasTransferMaps) {\n for (var _k = 0; _k < elemsInThisChunk; _k += 4) {\n if (transferMapRed) {\n dest[_k + 0] = transferMapRed[dest[_k + 0]];\n }\n\n if (transferMapGreen) {\n dest[_k + 1] = transferMapGreen[dest[_k + 1]];\n }\n\n if (transferMapBlue) {\n dest[_k + 2] = transferMapBlue[dest[_k + 2]];\n }\n }\n }\n\n ctx.putImageData(chunkImgData, 0, j);\n j += FULL_CHUNK_HEIGHT;\n }\n\n if (i < totalChunks) {\n elemsInThisChunk = width * partialChunkHeight * 4;\n dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n\n if (hasTransferMaps) {\n for (var _k2 = 0; _k2 < elemsInThisChunk; _k2 += 4) {\n if (transferMapRed) {\n dest[_k2 + 0] = transferMapRed[dest[_k2 + 0]];\n }\n\n if (transferMapGreen) {\n dest[_k2 + 1] = transferMapGreen[dest[_k2 + 1]];\n }\n\n if (transferMapBlue) {\n dest[_k2 + 2] = transferMapBlue[dest[_k2 + 2]];\n }\n }\n }\n\n ctx.putImageData(chunkImgData, 0, j);\n }\n } else if (imgData.kind === _util.ImageKind.RGB_24BPP) {\n var _hasTransferMaps = !!(transferMapRed || transferMapGreen || transferMapBlue);\n\n thisChunkHeight = FULL_CHUNK_HEIGHT;\n elemsInThisChunk = width * thisChunkHeight;\n\n for (i = 0; i < totalChunks; i++) {\n if (i >= fullChunks) {\n thisChunkHeight = partialChunkHeight;\n elemsInThisChunk = width * thisChunkHeight;\n }\n\n destPos = 0;\n\n for (j = elemsInThisChunk; j--;) {\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = 255;\n }\n\n if (_hasTransferMaps) {\n for (var _k3 = 0; _k3 < destPos; _k3 += 4) {\n if (transferMapRed) {\n dest[_k3 + 0] = transferMapRed[dest[_k3 + 0]];\n }\n\n if (transferMapGreen) {\n dest[_k3 + 1] = transferMapGreen[dest[_k3 + 1]];\n }\n\n if (transferMapBlue) {\n dest[_k3 + 2] = transferMapBlue[dest[_k3 + 2]];\n }\n }\n }\n\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n } else {\n throw new Error(\"bad image kind: \".concat(imgData.kind));\n }\n}\n\nfunction putBinaryImageMask(ctx, imgData) {\n if (imgData.bitmap) {\n ctx.drawImage(imgData.bitmap, 0, 0);\n return;\n }\n\n var height = imgData.height,\n width = imgData.width;\n var partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n var fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n var totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n var srcPos = 0;\n var src = imgData.data;\n var dest = chunkImgData.data;\n\n for (var i = 0; i < totalChunks; i++) {\n var thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n\n var _applyMaskImageData = (0, _image_utils.applyMaskImageData)({\n src: src,\n srcPos: srcPos,\n dest: dest,\n width: width,\n height: thisChunkHeight\n });\n\n srcPos = _applyMaskImageData.srcPos;\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n}\n\nfunction copyCtxState(sourceCtx, destCtx) {\n var properties = [\"strokeStyle\", \"fillStyle\", \"fillRule\", \"globalAlpha\", \"lineWidth\", \"lineCap\", \"lineJoin\", \"miterLimit\", \"globalCompositeOperation\", \"font\"];\n\n for (var i = 0, ii = properties.length; i < ii; i++) {\n var property = properties[i];\n\n if (sourceCtx[property] !== undefined) {\n destCtx[property] = sourceCtx[property];\n }\n }\n\n if (sourceCtx.setLineDash !== undefined) {\n destCtx.setLineDash(sourceCtx.getLineDash());\n destCtx.lineDashOffset = sourceCtx.lineDashOffset;\n }\n}\n\nfunction resetCtxToDefault(ctx, foregroundColor) {\n ctx.strokeStyle = ctx.fillStyle = foregroundColor || \"#000000\";\n ctx.fillRule = \"nonzero\";\n ctx.globalAlpha = 1;\n ctx.lineWidth = 1;\n ctx.lineCap = \"butt\";\n ctx.lineJoin = \"miter\";\n ctx.miterLimit = 10;\n ctx.globalCompositeOperation = \"source-over\";\n ctx.font = \"10px sans-serif\";\n\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n ctx.lineDashOffset = 0;\n }\n}\n\nfunction composeSMaskBackdrop(bytes, r0, g0, b0) {\n var length = bytes.length;\n\n for (var i = 3; i < length; i += 4) {\n var alpha = bytes[i];\n\n if (alpha === 0) {\n bytes[i - 3] = r0;\n bytes[i - 2] = g0;\n bytes[i - 1] = b0;\n } else if (alpha < 255) {\n var alpha_ = 255 - alpha;\n bytes[i - 3] = bytes[i - 3] * alpha + r0 * alpha_ >> 8;\n bytes[i - 2] = bytes[i - 2] * alpha + g0 * alpha_ >> 8;\n bytes[i - 1] = bytes[i - 1] * alpha + b0 * alpha_ >> 8;\n }\n }\n}\n\nfunction composeSMaskAlpha(maskData, layerData, transferMap) {\n var length = maskData.length;\n var scale = 1 / 255;\n\n for (var i = 3; i < length; i += 4) {\n var alpha = transferMap ? transferMap[maskData[i]] : maskData[i];\n layerData[i] = layerData[i] * alpha * scale | 0;\n }\n}\n\nfunction composeSMaskLuminosity(maskData, layerData, transferMap) {\n var length = maskData.length;\n\n for (var i = 3; i < length; i += 4) {\n var y = maskData[i - 3] * 77 + maskData[i - 2] * 152 + maskData[i - 1] * 28;\n layerData[i] = transferMap ? layerData[i] * transferMap[y >> 8] >> 8 : layerData[i] * y >> 16;\n }\n}\n\nfunction genericComposeSMask(maskCtx, layerCtx, width, height, subtype, backdrop, transferMap, layerOffsetX, layerOffsetY, maskOffsetX, maskOffsetY) {\n var hasBackdrop = !!backdrop;\n var r0 = hasBackdrop ? backdrop[0] : 0;\n var g0 = hasBackdrop ? backdrop[1] : 0;\n var b0 = hasBackdrop ? backdrop[2] : 0;\n var composeFn;\n\n if (subtype === \"Luminosity\") {\n composeFn = composeSMaskLuminosity;\n } else {\n composeFn = composeSMaskAlpha;\n }\n\n var PIXELS_TO_PROCESS = 1048576;\n var chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width));\n\n for (var row = 0; row < height; row += chunkSize) {\n var chunkHeight = Math.min(chunkSize, height - row);\n var maskData = maskCtx.getImageData(layerOffsetX - maskOffsetX, row + (layerOffsetY - maskOffsetY), width, chunkHeight);\n var layerData = layerCtx.getImageData(layerOffsetX, row + layerOffsetY, width, chunkHeight);\n\n if (hasBackdrop) {\n composeSMaskBackdrop(maskData.data, r0, g0, b0);\n }\n\n composeFn(maskData.data, layerData.data, transferMap);\n layerCtx.putImageData(layerData, layerOffsetX, row + layerOffsetY);\n }\n}\n\nfunction composeSMask(ctx, smask, layerCtx, layerBox) {\n var layerOffsetX = layerBox[0];\n var layerOffsetY = layerBox[1];\n var layerWidth = layerBox[2] - layerOffsetX;\n var layerHeight = layerBox[3] - layerOffsetY;\n\n if (layerWidth === 0 || layerHeight === 0) {\n return;\n }\n\n genericComposeSMask(smask.context, layerCtx, layerWidth, layerHeight, smask.subtype, smask.backdrop, smask.transferMap, layerOffsetX, layerOffsetY, smask.offsetX, smask.offsetY);\n ctx.save();\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = \"source-over\";\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(layerCtx.canvas, 0, 0);\n ctx.restore();\n}\n\nfunction getImageSmoothingEnabled(transform, interpolate) {\n var scale = _util.Util.singularValueDecompose2dScale(transform);\n\n scale[0] = Math.fround(scale[0]);\n scale[1] = Math.fround(scale[1]);\n var actualScale = Math.fround((globalThis.devicePixelRatio || 1) * _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS);\n\n if (interpolate !== undefined) {\n return interpolate;\n } else if (scale[0] <= actualScale || scale[1] <= actualScale) {\n return true;\n }\n\n return false;\n}\n\nvar LINE_CAP_STYLES = [\"butt\", \"round\", \"square\"];\nvar LINE_JOIN_STYLES = [\"miter\", \"round\", \"bevel\"];\nvar NORMAL_CLIP = {};\nvar EO_CLIP = {};\n\nvar CanvasGraphics = /*#__PURE__*/function () {\n function CanvasGraphics(canvasCtx, commonObjs, objs, canvasFactory, imageLayer, optionalContentConfig, annotationCanvasMap, pageColors) {\n _classCallCheck(this, CanvasGraphics);\n\n this.ctx = canvasCtx;\n this.current = new CanvasExtraState(this.ctx.canvas.width, this.ctx.canvas.height);\n this.stateStack = [];\n this.pendingClip = null;\n this.pendingEOFill = false;\n this.res = null;\n this.xobjs = null;\n this.commonObjs = commonObjs;\n this.objs = objs;\n this.canvasFactory = canvasFactory;\n this.imageLayer = imageLayer;\n this.groupStack = [];\n this.processingType3 = null;\n this.baseTransform = null;\n this.baseTransformStack = [];\n this.groupLevel = 0;\n this.smaskStack = [];\n this.smaskCounter = 0;\n this.tempSMask = null;\n this.suspendedCtx = null;\n this.contentVisible = true;\n this.markedContentStack = [];\n this.optionalContentConfig = optionalContentConfig;\n this.cachedCanvases = new CachedCanvases(this.canvasFactory);\n this.cachedPatterns = new Map();\n this.annotationCanvasMap = annotationCanvasMap;\n this.viewportScale = 1;\n this.outputScaleX = 1;\n this.outputScaleY = 1;\n this.backgroundColor = (pageColors === null || pageColors === void 0 ? void 0 : pageColors.background) || null;\n this.foregroundColor = (pageColors === null || pageColors === void 0 ? void 0 : pageColors.foreground) || null;\n\n if (canvasCtx) {\n addContextCurrentTransform(canvasCtx);\n }\n\n this._cachedScaleForStroking = null;\n this._cachedGetSinglePixelWidth = null;\n this._cachedBitmapsMap = new Map();\n }\n\n _createClass(CanvasGraphics, [{\n key: \"getObject\",\n value: function getObject(data) {\n var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if (typeof data === \"string\") {\n return data.startsWith(\"g_\") ? this.commonObjs.get(data) : this.objs.get(data);\n }\n\n return fallback;\n }\n }, {\n key: \"beginDrawing\",\n value: function beginDrawing(_ref2) {\n var transform = _ref2.transform,\n viewport = _ref2.viewport,\n _ref2$transparency = _ref2.transparency,\n transparency = _ref2$transparency === void 0 ? false : _ref2$transparency,\n _ref2$background = _ref2.background,\n background = _ref2$background === void 0 ? null : _ref2$background;\n var width = this.ctx.canvas.width;\n var height = this.ctx.canvas.height;\n var defaultBackgroundColor = background || \"#ffffff\";\n this.ctx.save();\n\n if (this.foregroundColor && this.backgroundColor) {\n this.ctx.fillStyle = this.foregroundColor;\n var fg = this.foregroundColor = this.ctx.fillStyle;\n this.ctx.fillStyle = this.backgroundColor;\n var bg = this.backgroundColor = this.ctx.fillStyle;\n var isValidDefaultBg = true;\n var defaultBg = defaultBackgroundColor;\n this.ctx.fillStyle = defaultBackgroundColor;\n defaultBg = this.ctx.fillStyle;\n isValidDefaultBg = typeof defaultBg === \"string\" && /^#[0-9A-Fa-f]{6}$/.test(defaultBg);\n\n if (fg === \"#000000\" && bg === \"#ffffff\" || fg === bg || !isValidDefaultBg) {\n this.foregroundColor = this.backgroundColor = null;\n } else {\n var cB = parseInt(defaultBg.slice(1), 16);\n var rB = (cB && 0xff0000) >> 16;\n var gB = (cB && 0x00ff00) >> 8;\n var bB = cB && 0x0000ff;\n\n var newComp = function newComp(x) {\n x /= 255;\n return x <= 0.03928 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n };\n\n var lumB = Math.round(0.2126 * newComp(rB) + 0.7152 * newComp(gB) + 0.0722 * newComp(bB));\n\n this.selectColor = function (r, g, b) {\n var lumC = 0.2126 * newComp(r) + 0.7152 * newComp(g) + 0.0722 * newComp(b);\n return Math.round(lumC) === lumB ? bg : fg;\n };\n }\n }\n\n this.ctx.fillStyle = this.backgroundColor || defaultBackgroundColor;\n this.ctx.fillRect(0, 0, width, height);\n this.ctx.restore();\n\n if (transparency) {\n var transparentCanvas = this.cachedCanvases.getCanvas(\"transparent\", width, height, true);\n this.compositeCtx = this.ctx;\n this.transparentCanvas = transparentCanvas.canvas;\n this.ctx = transparentCanvas.context;\n this.ctx.save();\n this.ctx.transform.apply(this.ctx, this.compositeCtx.mozCurrentTransform);\n }\n\n this.ctx.save();\n resetCtxToDefault(this.ctx, this.foregroundColor);\n\n if (transform) {\n this.ctx.transform.apply(this.ctx, transform);\n this.outputScaleX = transform[0];\n this.outputScaleY = transform[0];\n }\n\n this.ctx.transform.apply(this.ctx, viewport.transform);\n this.viewportScale = viewport.scale;\n this.baseTransform = this.ctx.mozCurrentTransform.slice();\n\n if (this.imageLayer) {\n this.imageLayer.beginLayout();\n }\n }\n }, {\n key: \"executeOperatorList\",\n value: function executeOperatorList(operatorList, executionStartIdx, continueCallback, stepper) {\n var argsArray = operatorList.argsArray;\n var fnArray = operatorList.fnArray;\n var i = executionStartIdx || 0;\n var argsArrayLen = argsArray.length;\n\n if (argsArrayLen === i) {\n return i;\n }\n\n var chunkOperations = argsArrayLen - i > EXECUTION_STEPS && typeof continueCallback === \"function\";\n var endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0;\n var steps = 0;\n var commonObjs = this.commonObjs;\n var objs = this.objs;\n var fnId;\n\n while (true) {\n if (stepper !== undefined && i === stepper.nextBreakPoint) {\n stepper.breakIt(i, continueCallback);\n return i;\n }\n\n fnId = fnArray[i];\n\n if (fnId !== _util.OPS.dependency) {\n this[fnId].apply(this, argsArray[i]);\n } else {\n var _iterator3 = _createForOfIteratorHelper(argsArray[i]),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var depObjId = _step3.value;\n var objsPool = depObjId.startsWith(\"g_\") ? commonObjs : objs;\n\n if (!objsPool.has(depObjId)) {\n objsPool.get(depObjId, continueCallback);\n return i;\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n }\n\n i++;\n\n if (i === argsArrayLen) {\n return i;\n }\n\n if (chunkOperations && ++steps > EXECUTION_STEPS) {\n if (Date.now() > endTime) {\n continueCallback();\n return i;\n }\n\n steps = 0;\n }\n }\n }\n }, {\n key: \"endDrawing\",\n value: function endDrawing() {\n while (this.stateStack.length || this.inSMaskMode) {\n this.restore();\n }\n\n this.ctx.restore();\n\n if (this.transparentCanvas) {\n this.ctx = this.compositeCtx;\n this.ctx.save();\n this.ctx.setTransform(1, 0, 0, 1, 0, 0);\n this.ctx.drawImage(this.transparentCanvas, 0, 0);\n this.ctx.restore();\n this.transparentCanvas = null;\n }\n\n this.cachedCanvases.clear();\n this.cachedPatterns.clear();\n\n var _iterator4 = _createForOfIteratorHelper(this._cachedBitmapsMap.values()),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var cache = _step4.value;\n\n var _iterator5 = _createForOfIteratorHelper(cache.values()),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var canvas = _step5.value;\n\n if (typeof HTMLCanvasElement !== \"undefined\" && canvas instanceof HTMLCanvasElement) {\n canvas.width = canvas.height = 0;\n }\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n cache.clear();\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n this._cachedBitmapsMap.clear();\n\n if (this.imageLayer) {\n this.imageLayer.endLayout();\n }\n }\n }, {\n key: \"_scaleImage\",\n value: function _scaleImage(img, inverseTransform) {\n var width = img.width;\n var height = img.height;\n var widthScale = Math.max(Math.hypot(inverseTransform[0], inverseTransform[1]), 1);\n var heightScale = Math.max(Math.hypot(inverseTransform[2], inverseTransform[3]), 1);\n var paintWidth = width,\n paintHeight = height;\n var tmpCanvasId = \"prescale1\";\n var tmpCanvas, tmpCtx;\n\n while (widthScale > 2 && paintWidth > 1 || heightScale > 2 && paintHeight > 1) {\n var newWidth = paintWidth,\n newHeight = paintHeight;\n\n if (widthScale > 2 && paintWidth > 1) {\n newWidth = Math.ceil(paintWidth / 2);\n widthScale /= paintWidth / newWidth;\n }\n\n if (heightScale > 2 && paintHeight > 1) {\n newHeight = Math.ceil(paintHeight / 2);\n heightScale /= paintHeight / newHeight;\n }\n\n tmpCanvas = this.cachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight, false);\n tmpCtx = tmpCanvas.context;\n tmpCtx.clearRect(0, 0, newWidth, newHeight);\n tmpCtx.drawImage(img, 0, 0, paintWidth, paintHeight, 0, 0, newWidth, newHeight);\n img = tmpCanvas.canvas;\n paintWidth = newWidth;\n paintHeight = newHeight;\n tmpCanvasId = tmpCanvasId === \"prescale1\" ? \"prescale2\" : \"prescale1\";\n }\n\n return {\n img: img,\n paintWidth: paintWidth,\n paintHeight: paintHeight\n };\n }\n }, {\n key: \"_createMaskCanvas\",\n value: function _createMaskCanvas(img) {\n var ctx = this.ctx;\n var width = img.width,\n height = img.height;\n var fillColor = this.current.fillColor;\n var isPatternFill = this.current.patternFill;\n var currentTransform = ctx.mozCurrentTransform;\n var cache, cacheKey, scaled, maskCanvas;\n\n if ((img.bitmap || img.data) && img.count > 1) {\n var mainKey = img.bitmap || img.data.buffer;\n var withoutTranslation = currentTransform.slice(0, 4);\n cacheKey = JSON.stringify(isPatternFill ? withoutTranslation : [withoutTranslation, fillColor]);\n cache = this._cachedBitmapsMap.get(mainKey);\n\n if (!cache) {\n cache = new Map();\n\n this._cachedBitmapsMap.set(mainKey, cache);\n }\n\n var cachedImage = cache.get(cacheKey);\n\n if (cachedImage && !isPatternFill) {\n var _offsetX = Math.round(Math.min(currentTransform[0], currentTransform[2]) + currentTransform[4]);\n\n var _offsetY = Math.round(Math.min(currentTransform[1], currentTransform[3]) + currentTransform[5]);\n\n return {\n canvas: cachedImage,\n offsetX: _offsetX,\n offsetY: _offsetY\n };\n }\n\n scaled = cachedImage;\n }\n\n if (!scaled) {\n maskCanvas = this.cachedCanvases.getCanvas(\"maskCanvas\", width, height, false);\n putBinaryImageMask(maskCanvas.context, img);\n }\n\n var maskToCanvas = _util.Util.transform(currentTransform, [1 / width, 0, 0, -1 / height, 0, 0]);\n\n maskToCanvas = _util.Util.transform(maskToCanvas, [1, 0, 0, 1, 0, -height]);\n\n var cord1 = _util.Util.applyTransform([0, 0], maskToCanvas);\n\n var cord2 = _util.Util.applyTransform([width, height], maskToCanvas);\n\n var rect = _util.Util.normalizeRect([cord1[0], cord1[1], cord2[0], cord2[1]]);\n\n var drawnWidth = Math.round(rect[2] - rect[0]) || 1;\n var drawnHeight = Math.round(rect[3] - rect[1]) || 1;\n var fillCanvas = this.cachedCanvases.getCanvas(\"fillCanvas\", drawnWidth, drawnHeight, true);\n var fillCtx = fillCanvas.context;\n var offsetX = Math.min(cord1[0], cord2[0]);\n var offsetY = Math.min(cord1[1], cord2[1]);\n fillCtx.translate(-offsetX, -offsetY);\n fillCtx.transform.apply(fillCtx, maskToCanvas);\n\n if (!scaled) {\n scaled = this._scaleImage(maskCanvas.canvas, fillCtx.mozCurrentTransformInverse);\n scaled = scaled.img;\n\n if (cache && isPatternFill) {\n cache.set(cacheKey, scaled);\n }\n }\n\n fillCtx.imageSmoothingEnabled = getImageSmoothingEnabled(fillCtx.mozCurrentTransform, img.interpolate);\n drawImageAtIntegerCoords(fillCtx, scaled, 0, 0, scaled.width, scaled.height, 0, 0, width, height);\n fillCtx.globalCompositeOperation = \"source-in\";\n\n var inverse = _util.Util.transform(fillCtx.mozCurrentTransformInverse, [1, 0, 0, 1, -offsetX, -offsetY]);\n\n fillCtx.fillStyle = isPatternFill ? fillColor.getPattern(ctx, this, inverse, _pattern_helper.PathType.FILL) : fillColor;\n fillCtx.fillRect(0, 0, width, height);\n\n if (cache && !isPatternFill) {\n this.cachedCanvases[\"delete\"](\"fillCanvas\");\n cache.set(cacheKey, fillCanvas.canvas);\n }\n\n return {\n canvas: fillCanvas.canvas,\n offsetX: Math.round(offsetX),\n offsetY: Math.round(offsetY)\n };\n }\n }, {\n key: \"setLineWidth\",\n value: function setLineWidth(width) {\n if (width !== this.current.lineWidth) {\n this._cachedScaleForStroking = null;\n }\n\n this.current.lineWidth = width;\n this.ctx.lineWidth = width;\n }\n }, {\n key: \"setLineCap\",\n value: function setLineCap(style) {\n this.ctx.lineCap = LINE_CAP_STYLES[style];\n }\n }, {\n key: \"setLineJoin\",\n value: function setLineJoin(style) {\n this.ctx.lineJoin = LINE_JOIN_STYLES[style];\n }\n }, {\n key: \"setMiterLimit\",\n value: function setMiterLimit(limit) {\n this.ctx.miterLimit = limit;\n }\n }, {\n key: \"setDash\",\n value: function setDash(dashArray, dashPhase) {\n var ctx = this.ctx;\n\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash(dashArray);\n ctx.lineDashOffset = dashPhase;\n }\n }\n }, {\n key: \"setRenderingIntent\",\n value: function setRenderingIntent(intent) {}\n }, {\n key: \"setFlatness\",\n value: function setFlatness(flatness) {}\n }, {\n key: \"setGState\",\n value: function setGState(states) {\n for (var i = 0, ii = states.length; i < ii; i++) {\n var state = states[i];\n var key = state[0];\n var value = state[1];\n\n switch (key) {\n case \"LW\":\n this.setLineWidth(value);\n break;\n\n case \"LC\":\n this.setLineCap(value);\n break;\n\n case \"LJ\":\n this.setLineJoin(value);\n break;\n\n case \"ML\":\n this.setMiterLimit(value);\n break;\n\n case \"D\":\n this.setDash(value[0], value[1]);\n break;\n\n case \"RI\":\n this.setRenderingIntent(value);\n break;\n\n case \"FL\":\n this.setFlatness(value);\n break;\n\n case \"Font\":\n this.setFont(value[0], value[1]);\n break;\n\n case \"CA\":\n this.current.strokeAlpha = state[1];\n break;\n\n case \"ca\":\n this.current.fillAlpha = state[1];\n this.ctx.globalAlpha = state[1];\n break;\n\n case \"BM\":\n this.ctx.globalCompositeOperation = value;\n break;\n\n case \"SMask\":\n this.current.activeSMask = value ? this.tempSMask : null;\n this.tempSMask = null;\n this.checkSMaskState();\n break;\n\n case \"TR\":\n this.current.transferMaps = value;\n }\n }\n }\n }, {\n key: \"inSMaskMode\",\n get: function get() {\n return !!this.suspendedCtx;\n }\n }, {\n key: \"checkSMaskState\",\n value: function checkSMaskState() {\n var inSMaskMode = this.inSMaskMode;\n\n if (this.current.activeSMask && !inSMaskMode) {\n this.beginSMaskMode();\n } else if (!this.current.activeSMask && inSMaskMode) {\n this.endSMaskMode();\n }\n }\n }, {\n key: \"beginSMaskMode\",\n value: function beginSMaskMode() {\n if (this.inSMaskMode) {\n throw new Error(\"beginSMaskMode called while already in smask mode\");\n }\n\n var drawnWidth = this.ctx.canvas.width;\n var drawnHeight = this.ctx.canvas.height;\n var cacheId = \"smaskGroupAt\" + this.groupLevel;\n var scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight, true);\n this.suspendedCtx = this.ctx;\n this.ctx = scratchCanvas.context;\n var ctx = this.ctx;\n ctx.setTransform.apply(ctx, this.suspendedCtx.mozCurrentTransform);\n copyCtxState(this.suspendedCtx, ctx);\n mirrorContextOperations(ctx, this.suspendedCtx);\n this.setGState([[\"BM\", \"source-over\"], [\"ca\", 1], [\"CA\", 1]]);\n }\n }, {\n key: \"endSMaskMode\",\n value: function endSMaskMode() {\n if (!this.inSMaskMode) {\n throw new Error(\"endSMaskMode called while not in smask mode\");\n }\n\n this.ctx._removeMirroring();\n\n copyCtxState(this.ctx, this.suspendedCtx);\n this.ctx = this.suspendedCtx;\n this.suspendedCtx = null;\n }\n }, {\n key: \"compose\",\n value: function compose(dirtyBox) {\n if (!this.current.activeSMask) {\n return;\n }\n\n if (!dirtyBox) {\n dirtyBox = [0, 0, this.ctx.canvas.width, this.ctx.canvas.height];\n } else {\n dirtyBox[0] = Math.floor(dirtyBox[0]);\n dirtyBox[1] = Math.floor(dirtyBox[1]);\n dirtyBox[2] = Math.ceil(dirtyBox[2]);\n dirtyBox[3] = Math.ceil(dirtyBox[3]);\n }\n\n var smask = this.current.activeSMask;\n var suspendedCtx = this.suspendedCtx;\n composeSMask(suspendedCtx, smask, this.ctx, dirtyBox);\n this.ctx.save();\n this.ctx.setTransform(1, 0, 0, 1, 0, 0);\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n this.ctx.restore();\n }\n }, {\n key: \"save\",\n value: function save() {\n if (this.inSMaskMode) {\n copyCtxState(this.ctx, this.suspendedCtx);\n this.suspendedCtx.save();\n } else {\n this.ctx.save();\n }\n\n var old = this.current;\n this.stateStack.push(old);\n this.current = old.clone();\n }\n }, {\n key: \"restore\",\n value: function restore() {\n if (this.stateStack.length === 0 && this.inSMaskMode) {\n this.endSMaskMode();\n }\n\n if (this.stateStack.length !== 0) {\n this.current = this.stateStack.pop();\n\n if (this.inSMaskMode) {\n this.suspendedCtx.restore();\n copyCtxState(this.suspendedCtx, this.ctx);\n } else {\n this.ctx.restore();\n }\n\n this.checkSMaskState();\n this.pendingClip = null;\n this._cachedScaleForStroking = null;\n this._cachedGetSinglePixelWidth = null;\n }\n }\n }, {\n key: \"transform\",\n value: function transform(a, b, c, d, e, f) {\n this.ctx.transform(a, b, c, d, e, f);\n this._cachedScaleForStroking = null;\n this._cachedGetSinglePixelWidth = null;\n }\n }, {\n key: \"constructPath\",\n value: function constructPath(ops, args, minMax) {\n var ctx = this.ctx;\n var current = this.current;\n var x = current.x,\n y = current.y;\n var startX, startY;\n var currentTransform = ctx.mozCurrentTransform;\n var isScalingMatrix = currentTransform[0] === 0 && currentTransform[3] === 0 || currentTransform[1] === 0 && currentTransform[2] === 0;\n var minMaxForBezier = isScalingMatrix ? minMax.slice(0) : null;\n\n for (var i = 0, j = 0, ii = ops.length; i < ii; i++) {\n switch (ops[i] | 0) {\n case _util.OPS.rectangle:\n x = args[j++];\n y = args[j++];\n var width = args[j++];\n var height = args[j++];\n var xw = x + width;\n var yh = y + height;\n ctx.moveTo(x, y);\n\n if (width === 0 || height === 0) {\n ctx.lineTo(xw, yh);\n } else {\n ctx.lineTo(xw, y);\n ctx.lineTo(xw, yh);\n ctx.lineTo(x, yh);\n }\n\n if (!isScalingMatrix) {\n current.updateRectMinMax(currentTransform, [x, y, xw, yh]);\n }\n\n ctx.closePath();\n break;\n\n case _util.OPS.moveTo:\n x = args[j++];\n y = args[j++];\n ctx.moveTo(x, y);\n\n if (!isScalingMatrix) {\n current.updatePathMinMax(currentTransform, x, y);\n }\n\n break;\n\n case _util.OPS.lineTo:\n x = args[j++];\n y = args[j++];\n ctx.lineTo(x, y);\n\n if (!isScalingMatrix) {\n current.updatePathMinMax(currentTransform, x, y);\n }\n\n break;\n\n case _util.OPS.curveTo:\n startX = x;\n startY = y;\n x = args[j + 4];\n y = args[j + 5];\n ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3], x, y);\n current.updateCurvePathMinMax(currentTransform, startX, startY, args[j], args[j + 1], args[j + 2], args[j + 3], x, y, minMaxForBezier);\n j += 6;\n break;\n\n case _util.OPS.curveTo2:\n startX = x;\n startY = y;\n ctx.bezierCurveTo(x, y, args[j], args[j + 1], args[j + 2], args[j + 3]);\n current.updateCurvePathMinMax(currentTransform, startX, startY, x, y, args[j], args[j + 1], args[j + 2], args[j + 3], minMaxForBezier);\n x = args[j + 2];\n y = args[j + 3];\n j += 4;\n break;\n\n case _util.OPS.curveTo3:\n startX = x;\n startY = y;\n x = args[j + 2];\n y = args[j + 3];\n ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y);\n current.updateCurvePathMinMax(currentTransform, startX, startY, args[j], args[j + 1], x, y, x, y, minMaxForBezier);\n j += 4;\n break;\n\n case _util.OPS.closePath:\n ctx.closePath();\n break;\n }\n }\n\n if (isScalingMatrix) {\n current.updateScalingPathMinMax(currentTransform, minMaxForBezier);\n }\n\n current.setCurrentPoint(x, y);\n }\n }, {\n key: \"closePath\",\n value: function closePath() {\n this.ctx.closePath();\n }\n }, {\n key: \"stroke\",\n value: function stroke(consumePath) {\n consumePath = typeof consumePath !== \"undefined\" ? consumePath : true;\n var ctx = this.ctx;\n var strokeColor = this.current.strokeColor;\n ctx.globalAlpha = this.current.strokeAlpha;\n\n if (this.contentVisible) {\n if (_typeof(strokeColor) === \"object\" && strokeColor !== null && strokeColor !== void 0 && strokeColor.getPattern) {\n ctx.save();\n ctx.strokeStyle = strokeColor.getPattern(ctx, this, ctx.mozCurrentTransformInverse, _pattern_helper.PathType.STROKE);\n this.rescaleAndStroke(false);\n ctx.restore();\n } else {\n this.rescaleAndStroke(true);\n }\n }\n\n if (consumePath) {\n this.consumePath(this.current.getClippedPathBoundingBox());\n }\n\n ctx.globalAlpha = this.current.fillAlpha;\n }\n }, {\n key: \"closeStroke\",\n value: function closeStroke() {\n this.closePath();\n this.stroke();\n }\n }, {\n key: \"fill\",\n value: function fill(consumePath) {\n consumePath = typeof consumePath !== \"undefined\" ? consumePath : true;\n var ctx = this.ctx;\n var fillColor = this.current.fillColor;\n var isPatternFill = this.current.patternFill;\n var needRestore = false;\n\n if (isPatternFill) {\n ctx.save();\n ctx.fillStyle = fillColor.getPattern(ctx, this, ctx.mozCurrentTransformInverse, _pattern_helper.PathType.FILL);\n needRestore = true;\n }\n\n var intersect = this.current.getClippedPathBoundingBox();\n\n if (this.contentVisible && intersect !== null) {\n if (this.pendingEOFill) {\n ctx.fill(\"evenodd\");\n this.pendingEOFill = false;\n } else {\n ctx.fill();\n }\n }\n\n if (needRestore) {\n ctx.restore();\n }\n\n if (consumePath) {\n this.consumePath(intersect);\n }\n }\n }, {\n key: \"eoFill\",\n value: function eoFill() {\n this.pendingEOFill = true;\n this.fill();\n }\n }, {\n key: \"fillStroke\",\n value: function fillStroke() {\n this.fill(false);\n this.stroke(false);\n this.consumePath();\n }\n }, {\n key: \"eoFillStroke\",\n value: function eoFillStroke() {\n this.pendingEOFill = true;\n this.fillStroke();\n }\n }, {\n key: \"closeFillStroke\",\n value: function closeFillStroke() {\n this.closePath();\n this.fillStroke();\n }\n }, {\n key: \"closeEOFillStroke\",\n value: function closeEOFillStroke() {\n this.pendingEOFill = true;\n this.closePath();\n this.fillStroke();\n }\n }, {\n key: \"endPath\",\n value: function endPath() {\n this.consumePath();\n }\n }, {\n key: \"clip\",\n value: function clip() {\n this.pendingClip = NORMAL_CLIP;\n }\n }, {\n key: \"eoClip\",\n value: function eoClip() {\n this.pendingClip = EO_CLIP;\n }\n }, {\n key: \"beginText\",\n value: function beginText() {\n this.current.textMatrix = _util.IDENTITY_MATRIX;\n this.current.textMatrixScale = 1;\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n }\n }, {\n key: \"endText\",\n value: function endText() {\n var paths = this.pendingTextPaths;\n var ctx = this.ctx;\n\n if (paths === undefined) {\n ctx.beginPath();\n return;\n }\n\n ctx.save();\n ctx.beginPath();\n\n for (var i = 0; i < paths.length; i++) {\n var path = paths[i];\n ctx.setTransform.apply(ctx, path.transform);\n ctx.translate(path.x, path.y);\n path.addToPath(ctx, path.fontSize);\n }\n\n ctx.restore();\n ctx.clip();\n ctx.beginPath();\n delete this.pendingTextPaths;\n }\n }, {\n key: \"setCharSpacing\",\n value: function setCharSpacing(spacing) {\n this.current.charSpacing = spacing;\n }\n }, {\n key: \"setWordSpacing\",\n value: function setWordSpacing(spacing) {\n this.current.wordSpacing = spacing;\n }\n }, {\n key: \"setHScale\",\n value: function setHScale(scale) {\n this.current.textHScale = scale / 100;\n }\n }, {\n key: \"setLeading\",\n value: function setLeading(leading) {\n this.current.leading = -leading;\n }\n }, {\n key: \"setFont\",\n value: function setFont(fontRefName, size) {\n var fontObj = this.commonObjs.get(fontRefName);\n var current = this.current;\n\n if (!fontObj) {\n throw new Error(\"Can't find font for \".concat(fontRefName));\n }\n\n current.fontMatrix = fontObj.fontMatrix || _util.FONT_IDENTITY_MATRIX;\n\n if (current.fontMatrix[0] === 0 || current.fontMatrix[3] === 0) {\n (0, _util.warn)(\"Invalid font matrix for font \" + fontRefName);\n }\n\n if (size < 0) {\n size = -size;\n current.fontDirection = -1;\n } else {\n current.fontDirection = 1;\n }\n\n this.current.font = fontObj;\n this.current.fontSize = size;\n\n if (fontObj.isType3Font) {\n return;\n }\n\n var name = fontObj.loadedName || \"sans-serif\";\n var bold = \"normal\";\n\n if (fontObj.black) {\n bold = \"900\";\n } else if (fontObj.bold) {\n bold = \"bold\";\n }\n\n var italic = fontObj.italic ? \"italic\" : \"normal\";\n var typeface = \"\\\"\".concat(name, \"\\\", \").concat(fontObj.fallbackName);\n var browserFontSize = size;\n\n if (size < MIN_FONT_SIZE) {\n browserFontSize = MIN_FONT_SIZE;\n } else if (size > MAX_FONT_SIZE) {\n browserFontSize = MAX_FONT_SIZE;\n }\n\n this.current.fontSizeScale = size / browserFontSize;\n this.ctx.font = \"\".concat(italic, \" \").concat(bold, \" \").concat(browserFontSize, \"px \").concat(typeface);\n }\n }, {\n key: \"setTextRenderingMode\",\n value: function setTextRenderingMode(mode) {\n this.current.textRenderingMode = mode;\n }\n }, {\n key: \"setTextRise\",\n value: function setTextRise(rise) {\n this.current.textRise = rise;\n }\n }, {\n key: \"moveText\",\n value: function moveText(x, y) {\n this.current.x = this.current.lineX += x;\n this.current.y = this.current.lineY += y;\n }\n }, {\n key: \"setLeadingMoveText\",\n value: function setLeadingMoveText(x, y) {\n this.setLeading(-y);\n this.moveText(x, y);\n }\n }, {\n key: \"setTextMatrix\",\n value: function setTextMatrix(a, b, c, d, e, f) {\n this.current.textMatrix = [a, b, c, d, e, f];\n this.current.textMatrixScale = Math.hypot(a, b);\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n }\n }, {\n key: \"nextLine\",\n value: function nextLine() {\n this.moveText(0, this.current.leading);\n }\n }, {\n key: \"paintChar\",\n value: function paintChar(character, x, y, patternTransform) {\n var ctx = this.ctx;\n var current = this.current;\n var font = current.font;\n var textRenderingMode = current.textRenderingMode;\n var fontSize = current.fontSize / current.fontSizeScale;\n var fillStrokeMode = textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK;\n var isAddToPathSet = !!(textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG);\n var patternFill = current.patternFill && !font.missingFile;\n var addToPath;\n\n if (font.disableFontFace || isAddToPathSet || patternFill) {\n addToPath = font.getPathGenerator(this.commonObjs, character);\n }\n\n if (font.disableFontFace || patternFill) {\n ctx.save();\n ctx.translate(x, y);\n ctx.beginPath();\n addToPath(ctx, fontSize);\n\n if (patternTransform) {\n ctx.setTransform.apply(ctx, patternTransform);\n }\n\n if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n ctx.fill();\n }\n\n if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n ctx.stroke();\n }\n\n ctx.restore();\n } else {\n if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n ctx.fillText(character, x, y);\n }\n\n if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n ctx.strokeText(character, x, y);\n }\n }\n\n if (isAddToPathSet) {\n var paths = this.pendingTextPaths || (this.pendingTextPaths = []);\n paths.push({\n transform: ctx.mozCurrentTransform,\n x: x,\n y: y,\n fontSize: fontSize,\n addToPath: addToPath\n });\n }\n }\n }, {\n key: \"isFontSubpixelAAEnabled\",\n get: function get() {\n var _this$cachedCanvases$ = this.cachedCanvases.getCanvas(\"isFontSubpixelAAEnabled\", 10, 10, false),\n ctx = _this$cachedCanvases$.context;\n\n ctx.scale(1.5, 1);\n ctx.fillText(\"I\", 0, 10);\n var data = ctx.getImageData(0, 0, 10, 10).data;\n var enabled = false;\n\n for (var i = 3; i < data.length; i += 4) {\n if (data[i] > 0 && data[i] < 255) {\n enabled = true;\n break;\n }\n }\n\n return (0, _util.shadow)(this, \"isFontSubpixelAAEnabled\", enabled);\n }\n }, {\n key: \"showText\",\n value: function showText(glyphs) {\n var current = this.current;\n var font = current.font;\n\n if (font.isType3Font) {\n return this.showType3Text(glyphs);\n }\n\n var fontSize = current.fontSize;\n\n if (fontSize === 0) {\n return undefined;\n }\n\n var ctx = this.ctx;\n var fontSizeScale = current.fontSizeScale;\n var charSpacing = current.charSpacing;\n var wordSpacing = current.wordSpacing;\n var fontDirection = current.fontDirection;\n var textHScale = current.textHScale * fontDirection;\n var glyphsLength = glyphs.length;\n var vertical = font.vertical;\n var spacingDir = vertical ? 1 : -1;\n var defaultVMetrics = font.defaultVMetrics;\n var widthAdvanceScale = fontSize * current.fontMatrix[0];\n var simpleFillText = current.textRenderingMode === _util.TextRenderingMode.FILL && !font.disableFontFace && !current.patternFill;\n ctx.save();\n ctx.transform.apply(ctx, current.textMatrix);\n ctx.translate(current.x, current.y + current.textRise);\n\n if (fontDirection > 0) {\n ctx.scale(textHScale, -1);\n } else {\n ctx.scale(textHScale, 1);\n }\n\n var patternTransform;\n\n if (current.patternFill) {\n ctx.save();\n var pattern = current.fillColor.getPattern(ctx, this, ctx.mozCurrentTransformInverse, _pattern_helper.PathType.FILL);\n patternTransform = ctx.mozCurrentTransform;\n ctx.restore();\n ctx.fillStyle = pattern;\n }\n\n var lineWidth = current.lineWidth;\n var scale = current.textMatrixScale;\n\n if (scale === 0 || lineWidth === 0) {\n var fillStrokeMode = current.textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK;\n\n if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n lineWidth = this.getSinglePixelWidth();\n }\n } else {\n lineWidth /= scale;\n }\n\n if (fontSizeScale !== 1.0) {\n ctx.scale(fontSizeScale, fontSizeScale);\n lineWidth /= fontSizeScale;\n }\n\n ctx.lineWidth = lineWidth;\n var x = 0,\n i;\n\n for (i = 0; i < glyphsLength; ++i) {\n var glyph = glyphs[i];\n\n if (typeof glyph === \"number\") {\n x += spacingDir * glyph * fontSize / 1000;\n continue;\n }\n\n var restoreNeeded = false;\n var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n var character = glyph.fontChar;\n var accent = glyph.accent;\n var scaledX = void 0,\n scaledY = void 0;\n var width = glyph.width;\n\n if (vertical) {\n var vmetric = glyph.vmetric || defaultVMetrics;\n var vx = -(glyph.vmetric ? vmetric[1] : width * 0.5) * widthAdvanceScale;\n var vy = vmetric[2] * widthAdvanceScale;\n width = vmetric ? -vmetric[0] : width;\n scaledX = vx / fontSizeScale;\n scaledY = (x + vy) / fontSizeScale;\n } else {\n scaledX = x / fontSizeScale;\n scaledY = 0;\n }\n\n if (font.remeasure && width > 0) {\n var measuredWidth = ctx.measureText(character).width * 1000 / fontSize * fontSizeScale;\n\n if (width < measuredWidth && this.isFontSubpixelAAEnabled) {\n var characterScaleX = width / measuredWidth;\n restoreNeeded = true;\n ctx.save();\n ctx.scale(characterScaleX, 1);\n scaledX /= characterScaleX;\n } else if (width !== measuredWidth) {\n scaledX += (width - measuredWidth) / 2000 * fontSize / fontSizeScale;\n }\n }\n\n if (this.contentVisible && (glyph.isInFont || font.missingFile)) {\n if (simpleFillText && !accent) {\n ctx.fillText(character, scaledX, scaledY);\n } else {\n this.paintChar(character, scaledX, scaledY, patternTransform);\n\n if (accent) {\n var scaledAccentX = scaledX + fontSize * accent.offset.x / fontSizeScale;\n var scaledAccentY = scaledY - fontSize * accent.offset.y / fontSizeScale;\n this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY, patternTransform);\n }\n }\n }\n\n var charWidth = void 0;\n\n if (vertical) {\n charWidth = width * widthAdvanceScale - spacing * fontDirection;\n } else {\n charWidth = width * widthAdvanceScale + spacing * fontDirection;\n }\n\n x += charWidth;\n\n if (restoreNeeded) {\n ctx.restore();\n }\n }\n\n if (vertical) {\n current.y -= x;\n } else {\n current.x += x * textHScale;\n }\n\n ctx.restore();\n this.compose();\n return undefined;\n }\n }, {\n key: \"showType3Text\",\n value: function showType3Text(glyphs) {\n var ctx = this.ctx;\n var current = this.current;\n var font = current.font;\n var fontSize = current.fontSize;\n var fontDirection = current.fontDirection;\n var spacingDir = font.vertical ? 1 : -1;\n var charSpacing = current.charSpacing;\n var wordSpacing = current.wordSpacing;\n var textHScale = current.textHScale * fontDirection;\n var fontMatrix = current.fontMatrix || _util.FONT_IDENTITY_MATRIX;\n var glyphsLength = glyphs.length;\n var isTextInvisible = current.textRenderingMode === _util.TextRenderingMode.INVISIBLE;\n var i, glyph, width, spacingLength;\n\n if (isTextInvisible || fontSize === 0) {\n return;\n }\n\n this._cachedScaleForStroking = null;\n this._cachedGetSinglePixelWidth = null;\n ctx.save();\n ctx.transform.apply(ctx, current.textMatrix);\n ctx.translate(current.x, current.y);\n ctx.scale(textHScale, fontDirection);\n\n for (i = 0; i < glyphsLength; ++i) {\n glyph = glyphs[i];\n\n if (typeof glyph === \"number\") {\n spacingLength = spacingDir * glyph * fontSize / 1000;\n this.ctx.translate(spacingLength, 0);\n current.x += spacingLength * textHScale;\n continue;\n }\n\n var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n var operatorList = font.charProcOperatorList[glyph.operatorListId];\n\n if (!operatorList) {\n (0, _util.warn)(\"Type3 character \\\"\".concat(glyph.operatorListId, \"\\\" is not available.\"));\n continue;\n }\n\n if (this.contentVisible) {\n this.processingType3 = glyph;\n this.save();\n ctx.scale(fontSize, fontSize);\n ctx.transform.apply(ctx, fontMatrix);\n this.executeOperatorList(operatorList);\n this.restore();\n }\n\n var transformed = _util.Util.applyTransform([glyph.width, 0], fontMatrix);\n\n width = transformed[0] * fontSize + spacing;\n ctx.translate(width, 0);\n current.x += width * textHScale;\n }\n\n ctx.restore();\n this.processingType3 = null;\n }\n }, {\n key: \"setCharWidth\",\n value: function setCharWidth(xWidth, yWidth) {}\n }, {\n key: \"setCharWidthAndBounds\",\n value: function setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) {\n this.ctx.rect(llx, lly, urx - llx, ury - lly);\n this.ctx.clip();\n this.endPath();\n }\n }, {\n key: \"getColorN_Pattern\",\n value: function getColorN_Pattern(IR) {\n var _this = this;\n\n var pattern;\n\n if (IR[0] === \"TilingPattern\") {\n var color = IR[1];\n var baseTransform = this.baseTransform || this.ctx.mozCurrentTransform.slice();\n var canvasGraphicsFactory = {\n createCanvasGraphics: function createCanvasGraphics(ctx) {\n return new CanvasGraphics(ctx, _this.commonObjs, _this.objs, _this.canvasFactory);\n }\n };\n pattern = new _pattern_helper.TilingPattern(IR, color, this.ctx, canvasGraphicsFactory, baseTransform);\n } else {\n pattern = this._getPattern(IR[1], IR[2]);\n }\n\n return pattern;\n }\n }, {\n key: \"setStrokeColorN\",\n value: function setStrokeColorN() {\n this.current.strokeColor = this.getColorN_Pattern(arguments);\n }\n }, {\n key: \"setFillColorN\",\n value: function setFillColorN() {\n this.current.fillColor = this.getColorN_Pattern(arguments);\n this.current.patternFill = true;\n }\n }, {\n key: \"setStrokeRGBColor\",\n value: function setStrokeRGBColor(r, g, b) {\n var _this$selectColor;\n\n var color = ((_this$selectColor = this.selectColor) === null || _this$selectColor === void 0 ? void 0 : _this$selectColor.call(this, r, g, b)) || _util.Util.makeHexColor(r, g, b);\n\n this.ctx.strokeStyle = color;\n this.current.strokeColor = color;\n }\n }, {\n key: \"setFillRGBColor\",\n value: function setFillRGBColor(r, g, b) {\n var _this$selectColor2;\n\n var color = ((_this$selectColor2 = this.selectColor) === null || _this$selectColor2 === void 0 ? void 0 : _this$selectColor2.call(this, r, g, b)) || _util.Util.makeHexColor(r, g, b);\n\n this.ctx.fillStyle = color;\n this.current.fillColor = color;\n this.current.patternFill = false;\n }\n }, {\n key: \"_getPattern\",\n value: function _getPattern(objId) {\n var matrix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var pattern;\n\n if (this.cachedPatterns.has(objId)) {\n pattern = this.cachedPatterns.get(objId);\n } else {\n pattern = (0, _pattern_helper.getShadingPattern)(this.objs.get(objId));\n this.cachedPatterns.set(objId, pattern);\n }\n\n if (matrix) {\n pattern.matrix = matrix;\n }\n\n return pattern;\n }\n }, {\n key: \"shadingFill\",\n value: function shadingFill(objId) {\n if (!this.contentVisible) {\n return;\n }\n\n var ctx = this.ctx;\n this.save();\n\n var pattern = this._getPattern(objId);\n\n ctx.fillStyle = pattern.getPattern(ctx, this, ctx.mozCurrentTransformInverse, _pattern_helper.PathType.SHADING);\n var inv = ctx.mozCurrentTransformInverse;\n\n if (inv) {\n var canvas = ctx.canvas;\n var width = canvas.width;\n var height = canvas.height;\n\n var bl = _util.Util.applyTransform([0, 0], inv);\n\n var br = _util.Util.applyTransform([0, height], inv);\n\n var ul = _util.Util.applyTransform([width, 0], inv);\n\n var ur = _util.Util.applyTransform([width, height], inv);\n\n var x0 = Math.min(bl[0], br[0], ul[0], ur[0]);\n var y0 = Math.min(bl[1], br[1], ul[1], ur[1]);\n var x1 = Math.max(bl[0], br[0], ul[0], ur[0]);\n var y1 = Math.max(bl[1], br[1], ul[1], ur[1]);\n this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);\n } else {\n this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);\n }\n\n this.compose(this.current.getClippedPathBoundingBox());\n this.restore();\n }\n }, {\n key: \"beginInlineImage\",\n value: function beginInlineImage() {\n (0, _util.unreachable)(\"Should not call beginInlineImage\");\n }\n }, {\n key: \"beginImageData\",\n value: function beginImageData() {\n (0, _util.unreachable)(\"Should not call beginImageData\");\n }\n }, {\n key: \"paintFormXObjectBegin\",\n value: function paintFormXObjectBegin(matrix, bbox) {\n if (!this.contentVisible) {\n return;\n }\n\n this.save();\n this.baseTransformStack.push(this.baseTransform);\n\n if (Array.isArray(matrix) && matrix.length === 6) {\n this.transform.apply(this, matrix);\n }\n\n this.baseTransform = this.ctx.mozCurrentTransform;\n\n if (bbox) {\n var width = bbox[2] - bbox[0];\n var height = bbox[3] - bbox[1];\n this.ctx.rect(bbox[0], bbox[1], width, height);\n this.current.updateRectMinMax(this.ctx.mozCurrentTransform, bbox);\n this.clip();\n this.endPath();\n }\n }\n }, {\n key: \"paintFormXObjectEnd\",\n value: function paintFormXObjectEnd() {\n if (!this.contentVisible) {\n return;\n }\n\n this.restore();\n this.baseTransform = this.baseTransformStack.pop();\n }\n }, {\n key: \"beginGroup\",\n value: function beginGroup(group) {\n if (!this.contentVisible) {\n return;\n }\n\n this.save();\n\n if (this.inSMaskMode) {\n this.endSMaskMode();\n this.current.activeSMask = null;\n }\n\n var currentCtx = this.ctx;\n\n if (!group.isolated) {\n (0, _util.info)(\"TODO: Support non-isolated groups.\");\n }\n\n if (group.knockout) {\n (0, _util.warn)(\"Knockout groups not supported.\");\n }\n\n var currentTransform = currentCtx.mozCurrentTransform;\n\n if (group.matrix) {\n currentCtx.transform.apply(currentCtx, group.matrix);\n }\n\n if (!group.bbox) {\n throw new Error(\"Bounding box is required.\");\n }\n\n var bounds = _util.Util.getAxialAlignedBoundingBox(group.bbox, currentCtx.mozCurrentTransform);\n\n var canvasBounds = [0, 0, currentCtx.canvas.width, currentCtx.canvas.height];\n bounds = _util.Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0];\n var offsetX = Math.floor(bounds[0]);\n var offsetY = Math.floor(bounds[1]);\n var drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1);\n var drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1);\n var scaleX = 1,\n scaleY = 1;\n\n if (drawnWidth > MAX_GROUP_SIZE) {\n scaleX = drawnWidth / MAX_GROUP_SIZE;\n drawnWidth = MAX_GROUP_SIZE;\n }\n\n if (drawnHeight > MAX_GROUP_SIZE) {\n scaleY = drawnHeight / MAX_GROUP_SIZE;\n drawnHeight = MAX_GROUP_SIZE;\n }\n\n this.current.startNewPathAndClipBox([0, 0, drawnWidth, drawnHeight]);\n var cacheId = \"groupAt\" + this.groupLevel;\n\n if (group.smask) {\n cacheId += \"_smask_\" + this.smaskCounter++ % 2;\n }\n\n var scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight, true);\n var groupCtx = scratchCanvas.context;\n groupCtx.scale(1 / scaleX, 1 / scaleY);\n groupCtx.translate(-offsetX, -offsetY);\n groupCtx.transform.apply(groupCtx, currentTransform);\n\n if (group.smask) {\n this.smaskStack.push({\n canvas: scratchCanvas.canvas,\n context: groupCtx,\n offsetX: offsetX,\n offsetY: offsetY,\n scaleX: scaleX,\n scaleY: scaleY,\n subtype: group.smask.subtype,\n backdrop: group.smask.backdrop,\n transferMap: group.smask.transferMap || null,\n startTransformInverse: null\n });\n } else {\n currentCtx.setTransform(1, 0, 0, 1, 0, 0);\n currentCtx.translate(offsetX, offsetY);\n currentCtx.scale(scaleX, scaleY);\n currentCtx.save();\n }\n\n copyCtxState(currentCtx, groupCtx);\n this.ctx = groupCtx;\n this.setGState([[\"BM\", \"source-over\"], [\"ca\", 1], [\"CA\", 1]]);\n this.groupStack.push(currentCtx);\n this.groupLevel++;\n }\n }, {\n key: \"endGroup\",\n value: function endGroup(group) {\n if (!this.contentVisible) {\n return;\n }\n\n this.groupLevel--;\n var groupCtx = this.ctx;\n var ctx = this.groupStack.pop();\n this.ctx = ctx;\n this.ctx.imageSmoothingEnabled = false;\n\n if (group.smask) {\n this.tempSMask = this.smaskStack.pop();\n this.restore();\n } else {\n this.ctx.restore();\n var currentMtx = this.ctx.mozCurrentTransform;\n this.restore();\n this.ctx.save();\n this.ctx.setTransform.apply(this.ctx, currentMtx);\n\n var dirtyBox = _util.Util.getAxialAlignedBoundingBox([0, 0, groupCtx.canvas.width, groupCtx.canvas.height], currentMtx);\n\n this.ctx.drawImage(groupCtx.canvas, 0, 0);\n this.ctx.restore();\n this.compose(dirtyBox);\n }\n }\n }, {\n key: \"beginAnnotations\",\n value: function beginAnnotations() {\n this.save();\n\n if (this.baseTransform) {\n this.ctx.setTransform.apply(this.ctx, this.baseTransform);\n }\n }\n }, {\n key: \"endAnnotations\",\n value: function endAnnotations() {\n this.restore();\n }\n }, {\n key: \"beginAnnotation\",\n value: function beginAnnotation(id, rect, transform, matrix, hasOwnCanvas) {\n this.save();\n\n if (Array.isArray(rect) && rect.length === 4) {\n var width = rect[2] - rect[0];\n var height = rect[3] - rect[1];\n\n if (hasOwnCanvas && this.annotationCanvasMap) {\n transform = transform.slice();\n transform[4] -= rect[0];\n transform[5] -= rect[1];\n rect = rect.slice();\n rect[0] = rect[1] = 0;\n rect[2] = width;\n rect[3] = height;\n\n var _Util$singularValueDe = _util.Util.singularValueDecompose2dScale(this.ctx.mozCurrentTransform),\n _Util$singularValueDe2 = _slicedToArray(_Util$singularValueDe, 2),\n scaleX = _Util$singularValueDe2[0],\n scaleY = _Util$singularValueDe2[1];\n\n var viewportScale = this.viewportScale;\n var canvasWidth = Math.ceil(width * this.outputScaleX * viewportScale);\n var canvasHeight = Math.ceil(height * this.outputScaleY * viewportScale);\n this.annotationCanvas = this.canvasFactory.create(canvasWidth, canvasHeight);\n var _this$annotationCanva = this.annotationCanvas,\n canvas = _this$annotationCanva.canvas,\n context = _this$annotationCanva.context;\n var viewportScaleFactorStr = \"var(--zoom-factor) * \".concat(_display_utils.PixelsPerInch.PDF_TO_CSS_UNITS);\n canvas.style.width = \"calc(\".concat(width, \"px * \").concat(viewportScaleFactorStr, \")\");\n canvas.style.height = \"calc(\".concat(height, \"px * \").concat(viewportScaleFactorStr, \")\");\n this.annotationCanvasMap.set(id, canvas);\n this.annotationCanvas.savedCtx = this.ctx;\n this.ctx = context;\n this.ctx.setTransform(scaleX, 0, 0, -scaleY, 0, height * scaleY);\n addContextCurrentTransform(this.ctx);\n resetCtxToDefault(this.ctx, this.foregroundColor);\n } else {\n resetCtxToDefault(this.ctx, this.foregroundColor);\n this.ctx.rect(rect[0], rect[1], width, height);\n this.ctx.clip();\n this.endPath();\n }\n }\n\n this.current = new CanvasExtraState(this.ctx.canvas.width, this.ctx.canvas.height);\n this.transform.apply(this, transform);\n this.transform.apply(this, matrix);\n }\n }, {\n key: \"endAnnotation\",\n value: function endAnnotation() {\n if (this.annotationCanvas) {\n this.ctx = this.annotationCanvas.savedCtx;\n delete this.annotationCanvas.savedCtx;\n delete this.annotationCanvas;\n }\n\n this.restore();\n }\n }, {\n key: \"paintImageMaskXObject\",\n value: function paintImageMaskXObject(img) {\n if (!this.contentVisible) {\n return;\n }\n\n var count = img.count;\n img = this.getObject(img.data, img);\n img.count = count;\n var ctx = this.ctx;\n var glyph = this.processingType3;\n\n if (glyph) {\n if (glyph.compiled === undefined) {\n glyph.compiled = compileType3Glyph(img);\n }\n\n if (glyph.compiled) {\n glyph.compiled(ctx);\n return;\n }\n }\n\n var mask = this._createMaskCanvas(img);\n\n var maskCanvas = mask.canvas;\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(maskCanvas, mask.offsetX, mask.offsetY);\n ctx.restore();\n this.compose();\n }\n }, {\n key: \"paintImageMaskXObjectRepeat\",\n value: function paintImageMaskXObjectRepeat(img, scaleX) {\n var skewX = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var skewY = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var scaleY = arguments.length > 4 ? arguments[4] : undefined;\n var positions = arguments.length > 5 ? arguments[5] : undefined;\n\n if (!this.contentVisible) {\n return;\n }\n\n img = this.getObject(img.data, img);\n var ctx = this.ctx;\n ctx.save();\n var currentTransform = ctx.mozCurrentTransform;\n ctx.transform(scaleX, skewX, skewY, scaleY, 0, 0);\n\n var mask = this._createMaskCanvas(img);\n\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n\n for (var i = 0, ii = positions.length; i < ii; i += 2) {\n var trans = _util.Util.transform(currentTransform, [scaleX, skewX, skewY, scaleY, positions[i], positions[i + 1]]);\n\n var _Util$applyTransform3 = _util.Util.applyTransform([0, 0], trans),\n _Util$applyTransform4 = _slicedToArray(_Util$applyTransform3, 2),\n x = _Util$applyTransform4[0],\n y = _Util$applyTransform4[1];\n\n ctx.drawImage(mask.canvas, x, y);\n }\n\n ctx.restore();\n this.compose();\n }\n }, {\n key: \"paintImageMaskXObjectGroup\",\n value: function paintImageMaskXObjectGroup(images) {\n if (!this.contentVisible) {\n return;\n }\n\n var ctx = this.ctx;\n var fillColor = this.current.fillColor;\n var isPatternFill = this.current.patternFill;\n\n for (var i = 0, ii = images.length; i < ii; i++) {\n var image = images[i];\n var width = image.width,\n height = image.height;\n var maskCanvas = this.cachedCanvases.getCanvas(\"maskCanvas\", width, height, false);\n var maskCtx = maskCanvas.context;\n maskCtx.save();\n putBinaryImageMask(maskCtx, image);\n maskCtx.globalCompositeOperation = \"source-in\";\n maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this, ctx.mozCurrentTransformInverse, _pattern_helper.PathType.FILL) : fillColor;\n maskCtx.fillRect(0, 0, width, height);\n maskCtx.restore();\n ctx.save();\n ctx.transform.apply(ctx, image.transform);\n ctx.scale(1, -1);\n drawImageAtIntegerCoords(ctx, maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1);\n ctx.restore();\n }\n\n this.compose();\n }\n }, {\n key: \"paintImageXObject\",\n value: function paintImageXObject(objId) {\n if (!this.contentVisible) {\n return;\n }\n\n var imgData = this.getObject(objId);\n\n if (!imgData) {\n (0, _util.warn)(\"Dependent image isn't ready yet\");\n return;\n }\n\n this.paintInlineImageXObject(imgData);\n }\n }, {\n key: \"paintImageXObjectRepeat\",\n value: function paintImageXObjectRepeat(objId, scaleX, scaleY, positions) {\n if (!this.contentVisible) {\n return;\n }\n\n var imgData = this.getObject(objId);\n\n if (!imgData) {\n (0, _util.warn)(\"Dependent image isn't ready yet\");\n return;\n }\n\n var width = imgData.width;\n var height = imgData.height;\n var map = [];\n\n for (var i = 0, ii = positions.length; i < ii; i += 2) {\n map.push({\n transform: [scaleX, 0, 0, scaleY, positions[i], positions[i + 1]],\n x: 0,\n y: 0,\n w: width,\n h: height\n });\n }\n\n this.paintInlineImageXObjectGroup(imgData, map);\n }\n }, {\n key: \"paintInlineImageXObject\",\n value: function paintInlineImageXObject(imgData) {\n if (!this.contentVisible) {\n return;\n }\n\n var width = imgData.width;\n var height = imgData.height;\n var ctx = this.ctx;\n this.save();\n ctx.scale(1 / width, -1 / height);\n var imgToPaint;\n\n if (typeof HTMLElement === \"function\" && imgData instanceof HTMLElement || !imgData.data) {\n imgToPaint = imgData;\n } else {\n var tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", width, height, false);\n var tmpCtx = tmpCanvas.context;\n putBinaryImageData(tmpCtx, imgData, this.current.transferMaps);\n imgToPaint = tmpCanvas.canvas;\n }\n\n var scaled = this._scaleImage(imgToPaint, ctx.mozCurrentTransformInverse);\n\n ctx.imageSmoothingEnabled = getImageSmoothingEnabled(ctx.mozCurrentTransform, imgData.interpolate);\n\n var _drawImageAtIntegerCo = drawImageAtIntegerCoords(ctx, scaled.img, 0, 0, scaled.paintWidth, scaled.paintHeight, 0, -height, width, height),\n _drawImageAtIntegerCo2 = _slicedToArray(_drawImageAtIntegerCo, 2),\n rWidth = _drawImageAtIntegerCo2[0],\n rHeight = _drawImageAtIntegerCo2[1];\n\n if (this.imageLayer) {\n var position = this.getCanvasPosition(0, -height);\n this.imageLayer.appendImage({\n imgData: imgData,\n left: position[0],\n top: position[1],\n width: rWidth,\n height: rHeight\n });\n }\n\n this.compose();\n this.restore();\n }\n }, {\n key: \"paintInlineImageXObjectGroup\",\n value: function paintInlineImageXObjectGroup(imgData, map) {\n if (!this.contentVisible) {\n return;\n }\n\n var ctx = this.ctx;\n var w = imgData.width;\n var h = imgData.height;\n var tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", w, h, false);\n var tmpCtx = tmpCanvas.context;\n putBinaryImageData(tmpCtx, imgData, this.current.transferMaps);\n\n for (var i = 0, ii = map.length; i < ii; i++) {\n var entry = map[i];\n ctx.save();\n ctx.transform.apply(ctx, entry.transform);\n ctx.scale(1, -1);\n drawImageAtIntegerCoords(ctx, tmpCanvas.canvas, entry.x, entry.y, entry.w, entry.h, 0, -1, 1, 1);\n\n if (this.imageLayer) {\n var position = this.getCanvasPosition(entry.x, entry.y);\n this.imageLayer.appendImage({\n imgData: imgData,\n left: position[0],\n top: position[1],\n width: w,\n height: h\n });\n }\n\n ctx.restore();\n }\n\n this.compose();\n }\n }, {\n key: \"paintSolidColorImageMask\",\n value: function paintSolidColorImageMask() {\n if (!this.contentVisible) {\n return;\n }\n\n this.ctx.fillRect(0, 0, 1, 1);\n this.compose();\n }\n }, {\n key: \"markPoint\",\n value: function markPoint(tag) {}\n }, {\n key: \"markPointProps\",\n value: function markPointProps(tag, properties) {}\n }, {\n key: \"beginMarkedContent\",\n value: function beginMarkedContent(tag) {\n this.markedContentStack.push({\n visible: true\n });\n }\n }, {\n key: \"beginMarkedContentProps\",\n value: function beginMarkedContentProps(tag, properties) {\n if (tag === \"OC\") {\n this.markedContentStack.push({\n visible: this.optionalContentConfig.isVisible(properties)\n });\n } else {\n this.markedContentStack.push({\n visible: true\n });\n }\n\n this.contentVisible = this.isContentVisible();\n }\n }, {\n key: \"endMarkedContent\",\n value: function endMarkedContent() {\n this.markedContentStack.pop();\n this.contentVisible = this.isContentVisible();\n }\n }, {\n key: \"beginCompat\",\n value: function beginCompat() {}\n }, {\n key: \"endCompat\",\n value: function endCompat() {}\n }, {\n key: \"consumePath\",\n value: function consumePath(clipBox) {\n var isEmpty = this.current.isEmptyClip();\n\n if (this.pendingClip) {\n this.current.updateClipFromPath();\n }\n\n if (!this.pendingClip) {\n this.compose(clipBox);\n }\n\n var ctx = this.ctx;\n\n if (this.pendingClip) {\n if (!isEmpty) {\n if (this.pendingClip === EO_CLIP) {\n ctx.clip(\"evenodd\");\n } else {\n ctx.clip();\n }\n }\n\n this.pendingClip = null;\n }\n\n this.current.startNewPathAndClipBox(this.current.clipBox);\n ctx.beginPath();\n }\n }, {\n key: \"getSinglePixelWidth\",\n value: function getSinglePixelWidth() {\n if (!this._cachedGetSinglePixelWidth) {\n var m = this.ctx.mozCurrentTransform;\n\n if (m[1] === 0 && m[2] === 0) {\n this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(m[0]), Math.abs(m[3]));\n } else {\n var absDet = Math.abs(m[0] * m[3] - m[2] * m[1]);\n var normX = Math.hypot(m[0], m[2]);\n var normY = Math.hypot(m[1], m[3]);\n this._cachedGetSinglePixelWidth = Math.max(normX, normY) / absDet;\n }\n }\n\n return this._cachedGetSinglePixelWidth;\n }\n }, {\n key: \"getScaleForStroking\",\n value: function getScaleForStroking() {\n if (!this._cachedScaleForStroking) {\n var lineWidth = this.current.lineWidth;\n var m = this.ctx.mozCurrentTransform;\n var scaleX, scaleY;\n\n if (m[1] === 0 && m[2] === 0) {\n var normX = Math.abs(m[0]);\n var normY = Math.abs(m[3]);\n\n if (lineWidth === 0) {\n scaleX = 1 / normX;\n scaleY = 1 / normY;\n } else {\n var scaledXLineWidth = normX * lineWidth;\n var scaledYLineWidth = normY * lineWidth;\n scaleX = scaledXLineWidth < 1 ? 1 / scaledXLineWidth : 1;\n scaleY = scaledYLineWidth < 1 ? 1 / scaledYLineWidth : 1;\n }\n } else {\n var absDet = Math.abs(m[0] * m[3] - m[2] * m[1]);\n\n var _normX = Math.hypot(m[0], m[1]);\n\n var _normY = Math.hypot(m[2], m[3]);\n\n if (lineWidth === 0) {\n scaleX = _normY / absDet;\n scaleY = _normX / absDet;\n } else {\n var baseArea = lineWidth * absDet;\n scaleX = _normY > baseArea ? _normY / baseArea : 1;\n scaleY = _normX > baseArea ? _normX / baseArea : 1;\n }\n }\n\n this._cachedScaleForStroking = [scaleX, scaleY];\n }\n\n return this._cachedScaleForStroking;\n }\n }, {\n key: \"rescaleAndStroke\",\n value: function rescaleAndStroke(saveRestore) {\n var ctx = this.ctx;\n var lineWidth = this.current.lineWidth;\n\n var _this$getScaleForStro = this.getScaleForStroking(),\n _this$getScaleForStro2 = _slicedToArray(_this$getScaleForStro, 2),\n scaleX = _this$getScaleForStro2[0],\n scaleY = _this$getScaleForStro2[1];\n\n ctx.lineWidth = lineWidth || 1;\n\n if (scaleX === 1 && scaleY === 1) {\n ctx.stroke();\n return;\n }\n\n var savedMatrix, savedDashes, savedDashOffset;\n\n if (saveRestore) {\n savedMatrix = ctx.mozCurrentTransform.slice();\n savedDashes = ctx.getLineDash().slice();\n savedDashOffset = ctx.lineDashOffset;\n }\n\n ctx.scale(scaleX, scaleY);\n var scale = Math.max(scaleX, scaleY);\n ctx.setLineDash(ctx.getLineDash().map(function (x) {\n return x / scale;\n }));\n ctx.lineDashOffset /= scale;\n ctx.stroke();\n\n if (saveRestore) {\n ctx.setTransform.apply(ctx, _toConsumableArray(savedMatrix));\n ctx.setLineDash(savedDashes);\n ctx.lineDashOffset = savedDashOffset;\n }\n }\n }, {\n key: \"getCanvasPosition\",\n value: function getCanvasPosition(x, y) {\n var transform = this.ctx.mozCurrentTransform;\n return [transform[0] * x + transform[2] * y + transform[4], transform[1] * x + transform[3] * y + transform[5]];\n }\n }, {\n key: \"isContentVisible\",\n value: function isContentVisible() {\n for (var i = this.markedContentStack.length - 1; i >= 0; i--) {\n if (!this.markedContentStack[i].visible) {\n return false;\n }\n }\n\n return true;\n }\n }]);\n\n return CanvasGraphics;\n}();\n\nexports.CanvasGraphics = CanvasGraphics;\n\nfor (var op in _util.OPS) {\n if (CanvasGraphics.prototype[op] !== undefined) {\n CanvasGraphics.prototype[_util.OPS[op]] = CanvasGraphics.prototype[op];\n }\n}\n\n/***/ }),\n/* 164 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.TilingPattern = exports.PathType = void 0;\nexports.getShadingPattern = getShadingPattern;\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _is_node = __w_pdfjs_require__(3);\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar PathType = {\n FILL: \"Fill\",\n STROKE: \"Stroke\",\n SHADING: \"Shading\"\n};\nexports.PathType = PathType;\n\nfunction applyBoundingBox(ctx, bbox) {\n if (!bbox || _is_node.isNodeJS) {\n return;\n }\n\n var width = bbox[2] - bbox[0];\n var height = bbox[3] - bbox[1];\n var region = new Path2D();\n region.rect(bbox[0], bbox[1], width, height);\n ctx.clip(region);\n}\n\nvar BaseShadingPattern = /*#__PURE__*/function () {\n function BaseShadingPattern() {\n _classCallCheck(this, BaseShadingPattern);\n\n if (this.constructor === BaseShadingPattern) {\n (0, _util.unreachable)(\"Cannot initialize BaseShadingPattern.\");\n }\n }\n\n _createClass(BaseShadingPattern, [{\n key: \"getPattern\",\n value: function getPattern() {\n (0, _util.unreachable)(\"Abstract method `getPattern` called.\");\n }\n }]);\n\n return BaseShadingPattern;\n}();\n\nvar RadialAxialShadingPattern = /*#__PURE__*/function (_BaseShadingPattern) {\n _inherits(RadialAxialShadingPattern, _BaseShadingPattern);\n\n var _super = _createSuper(RadialAxialShadingPattern);\n\n function RadialAxialShadingPattern(IR) {\n var _this;\n\n _classCallCheck(this, RadialAxialShadingPattern);\n\n _this = _super.call(this);\n _this._type = IR[1];\n _this._bbox = IR[2];\n _this._colorStops = IR[3];\n _this._p0 = IR[4];\n _this._p1 = IR[5];\n _this._r0 = IR[6];\n _this._r1 = IR[7];\n _this.matrix = null;\n return _this;\n }\n\n _createClass(RadialAxialShadingPattern, [{\n key: \"_createGradient\",\n value: function _createGradient(ctx) {\n var grad;\n\n if (this._type === \"axial\") {\n grad = ctx.createLinearGradient(this._p0[0], this._p0[1], this._p1[0], this._p1[1]);\n } else if (this._type === \"radial\") {\n grad = ctx.createRadialGradient(this._p0[0], this._p0[1], this._r0, this._p1[0], this._p1[1], this._r1);\n }\n\n var _iterator = _createForOfIteratorHelper(this._colorStops),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var colorStop = _step.value;\n grad.addColorStop(colorStop[0], colorStop[1]);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return grad;\n }\n }, {\n key: \"getPattern\",\n value: function getPattern(ctx, owner, inverse, pathType) {\n var pattern;\n\n if (pathType === PathType.STROKE || pathType === PathType.FILL) {\n var ownerBBox = owner.current.getClippedPathBoundingBox(pathType, ctx.mozCurrentTransform) || [0, 0, 0, 0];\n var width = Math.ceil(ownerBBox[2] - ownerBBox[0]) || 1;\n var height = Math.ceil(ownerBBox[3] - ownerBBox[1]) || 1;\n var tmpCanvas = owner.cachedCanvases.getCanvas(\"pattern\", width, height, true);\n var tmpCtx = tmpCanvas.context;\n tmpCtx.clearRect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n tmpCtx.beginPath();\n tmpCtx.rect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n tmpCtx.translate(-ownerBBox[0], -ownerBBox[1]);\n inverse = _util.Util.transform(inverse, [1, 0, 0, 1, ownerBBox[0], ownerBBox[1]]);\n tmpCtx.transform.apply(tmpCtx, owner.baseTransform);\n\n if (this.matrix) {\n tmpCtx.transform.apply(tmpCtx, this.matrix);\n }\n\n applyBoundingBox(tmpCtx, this._bbox);\n tmpCtx.fillStyle = this._createGradient(tmpCtx);\n tmpCtx.fill();\n pattern = ctx.createPattern(tmpCanvas.canvas, \"no-repeat\");\n var domMatrix = new DOMMatrix(inverse);\n\n try {\n pattern.setTransform(domMatrix);\n } catch (ex) {\n (0, _util.warn)(\"RadialAxialShadingPattern.getPattern: \\\"\".concat(ex === null || ex === void 0 ? void 0 : ex.message, \"\\\".\"));\n }\n } else {\n applyBoundingBox(ctx, this._bbox);\n pattern = this._createGradient(ctx);\n }\n\n return pattern;\n }\n }]);\n\n return RadialAxialShadingPattern;\n}(BaseShadingPattern);\n\nfunction drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {\n var coords = context.coords,\n colors = context.colors;\n var bytes = data.data,\n rowSize = data.width * 4;\n var tmp;\n\n if (coords[p1 + 1] > coords[p2 + 1]) {\n tmp = p1;\n p1 = p2;\n p2 = tmp;\n tmp = c1;\n c1 = c2;\n c2 = tmp;\n }\n\n if (coords[p2 + 1] > coords[p3 + 1]) {\n tmp = p2;\n p2 = p3;\n p3 = tmp;\n tmp = c2;\n c2 = c3;\n c3 = tmp;\n }\n\n if (coords[p1 + 1] > coords[p2 + 1]) {\n tmp = p1;\n p1 = p2;\n p2 = tmp;\n tmp = c1;\n c1 = c2;\n c2 = tmp;\n }\n\n var x1 = (coords[p1] + context.offsetX) * context.scaleX;\n var y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY;\n var x2 = (coords[p2] + context.offsetX) * context.scaleX;\n var y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY;\n var x3 = (coords[p3] + context.offsetX) * context.scaleX;\n var y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY;\n\n if (y1 >= y3) {\n return;\n }\n\n var c1r = colors[c1],\n c1g = colors[c1 + 1],\n c1b = colors[c1 + 2];\n var c2r = colors[c2],\n c2g = colors[c2 + 1],\n c2b = colors[c2 + 2];\n var c3r = colors[c3],\n c3g = colors[c3 + 1],\n c3b = colors[c3 + 2];\n var minY = Math.round(y1),\n maxY = Math.round(y3);\n var xa, car, cag, cab;\n var xb, cbr, cbg, cbb;\n\n for (var y = minY; y <= maxY; y++) {\n if (y < y2) {\n var _k = void 0;\n\n if (y < y1) {\n _k = 0;\n } else {\n _k = (y1 - y) / (y1 - y2);\n }\n\n xa = x1 - (x1 - x2) * _k;\n car = c1r - (c1r - c2r) * _k;\n cag = c1g - (c1g - c2g) * _k;\n cab = c1b - (c1b - c2b) * _k;\n } else {\n var _k2 = void 0;\n\n if (y > y3) {\n _k2 = 1;\n } else if (y2 === y3) {\n _k2 = 0;\n } else {\n _k2 = (y2 - y) / (y2 - y3);\n }\n\n xa = x2 - (x2 - x3) * _k2;\n car = c2r - (c2r - c3r) * _k2;\n cag = c2g - (c2g - c3g) * _k2;\n cab = c2b - (c2b - c3b) * _k2;\n }\n\n var k = void 0;\n\n if (y < y1) {\n k = 0;\n } else if (y > y3) {\n k = 1;\n } else {\n k = (y1 - y) / (y1 - y3);\n }\n\n xb = x1 - (x1 - x3) * k;\n cbr = c1r - (c1r - c3r) * k;\n cbg = c1g - (c1g - c3g) * k;\n cbb = c1b - (c1b - c3b) * k;\n var x1_ = Math.round(Math.min(xa, xb));\n var x2_ = Math.round(Math.max(xa, xb));\n var j = rowSize * y + x1_ * 4;\n\n for (var x = x1_; x <= x2_; x++) {\n k = (xa - x) / (xa - xb);\n\n if (k < 0) {\n k = 0;\n } else if (k > 1) {\n k = 1;\n }\n\n bytes[j++] = car - (car - cbr) * k | 0;\n bytes[j++] = cag - (cag - cbg) * k | 0;\n bytes[j++] = cab - (cab - cbb) * k | 0;\n bytes[j++] = 255;\n }\n }\n}\n\nfunction drawFigure(data, figure, context) {\n var ps = figure.coords;\n var cs = figure.colors;\n var i, ii;\n\n switch (figure.type) {\n case \"lattice\":\n var verticesPerRow = figure.verticesPerRow;\n var rows = Math.floor(ps.length / verticesPerRow) - 1;\n var cols = verticesPerRow - 1;\n\n for (i = 0; i < rows; i++) {\n var q = i * verticesPerRow;\n\n for (var j = 0; j < cols; j++, q++) {\n drawTriangle(data, context, ps[q], ps[q + 1], ps[q + verticesPerRow], cs[q], cs[q + 1], cs[q + verticesPerRow]);\n drawTriangle(data, context, ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow], cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]);\n }\n }\n\n break;\n\n case \"triangles\":\n for (i = 0, ii = ps.length; i < ii; i += 3) {\n drawTriangle(data, context, ps[i], ps[i + 1], ps[i + 2], cs[i], cs[i + 1], cs[i + 2]);\n }\n\n break;\n\n default:\n throw new Error(\"illegal figure\");\n }\n}\n\nvar MeshShadingPattern = /*#__PURE__*/function (_BaseShadingPattern2) {\n _inherits(MeshShadingPattern, _BaseShadingPattern2);\n\n var _super2 = _createSuper(MeshShadingPattern);\n\n function MeshShadingPattern(IR) {\n var _this2;\n\n _classCallCheck(this, MeshShadingPattern);\n\n _this2 = _super2.call(this);\n _this2._coords = IR[2];\n _this2._colors = IR[3];\n _this2._figures = IR[4];\n _this2._bounds = IR[5];\n _this2._bbox = IR[7];\n _this2._background = IR[8];\n _this2.matrix = null;\n return _this2;\n }\n\n _createClass(MeshShadingPattern, [{\n key: \"_createMeshCanvas\",\n value: function _createMeshCanvas(combinedScale, backgroundColor, cachedCanvases) {\n var EXPECTED_SCALE = 1.1;\n var MAX_PATTERN_SIZE = 3000;\n var BORDER_SIZE = 2;\n var offsetX = Math.floor(this._bounds[0]);\n var offsetY = Math.floor(this._bounds[1]);\n var boundsWidth = Math.ceil(this._bounds[2]) - offsetX;\n var boundsHeight = Math.ceil(this._bounds[3]) - offsetY;\n var width = Math.min(Math.ceil(Math.abs(boundsWidth * combinedScale[0] * EXPECTED_SCALE)), MAX_PATTERN_SIZE);\n var height = Math.min(Math.ceil(Math.abs(boundsHeight * combinedScale[1] * EXPECTED_SCALE)), MAX_PATTERN_SIZE);\n var scaleX = boundsWidth / width;\n var scaleY = boundsHeight / height;\n var context = {\n coords: this._coords,\n colors: this._colors,\n offsetX: -offsetX,\n offsetY: -offsetY,\n scaleX: 1 / scaleX,\n scaleY: 1 / scaleY\n };\n var paddedWidth = width + BORDER_SIZE * 2;\n var paddedHeight = height + BORDER_SIZE * 2;\n var tmpCanvas = cachedCanvases.getCanvas(\"mesh\", paddedWidth, paddedHeight, false);\n var tmpCtx = tmpCanvas.context;\n var data = tmpCtx.createImageData(width, height);\n\n if (backgroundColor) {\n var bytes = data.data;\n\n for (var i = 0, ii = bytes.length; i < ii; i += 4) {\n bytes[i] = backgroundColor[0];\n bytes[i + 1] = backgroundColor[1];\n bytes[i + 2] = backgroundColor[2];\n bytes[i + 3] = 255;\n }\n }\n\n var _iterator2 = _createForOfIteratorHelper(this._figures),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var figure = _step2.value;\n drawFigure(data, figure, context);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE);\n var canvas = tmpCanvas.canvas;\n return {\n canvas: canvas,\n offsetX: offsetX - BORDER_SIZE * scaleX,\n offsetY: offsetY - BORDER_SIZE * scaleY,\n scaleX: scaleX,\n scaleY: scaleY\n };\n }\n }, {\n key: \"getPattern\",\n value: function getPattern(ctx, owner, inverse, pathType) {\n applyBoundingBox(ctx, this._bbox);\n var scale;\n\n if (pathType === PathType.SHADING) {\n scale = _util.Util.singularValueDecompose2dScale(ctx.mozCurrentTransform);\n } else {\n scale = _util.Util.singularValueDecompose2dScale(owner.baseTransform);\n\n if (this.matrix) {\n var matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix);\n\n scale = [scale[0] * matrixScale[0], scale[1] * matrixScale[1]];\n }\n }\n\n var temporaryPatternCanvas = this._createMeshCanvas(scale, pathType === PathType.SHADING ? null : this._background, owner.cachedCanvases);\n\n if (pathType !== PathType.SHADING) {\n ctx.setTransform.apply(ctx, owner.baseTransform);\n\n if (this.matrix) {\n ctx.transform.apply(ctx, this.matrix);\n }\n }\n\n ctx.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY);\n ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY);\n return ctx.createPattern(temporaryPatternCanvas.canvas, \"no-repeat\");\n }\n }]);\n\n return MeshShadingPattern;\n}(BaseShadingPattern);\n\nvar DummyShadingPattern = /*#__PURE__*/function (_BaseShadingPattern3) {\n _inherits(DummyShadingPattern, _BaseShadingPattern3);\n\n var _super3 = _createSuper(DummyShadingPattern);\n\n function DummyShadingPattern() {\n _classCallCheck(this, DummyShadingPattern);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(DummyShadingPattern, [{\n key: \"getPattern\",\n value: function getPattern() {\n return \"hotpink\";\n }\n }]);\n\n return DummyShadingPattern;\n}(BaseShadingPattern);\n\nfunction getShadingPattern(IR) {\n switch (IR[0]) {\n case \"RadialAxial\":\n return new RadialAxialShadingPattern(IR);\n\n case \"Mesh\":\n return new MeshShadingPattern(IR);\n\n case \"Dummy\":\n return new DummyShadingPattern();\n }\n\n throw new Error(\"Unknown IR type: \".concat(IR[0]));\n}\n\nvar PaintType = {\n COLORED: 1,\n UNCOLORED: 2\n};\n\nvar TilingPattern = /*#__PURE__*/function () {\n function TilingPattern(IR, color, ctx, canvasGraphicsFactory, baseTransform) {\n _classCallCheck(this, TilingPattern);\n\n this.operatorList = IR[2];\n this.matrix = IR[3] || [1, 0, 0, 1, 0, 0];\n this.bbox = IR[4];\n this.xstep = IR[5];\n this.ystep = IR[6];\n this.paintType = IR[7];\n this.tilingType = IR[8];\n this.color = color;\n this.ctx = ctx;\n this.canvasGraphicsFactory = canvasGraphicsFactory;\n this.baseTransform = baseTransform;\n }\n\n _createClass(TilingPattern, [{\n key: \"createPatternCanvas\",\n value: function createPatternCanvas(owner) {\n var operatorList = this.operatorList;\n var bbox = this.bbox;\n var xstep = this.xstep;\n var ystep = this.ystep;\n var paintType = this.paintType;\n var tilingType = this.tilingType;\n var color = this.color;\n var canvasGraphicsFactory = this.canvasGraphicsFactory;\n (0, _util.info)(\"TilingType: \" + tilingType);\n var x0 = bbox[0],\n y0 = bbox[1],\n x1 = bbox[2],\n y1 = bbox[3];\n\n var matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix);\n\n var curMatrixScale = _util.Util.singularValueDecompose2dScale(this.baseTransform);\n\n var combinedScale = [matrixScale[0] * curMatrixScale[0], matrixScale[1] * curMatrixScale[1]];\n var dimx = this.getSizeAndScale(xstep, this.ctx.canvas.width, combinedScale[0]);\n var dimy = this.getSizeAndScale(ystep, this.ctx.canvas.height, combinedScale[1]);\n var tmpCanvas = owner.cachedCanvases.getCanvas(\"pattern\", dimx.size, dimy.size, true);\n var tmpCtx = tmpCanvas.context;\n var graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx);\n graphics.groupLevel = owner.groupLevel;\n this.setFillAndStrokeStyleToContext(graphics, paintType, color);\n var adjustedX0 = x0;\n var adjustedY0 = y0;\n var adjustedX1 = x1;\n var adjustedY1 = y1;\n\n if (x0 < 0) {\n adjustedX0 = 0;\n adjustedX1 += Math.abs(x0);\n }\n\n if (y0 < 0) {\n adjustedY0 = 0;\n adjustedY1 += Math.abs(y0);\n }\n\n tmpCtx.translate(-(dimx.scale * adjustedX0), -(dimy.scale * adjustedY0));\n graphics.transform(dimx.scale, 0, 0, dimy.scale, 0, 0);\n tmpCtx.save();\n this.clipBbox(graphics, adjustedX0, adjustedY0, adjustedX1, adjustedY1);\n graphics.baseTransform = graphics.ctx.mozCurrentTransform.slice();\n graphics.executeOperatorList(operatorList);\n graphics.endDrawing();\n return {\n canvas: tmpCanvas.canvas,\n scaleX: dimx.scale,\n scaleY: dimy.scale,\n offsetX: adjustedX0,\n offsetY: adjustedY0\n };\n }\n }, {\n key: \"getSizeAndScale\",\n value: function getSizeAndScale(step, realOutputSize, scale) {\n step = Math.abs(step);\n var maxSize = Math.max(TilingPattern.MAX_PATTERN_SIZE, realOutputSize);\n var size = Math.ceil(step * scale);\n\n if (size >= maxSize) {\n size = maxSize;\n } else {\n scale = size / step;\n }\n\n return {\n scale: scale,\n size: size\n };\n }\n }, {\n key: \"clipBbox\",\n value: function clipBbox(graphics, x0, y0, x1, y1) {\n var bboxWidth = x1 - x0;\n var bboxHeight = y1 - y0;\n graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);\n graphics.current.updateRectMinMax(graphics.ctx.mozCurrentTransform, [x0, y0, x1, y1]);\n graphics.clip();\n graphics.endPath();\n }\n }, {\n key: \"setFillAndStrokeStyleToContext\",\n value: function setFillAndStrokeStyleToContext(graphics, paintType, color) {\n var context = graphics.ctx,\n current = graphics.current;\n\n switch (paintType) {\n case PaintType.COLORED:\n var ctx = this.ctx;\n context.fillStyle = ctx.fillStyle;\n context.strokeStyle = ctx.strokeStyle;\n current.fillColor = ctx.fillStyle;\n current.strokeColor = ctx.strokeStyle;\n break;\n\n case PaintType.UNCOLORED:\n var cssColor = _util.Util.makeHexColor(color[0], color[1], color[2]);\n\n context.fillStyle = cssColor;\n context.strokeStyle = cssColor;\n current.fillColor = cssColor;\n current.strokeColor = cssColor;\n break;\n\n default:\n throw new _util.FormatError(\"Unsupported paint type: \".concat(paintType));\n }\n }\n }, {\n key: \"getPattern\",\n value: function getPattern(ctx, owner, inverse, pathType) {\n var matrix = inverse;\n\n if (pathType !== PathType.SHADING) {\n matrix = _util.Util.transform(matrix, owner.baseTransform);\n\n if (this.matrix) {\n matrix = _util.Util.transform(matrix, this.matrix);\n }\n }\n\n var temporaryPatternCanvas = this.createPatternCanvas(owner);\n var domMatrix = new DOMMatrix(matrix);\n domMatrix = domMatrix.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY);\n domMatrix = domMatrix.scale(1 / temporaryPatternCanvas.scaleX, 1 / temporaryPatternCanvas.scaleY);\n var pattern = ctx.createPattern(temporaryPatternCanvas.canvas, \"repeat\");\n\n try {\n pattern.setTransform(domMatrix);\n } catch (ex) {\n (0, _util.warn)(\"TilingPattern.getPattern: \\\"\".concat(ex === null || ex === void 0 ? void 0 : ex.message, \"\\\".\"));\n }\n\n return pattern;\n }\n }], [{\n key: \"MAX_PATTERN_SIZE\",\n get: function get() {\n return (0, _util.shadow)(this, \"MAX_PATTERN_SIZE\", 3000);\n }\n }]);\n\n return TilingPattern;\n}();\n\nexports.TilingPattern = TilingPattern;\n\n/***/ }),\n/* 165 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.applyMaskImageData = applyMaskImageData;\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction applyMaskImageData(_ref) {\n var src = _ref.src,\n _ref$srcPos = _ref.srcPos,\n srcPos = _ref$srcPos === void 0 ? 0 : _ref$srcPos,\n dest = _ref.dest,\n _ref$destPos = _ref.destPos,\n destPos = _ref$destPos === void 0 ? 0 : _ref$destPos,\n width = _ref.width,\n height = _ref.height,\n _ref$inverseDecode = _ref.inverseDecode,\n inverseDecode = _ref$inverseDecode === void 0 ? false : _ref$inverseDecode;\n var opaque = _util.FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n\n var _ref2 = !inverseDecode ? [opaque, 0] : [0, opaque],\n _ref3 = _slicedToArray(_ref2, 2),\n zeroMapping = _ref3[0],\n oneMapping = _ref3[1];\n\n var widthInSource = width >> 3;\n var widthRemainder = width & 7;\n var srcLength = src.length;\n dest = new Uint32Array(dest.buffer);\n\n for (var i = 0; i < height; i++) {\n for (var max = srcPos + widthInSource; srcPos < max; srcPos++) {\n var _elem = srcPos < srcLength ? src[srcPos] : 255;\n\n dest[destPos++] = _elem & 128 ? oneMapping : zeroMapping;\n dest[destPos++] = _elem & 64 ? oneMapping : zeroMapping;\n dest[destPos++] = _elem & 32 ? oneMapping : zeroMapping;\n dest[destPos++] = _elem & 16 ? oneMapping : zeroMapping;\n dest[destPos++] = _elem & 8 ? oneMapping : zeroMapping;\n dest[destPos++] = _elem & 4 ? oneMapping : zeroMapping;\n dest[destPos++] = _elem & 2 ? oneMapping : zeroMapping;\n dest[destPos++] = _elem & 1 ? oneMapping : zeroMapping;\n }\n\n if (widthRemainder === 0) {\n continue;\n }\n\n var elem = srcPos < srcLength ? src[srcPos++] : 255;\n\n for (var j = 0; j < widthRemainder; j++) {\n dest[destPos++] = elem & 1 << 7 - j ? oneMapping : zeroMapping;\n }\n }\n\n return {\n srcPos: srcPos,\n destPos: destPos\n };\n}\n\n/***/ }),\n/* 166 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.GlobalWorkerOptions = void 0;\nvar GlobalWorkerOptions = Object.create(null);\nexports.GlobalWorkerOptions = GlobalWorkerOptions;\nGlobalWorkerOptions.workerPort = GlobalWorkerOptions.workerPort === undefined ? null : GlobalWorkerOptions.workerPort;\nGlobalWorkerOptions.workerSrc = GlobalWorkerOptions.workerSrc === undefined ? \"\" : GlobalWorkerOptions.workerSrc;\n\n/***/ }),\n/* 167 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.MessageHandler = void 0;\n\nvar _regenerator = _interopRequireDefault(__w_pdfjs_require__(156));\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar CallbackKind = {\n UNKNOWN: 0,\n DATA: 1,\n ERROR: 2\n};\nvar StreamKind = {\n UNKNOWN: 0,\n CANCEL: 1,\n CANCEL_COMPLETE: 2,\n CLOSE: 3,\n ENQUEUE: 4,\n ERROR: 5,\n PULL: 6,\n PULL_COMPLETE: 7,\n START_COMPLETE: 8\n};\n\nfunction wrapReason(reason) {\n if (!(reason instanceof Error || _typeof(reason) === \"object\" && reason !== null)) {\n (0, _util.unreachable)('wrapReason: Expected \"reason\" to be a (possibly cloned) Error.');\n }\n\n switch (reason.name) {\n case \"AbortException\":\n return new _util.AbortException(reason.message);\n\n case \"MissingPDFException\":\n return new _util.MissingPDFException(reason.message);\n\n case \"PasswordException\":\n return new _util.PasswordException(reason.message, reason.code);\n\n case \"UnexpectedResponseException\":\n return new _util.UnexpectedResponseException(reason.message, reason.status);\n\n case \"UnknownErrorException\":\n return new _util.UnknownErrorException(reason.message, reason.details);\n\n default:\n return new _util.UnknownErrorException(reason.message, reason.toString());\n }\n}\n\nvar MessageHandler = /*#__PURE__*/function () {\n function MessageHandler(sourceName, targetName, comObj) {\n var _this = this;\n\n _classCallCheck(this, MessageHandler);\n\n this.sourceName = sourceName;\n this.targetName = targetName;\n this.comObj = comObj;\n this.callbackId = 1;\n this.streamId = 1;\n this.streamSinks = Object.create(null);\n this.streamControllers = Object.create(null);\n this.callbackCapabilities = Object.create(null);\n this.actionHandler = Object.create(null);\n\n this._onComObjOnMessage = function (event) {\n var data = event.data;\n\n if (data.targetName !== _this.sourceName) {\n return;\n }\n\n if (data.stream) {\n _this._processStreamMessage(data);\n\n return;\n }\n\n if (data.callback) {\n var callbackId = data.callbackId;\n var capability = _this.callbackCapabilities[callbackId];\n\n if (!capability) {\n throw new Error(\"Cannot resolve callback \".concat(callbackId));\n }\n\n delete _this.callbackCapabilities[callbackId];\n\n if (data.callback === CallbackKind.DATA) {\n capability.resolve(data.data);\n } else if (data.callback === CallbackKind.ERROR) {\n capability.reject(wrapReason(data.reason));\n } else {\n throw new Error(\"Unexpected callback case\");\n }\n\n return;\n }\n\n var action = _this.actionHandler[data.action];\n\n if (!action) {\n throw new Error(\"Unknown action from worker: \".concat(data.action));\n }\n\n if (data.callbackId) {\n var cbSourceName = _this.sourceName;\n var cbTargetName = data.sourceName;\n new Promise(function (resolve) {\n resolve(action(data.data));\n }).then(function (result) {\n comObj.postMessage({\n sourceName: cbSourceName,\n targetName: cbTargetName,\n callback: CallbackKind.DATA,\n callbackId: data.callbackId,\n data: result\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName: cbSourceName,\n targetName: cbTargetName,\n callback: CallbackKind.ERROR,\n callbackId: data.callbackId,\n reason: wrapReason(reason)\n });\n });\n return;\n }\n\n if (data.streamId) {\n _this._createStreamSink(data);\n\n return;\n }\n\n action(data.data);\n };\n\n comObj.addEventListener(\"message\", this._onComObjOnMessage);\n }\n\n _createClass(MessageHandler, [{\n key: \"on\",\n value: function on(actionName, handler) {\n var ah = this.actionHandler;\n\n if (ah[actionName]) {\n throw new Error(\"There is already an actionName called \\\"\".concat(actionName, \"\\\"\"));\n }\n\n ah[actionName] = handler;\n }\n }, {\n key: \"send\",\n value: function send(actionName, data, transfers) {\n this.comObj.postMessage({\n sourceName: this.sourceName,\n targetName: this.targetName,\n action: actionName,\n data: data\n }, transfers);\n }\n }, {\n key: \"sendWithPromise\",\n value: function sendWithPromise(actionName, data, transfers) {\n var callbackId = this.callbackId++;\n var capability = (0, _util.createPromiseCapability)();\n this.callbackCapabilities[callbackId] = capability;\n\n try {\n this.comObj.postMessage({\n sourceName: this.sourceName,\n targetName: this.targetName,\n action: actionName,\n callbackId: callbackId,\n data: data\n }, transfers);\n } catch (ex) {\n capability.reject(ex);\n }\n\n return capability.promise;\n }\n }, {\n key: \"sendWithStream\",\n value: function sendWithStream(actionName, data, queueingStrategy, transfers) {\n var _this2 = this;\n\n var streamId = this.streamId++,\n sourceName = this.sourceName,\n targetName = this.targetName,\n comObj = this.comObj;\n return new ReadableStream({\n start: function start(controller) {\n var startCapability = (0, _util.createPromiseCapability)();\n _this2.streamControllers[streamId] = {\n controller: controller,\n startCall: startCapability,\n pullCall: null,\n cancelCall: null,\n isClosed: false\n };\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n action: actionName,\n streamId: streamId,\n data: data,\n desiredSize: controller.desiredSize\n }, transfers);\n return startCapability.promise;\n },\n pull: function pull(controller) {\n var pullCapability = (0, _util.createPromiseCapability)();\n _this2.streamControllers[streamId].pullCall = pullCapability;\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.PULL,\n streamId: streamId,\n desiredSize: controller.desiredSize\n });\n return pullCapability.promise;\n },\n cancel: function cancel(reason) {\n (0, _util.assert)(reason instanceof Error, \"cancel must have a valid reason\");\n var cancelCapability = (0, _util.createPromiseCapability)();\n _this2.streamControllers[streamId].cancelCall = cancelCapability;\n _this2.streamControllers[streamId].isClosed = true;\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.CANCEL,\n streamId: streamId,\n reason: wrapReason(reason)\n });\n return cancelCapability.promise;\n }\n }, queueingStrategy);\n }\n }, {\n key: \"_createStreamSink\",\n value: function _createStreamSink(data) {\n var streamId = data.streamId,\n sourceName = this.sourceName,\n targetName = data.sourceName,\n comObj = this.comObj;\n var self = this,\n action = this.actionHandler[data.action];\n var streamSink = {\n enqueue: function enqueue(chunk) {\n var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var transfers = arguments.length > 2 ? arguments[2] : undefined;\n\n if (this.isCancelled) {\n return;\n }\n\n var lastDesiredSize = this.desiredSize;\n this.desiredSize -= size;\n\n if (lastDesiredSize > 0 && this.desiredSize <= 0) {\n this.sinkCapability = (0, _util.createPromiseCapability)();\n this.ready = this.sinkCapability.promise;\n }\n\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.ENQUEUE,\n streamId: streamId,\n chunk: chunk\n }, transfers);\n },\n close: function close() {\n if (this.isCancelled) {\n return;\n }\n\n this.isCancelled = true;\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.CLOSE,\n streamId: streamId\n });\n delete self.streamSinks[streamId];\n },\n error: function error(reason) {\n (0, _util.assert)(reason instanceof Error, \"error must have a valid reason\");\n\n if (this.isCancelled) {\n return;\n }\n\n this.isCancelled = true;\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.ERROR,\n streamId: streamId,\n reason: wrapReason(reason)\n });\n },\n sinkCapability: (0, _util.createPromiseCapability)(),\n onPull: null,\n onCancel: null,\n isCancelled: false,\n desiredSize: data.desiredSize,\n ready: null\n };\n streamSink.sinkCapability.resolve();\n streamSink.ready = streamSink.sinkCapability.promise;\n this.streamSinks[streamId] = streamSink;\n new Promise(function (resolve) {\n resolve(action(data.data, streamSink));\n }).then(function () {\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.START_COMPLETE,\n streamId: streamId,\n success: true\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.START_COMPLETE,\n streamId: streamId,\n reason: wrapReason(reason)\n });\n });\n }\n }, {\n key: \"_processStreamMessage\",\n value: function _processStreamMessage(data) {\n var streamId = data.streamId,\n sourceName = this.sourceName,\n targetName = data.sourceName,\n comObj = this.comObj;\n var streamController = this.streamControllers[streamId],\n streamSink = this.streamSinks[streamId];\n\n switch (data.stream) {\n case StreamKind.START_COMPLETE:\n if (data.success) {\n streamController.startCall.resolve();\n } else {\n streamController.startCall.reject(wrapReason(data.reason));\n }\n\n break;\n\n case StreamKind.PULL_COMPLETE:\n if (data.success) {\n streamController.pullCall.resolve();\n } else {\n streamController.pullCall.reject(wrapReason(data.reason));\n }\n\n break;\n\n case StreamKind.PULL:\n if (!streamSink) {\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId: streamId,\n success: true\n });\n break;\n }\n\n if (streamSink.desiredSize <= 0 && data.desiredSize > 0) {\n streamSink.sinkCapability.resolve();\n }\n\n streamSink.desiredSize = data.desiredSize;\n new Promise(function (resolve) {\n resolve(streamSink.onPull && streamSink.onPull());\n }).then(function () {\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId: streamId,\n success: true\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId: streamId,\n reason: wrapReason(reason)\n });\n });\n break;\n\n case StreamKind.ENQUEUE:\n (0, _util.assert)(streamController, \"enqueue should have stream controller\");\n\n if (streamController.isClosed) {\n break;\n }\n\n streamController.controller.enqueue(data.chunk);\n break;\n\n case StreamKind.CLOSE:\n (0, _util.assert)(streamController, \"close should have stream controller\");\n\n if (streamController.isClosed) {\n break;\n }\n\n streamController.isClosed = true;\n streamController.controller.close();\n\n this._deleteStreamController(streamController, streamId);\n\n break;\n\n case StreamKind.ERROR:\n (0, _util.assert)(streamController, \"error should have stream controller\");\n streamController.controller.error(wrapReason(data.reason));\n\n this._deleteStreamController(streamController, streamId);\n\n break;\n\n case StreamKind.CANCEL_COMPLETE:\n if (data.success) {\n streamController.cancelCall.resolve();\n } else {\n streamController.cancelCall.reject(wrapReason(data.reason));\n }\n\n this._deleteStreamController(streamController, streamId);\n\n break;\n\n case StreamKind.CANCEL:\n if (!streamSink) {\n break;\n }\n\n new Promise(function (resolve) {\n resolve(streamSink.onCancel && streamSink.onCancel(wrapReason(data.reason)));\n }).then(function () {\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.CANCEL_COMPLETE,\n streamId: streamId,\n success: true\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName: sourceName,\n targetName: targetName,\n stream: StreamKind.CANCEL_COMPLETE,\n streamId: streamId,\n reason: wrapReason(reason)\n });\n });\n streamSink.sinkCapability.reject(wrapReason(data.reason));\n streamSink.isCancelled = true;\n delete this.streamSinks[streamId];\n break;\n\n default:\n throw new Error(\"Unexpected stream case\");\n }\n }\n }, {\n key: \"_deleteStreamController\",\n value: function () {\n var _deleteStreamController2 = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee(streamController, streamId) {\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Promise.allSettled([streamController.startCall && streamController.startCall.promise, streamController.pullCall && streamController.pullCall.promise, streamController.cancelCall && streamController.cancelCall.promise]);\n\n case 2:\n delete this.streamControllers[streamId];\n\n case 3:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function _deleteStreamController(_x, _x2) {\n return _deleteStreamController2.apply(this, arguments);\n }\n\n return _deleteStreamController;\n }()\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.comObj.removeEventListener(\"message\", this._onComObjOnMessage);\n }\n }]);\n\n return MessageHandler;\n}();\n\nexports.MessageHandler = MessageHandler;\n\n/***/ }),\n/* 168 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Metadata = void 0;\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\n\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\n\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\n\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\n\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\n\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\nvar _metadataMap = /*#__PURE__*/new WeakMap();\n\nvar _data = /*#__PURE__*/new WeakMap();\n\nvar Metadata = /*#__PURE__*/function () {\n function Metadata(_ref) {\n var parsedData = _ref.parsedData,\n rawData = _ref.rawData;\n\n _classCallCheck(this, Metadata);\n\n _classPrivateFieldInitSpec(this, _metadataMap, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldInitSpec(this, _data, {\n writable: true,\n value: void 0\n });\n\n _classPrivateFieldSet(this, _metadataMap, parsedData);\n\n _classPrivateFieldSet(this, _data, rawData);\n }\n\n _createClass(Metadata, [{\n key: \"getRaw\",\n value: function getRaw() {\n return _classPrivateFieldGet(this, _data);\n }\n }, {\n key: \"get\",\n value: function get(name) {\n var _classPrivateFieldGet2;\n\n return (_classPrivateFieldGet2 = _classPrivateFieldGet(this, _metadataMap).get(name)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : null;\n }\n }, {\n key: \"getAll\",\n value: function getAll() {\n return (0, _util.objectFromMap)(_classPrivateFieldGet(this, _metadataMap));\n }\n }, {\n key: \"has\",\n value: function has(name) {\n return _classPrivateFieldGet(this, _metadataMap).has(name);\n }\n }]);\n\n return Metadata;\n}();\n\nexports.Metadata = Metadata;\n\n/***/ }),\n/* 169 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.OptionalContentConfig = void 0;\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar OptionalContentGroup = /*#__PURE__*/_createClass(function OptionalContentGroup(name, intent) {\n _classCallCheck(this, OptionalContentGroup);\n\n this.visible = true;\n this.name = name;\n this.intent = intent;\n});\n\nvar OptionalContentConfig = /*#__PURE__*/function () {\n function OptionalContentConfig(data) {\n _classCallCheck(this, OptionalContentConfig);\n\n this.name = null;\n this.creator = null;\n this._order = null;\n this._groups = new Map();\n\n if (data === null) {\n return;\n }\n\n this.name = data.name;\n this.creator = data.creator;\n this._order = data.order;\n\n var _iterator = _createForOfIteratorHelper(data.groups),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _group = _step.value;\n\n this._groups.set(_group.id, new OptionalContentGroup(_group.name, _group.intent));\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (data.baseState === \"OFF\") {\n var _iterator2 = _createForOfIteratorHelper(this._groups),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var group = _step2.value;\n group.visible = false;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n\n var _iterator3 = _createForOfIteratorHelper(data.on),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var on = _step3.value;\n this._groups.get(on).visible = true;\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n var _iterator4 = _createForOfIteratorHelper(data.off),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var off = _step4.value;\n this._groups.get(off).visible = false;\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n }\n\n _createClass(OptionalContentConfig, [{\n key: \"_evaluateVisibilityExpression\",\n value: function _evaluateVisibilityExpression(array) {\n var length = array.length;\n\n if (length < 2) {\n return true;\n }\n\n var operator = array[0];\n\n for (var i = 1; i < length; i++) {\n var element = array[i];\n var state = void 0;\n\n if (Array.isArray(element)) {\n state = this._evaluateVisibilityExpression(element);\n } else if (this._groups.has(element)) {\n state = this._groups.get(element).visible;\n } else {\n (0, _util.warn)(\"Optional content group not found: \".concat(element));\n return true;\n }\n\n switch (operator) {\n case \"And\":\n if (!state) {\n return false;\n }\n\n break;\n\n case \"Or\":\n if (state) {\n return true;\n }\n\n break;\n\n case \"Not\":\n return !state;\n\n default:\n return true;\n }\n }\n\n return operator === \"And\";\n }\n }, {\n key: \"isVisible\",\n value: function isVisible(group) {\n if (this._groups.size === 0) {\n return true;\n }\n\n if (!group) {\n (0, _util.warn)(\"Optional content group not defined.\");\n return true;\n }\n\n if (group.type === \"OCG\") {\n if (!this._groups.has(group.id)) {\n (0, _util.warn)(\"Optional content group not found: \".concat(group.id));\n return true;\n }\n\n return this._groups.get(group.id).visible;\n } else if (group.type === \"OCMD\") {\n if (group.expression) {\n return this._evaluateVisibilityExpression(group.expression);\n }\n\n if (!group.policy || group.policy === \"AnyOn\") {\n var _iterator5 = _createForOfIteratorHelper(group.ids),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var id = _step5.value;\n\n if (!this._groups.has(id)) {\n (0, _util.warn)(\"Optional content group not found: \".concat(id));\n return true;\n }\n\n if (this._groups.get(id).visible) {\n return true;\n }\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n return false;\n } else if (group.policy === \"AllOn\") {\n var _iterator6 = _createForOfIteratorHelper(group.ids),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var _id = _step6.value;\n\n if (!this._groups.has(_id)) {\n (0, _util.warn)(\"Optional content group not found: \".concat(_id));\n return true;\n }\n\n if (!this._groups.get(_id).visible) {\n return false;\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n return true;\n } else if (group.policy === \"AnyOff\") {\n var _iterator7 = _createForOfIteratorHelper(group.ids),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var _id2 = _step7.value;\n\n if (!this._groups.has(_id2)) {\n (0, _util.warn)(\"Optional content group not found: \".concat(_id2));\n return true;\n }\n\n if (!this._groups.get(_id2).visible) {\n return true;\n }\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n\n return false;\n } else if (group.policy === \"AllOff\") {\n var _iterator8 = _createForOfIteratorHelper(group.ids),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var _id3 = _step8.value;\n\n if (!this._groups.has(_id3)) {\n (0, _util.warn)(\"Optional content group not found: \".concat(_id3));\n return true;\n }\n\n if (this._groups.get(_id3).visible) {\n return false;\n }\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n\n return true;\n }\n\n (0, _util.warn)(\"Unknown optional content policy \".concat(group.policy, \".\"));\n return true;\n }\n\n (0, _util.warn)(\"Unknown group type \".concat(group.type, \".\"));\n return true;\n }\n }, {\n key: \"setVisibility\",\n value: function setVisibility(id) {\n var visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (!this._groups.has(id)) {\n (0, _util.warn)(\"Optional content group not found: \".concat(id));\n return;\n }\n\n this._groups.get(id).visible = !!visible;\n }\n }, {\n key: \"getOrder\",\n value: function getOrder() {\n if (!this._groups.size) {\n return null;\n }\n\n if (this._order) {\n return this._order.slice();\n }\n\n return Array.from(this._groups.keys());\n }\n }, {\n key: \"getGroups\",\n value: function getGroups() {\n return this._groups.size > 0 ? (0, _util.objectFromMap)(this._groups) : null;\n }\n }, {\n key: \"getGroup\",\n value: function getGroup(id) {\n return this._groups.get(id) || null;\n }\n }]);\n\n return OptionalContentConfig;\n}();\n\nexports.OptionalContentConfig = OptionalContentConfig;\n\n/***/ }),\n/* 170 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PDFDataTransportStream = void 0;\n\nvar _regenerator = _interopRequireDefault(__w_pdfjs_require__(156));\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _display_utils = __w_pdfjs_require__(158);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar PDFDataTransportStream = /*#__PURE__*/function () {\n function PDFDataTransportStream(params, pdfDataRangeTransport) {\n var _this = this;\n\n _classCallCheck(this, PDFDataTransportStream);\n\n (0, _util.assert)(pdfDataRangeTransport, 'PDFDataTransportStream - missing required \"pdfDataRangeTransport\" argument.');\n this._queuedChunks = [];\n this._progressiveDone = params.progressiveDone || false;\n this._contentDispositionFilename = params.contentDispositionFilename || null;\n var initialData = params.initialData;\n\n if ((initialData === null || initialData === void 0 ? void 0 : initialData.length) > 0) {\n var buffer = new Uint8Array(initialData).buffer;\n\n this._queuedChunks.push(buffer);\n }\n\n this._pdfDataRangeTransport = pdfDataRangeTransport;\n this._isStreamingSupported = !params.disableStream;\n this._isRangeSupported = !params.disableRange;\n this._contentLength = params.length;\n this._fullRequestReader = null;\n this._rangeReaders = [];\n\n this._pdfDataRangeTransport.addRangeListener(function (begin, chunk) {\n _this._onReceiveData({\n begin: begin,\n chunk: chunk\n });\n });\n\n this._pdfDataRangeTransport.addProgressListener(function (loaded, total) {\n _this._onProgress({\n loaded: loaded,\n total: total\n });\n });\n\n this._pdfDataRangeTransport.addProgressiveReadListener(function (chunk) {\n _this._onReceiveData({\n chunk: chunk\n });\n });\n\n this._pdfDataRangeTransport.addProgressiveDoneListener(function () {\n _this._onProgressiveDone();\n });\n\n this._pdfDataRangeTransport.transportReady();\n }\n\n _createClass(PDFDataTransportStream, [{\n key: \"_onReceiveData\",\n value: function _onReceiveData(args) {\n var buffer = new Uint8Array(args.chunk).buffer;\n\n if (args.begin === undefined) {\n if (this._fullRequestReader) {\n this._fullRequestReader._enqueue(buffer);\n } else {\n this._queuedChunks.push(buffer);\n }\n } else {\n var found = this._rangeReaders.some(function (rangeReader) {\n if (rangeReader._begin !== args.begin) {\n return false;\n }\n\n rangeReader._enqueue(buffer);\n\n return true;\n });\n\n (0, _util.assert)(found, \"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.\");\n }\n }\n }, {\n key: \"_progressiveDataLength\",\n get: function get() {\n var _this$_fullRequestRea, _this$_fullRequestRea2;\n\n return (_this$_fullRequestRea = (_this$_fullRequestRea2 = this._fullRequestReader) === null || _this$_fullRequestRea2 === void 0 ? void 0 : _this$_fullRequestRea2._loaded) !== null && _this$_fullRequestRea !== void 0 ? _this$_fullRequestRea : 0;\n }\n }, {\n key: \"_onProgress\",\n value: function _onProgress(evt) {\n if (evt.total === undefined) {\n var firstReader = this._rangeReaders[0];\n\n if (firstReader !== null && firstReader !== void 0 && firstReader.onProgress) {\n firstReader.onProgress({\n loaded: evt.loaded\n });\n }\n } else {\n var fullReader = this._fullRequestReader;\n\n if (fullReader !== null && fullReader !== void 0 && fullReader.onProgress) {\n fullReader.onProgress({\n loaded: evt.loaded,\n total: evt.total\n });\n }\n }\n }\n }, {\n key: \"_onProgressiveDone\",\n value: function _onProgressiveDone() {\n if (this._fullRequestReader) {\n this._fullRequestReader.progressiveDone();\n }\n\n this._progressiveDone = true;\n }\n }, {\n key: \"_removeRangeReader\",\n value: function _removeRangeReader(reader) {\n var i = this._rangeReaders.indexOf(reader);\n\n if (i >= 0) {\n this._rangeReaders.splice(i, 1);\n }\n }\n }, {\n key: \"getFullReader\",\n value: function getFullReader() {\n (0, _util.assert)(!this._fullRequestReader, \"PDFDataTransportStream.getFullReader can only be called once.\");\n var queuedChunks = this._queuedChunks;\n this._queuedChunks = null;\n return new PDFDataTransportStreamReader(this, queuedChunks, this._progressiveDone, this._contentDispositionFilename);\n }\n }, {\n key: \"getRangeReader\",\n value: function getRangeReader(begin, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n\n var reader = new PDFDataTransportStreamRangeReader(this, begin, end);\n\n this._pdfDataRangeTransport.requestDataRange(begin, end);\n\n this._rangeReaders.push(reader);\n\n return reader;\n }\n }, {\n key: \"cancelAllRequests\",\n value: function cancelAllRequests(reason) {\n if (this._fullRequestReader) {\n this._fullRequestReader.cancel(reason);\n }\n\n var _iterator = _createForOfIteratorHelper(this._rangeReaders.slice(0)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var reader = _step.value;\n reader.cancel(reason);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n this._pdfDataRangeTransport.abort();\n }\n }]);\n\n return PDFDataTransportStream;\n}();\n\nexports.PDFDataTransportStream = PDFDataTransportStream;\n\nvar PDFDataTransportStreamReader = /*#__PURE__*/function () {\n function PDFDataTransportStreamReader(stream, queuedChunks) {\n var progressiveDone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var contentDispositionFilename = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n _classCallCheck(this, PDFDataTransportStreamReader);\n\n this._stream = stream;\n this._done = progressiveDone || false;\n this._filename = (0, _display_utils.isPdfFile)(contentDispositionFilename) ? contentDispositionFilename : null;\n this._queuedChunks = queuedChunks || [];\n this._loaded = 0;\n\n var _iterator2 = _createForOfIteratorHelper(this._queuedChunks),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var chunk = _step2.value;\n this._loaded += chunk.byteLength;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n this._requests = [];\n this._headersReady = Promise.resolve();\n stream._fullRequestReader = this;\n this.onProgress = null;\n }\n\n _createClass(PDFDataTransportStreamReader, [{\n key: \"_enqueue\",\n value: function _enqueue(chunk) {\n if (this._done) {\n return;\n }\n\n if (this._requests.length > 0) {\n var requestCapability = this._requests.shift();\n\n requestCapability.resolve({\n value: chunk,\n done: false\n });\n } else {\n this._queuedChunks.push(chunk);\n }\n\n this._loaded += chunk.byteLength;\n }\n }, {\n key: \"headersReady\",\n get: function get() {\n return this._headersReady;\n }\n }, {\n key: \"filename\",\n get: function get() {\n return this._filename;\n }\n }, {\n key: \"isRangeSupported\",\n get: function get() {\n return this._stream._isRangeSupported;\n }\n }, {\n key: \"isStreamingSupported\",\n get: function get() {\n return this._stream._isStreamingSupported;\n }\n }, {\n key: \"contentLength\",\n get: function get() {\n return this._stream._contentLength;\n }\n }, {\n key: \"read\",\n value: function () {\n var _read = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee() {\n var chunk, requestCapability;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(this._queuedChunks.length > 0)) {\n _context.next = 3;\n break;\n }\n\n chunk = this._queuedChunks.shift();\n return _context.abrupt(\"return\", {\n value: chunk,\n done: false\n });\n\n case 3:\n if (!this._done) {\n _context.next = 5;\n break;\n }\n\n return _context.abrupt(\"return\", {\n value: undefined,\n done: true\n });\n\n case 5:\n requestCapability = (0, _util.createPromiseCapability)();\n\n this._requests.push(requestCapability);\n\n return _context.abrupt(\"return\", requestCapability.promise);\n\n case 8:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function read() {\n return _read.apply(this, arguments);\n }\n\n return read;\n }()\n }, {\n key: \"cancel\",\n value: function cancel(reason) {\n this._done = true;\n\n var _iterator3 = _createForOfIteratorHelper(this._requests),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var requestCapability = _step3.value;\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n this._requests.length = 0;\n }\n }, {\n key: \"progressiveDone\",\n value: function progressiveDone() {\n if (this._done) {\n return;\n }\n\n this._done = true;\n }\n }]);\n\n return PDFDataTransportStreamReader;\n}();\n\nvar PDFDataTransportStreamRangeReader = /*#__PURE__*/function () {\n function PDFDataTransportStreamRangeReader(stream, begin, end) {\n _classCallCheck(this, PDFDataTransportStreamRangeReader);\n\n this._stream = stream;\n this._begin = begin;\n this._end = end;\n this._queuedChunk = null;\n this._requests = [];\n this._done = false;\n this.onProgress = null;\n }\n\n _createClass(PDFDataTransportStreamRangeReader, [{\n key: \"_enqueue\",\n value: function _enqueue(chunk) {\n if (this._done) {\n return;\n }\n\n if (this._requests.length === 0) {\n this._queuedChunk = chunk;\n } else {\n var requestsCapability = this._requests.shift();\n\n requestsCapability.resolve({\n value: chunk,\n done: false\n });\n\n var _iterator4 = _createForOfIteratorHelper(this._requests),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var requestCapability = _step4.value;\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n this._requests.length = 0;\n }\n\n this._done = true;\n\n this._stream._removeRangeReader(this);\n }\n }, {\n key: \"isStreamingSupported\",\n get: function get() {\n return false;\n }\n }, {\n key: \"read\",\n value: function () {\n var _read2 = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2() {\n var chunk, requestCapability;\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!this._queuedChunk) {\n _context2.next = 4;\n break;\n }\n\n chunk = this._queuedChunk;\n this._queuedChunk = null;\n return _context2.abrupt(\"return\", {\n value: chunk,\n done: false\n });\n\n case 4:\n if (!this._done) {\n _context2.next = 6;\n break;\n }\n\n return _context2.abrupt(\"return\", {\n value: undefined,\n done: true\n });\n\n case 6:\n requestCapability = (0, _util.createPromiseCapability)();\n\n this._requests.push(requestCapability);\n\n return _context2.abrupt(\"return\", requestCapability.promise);\n\n case 9:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function read() {\n return _read2.apply(this, arguments);\n }\n\n return read;\n }()\n }, {\n key: \"cancel\",\n value: function cancel(reason) {\n this._done = true;\n\n var _iterator5 = _createForOfIteratorHelper(this._requests),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var requestCapability = _step5.value;\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n this._requests.length = 0;\n\n this._stream._removeRangeReader(this);\n }\n }]);\n\n return PDFDataTransportStreamRangeReader;\n}();\n\n/***/ }),\n/* 171 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.XfaText = void 0;\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar XfaText = /*#__PURE__*/function () {\n function XfaText() {\n _classCallCheck(this, XfaText);\n }\n\n _createClass(XfaText, null, [{\n key: \"textContent\",\n value: function textContent(xfa) {\n var items = [];\n var output = {\n items: items,\n styles: Object.create(null)\n };\n\n function walk(node) {\n var _node$attributes;\n\n if (!node) {\n return;\n }\n\n var str = null;\n var name = node.name;\n\n if (name === \"#text\") {\n str = node.value;\n } else if (!XfaText.shouldBuildText(name)) {\n return;\n } else if (node !== null && node !== void 0 && (_node$attributes = node.attributes) !== null && _node$attributes !== void 0 && _node$attributes.textContent) {\n str = node.attributes.textContent;\n } else if (node.value) {\n str = node.value;\n }\n\n if (str !== null) {\n items.push({\n str: str\n });\n }\n\n if (!node.children) {\n return;\n }\n\n var _iterator = _createForOfIteratorHelper(node.children),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var child = _step.value;\n walk(child);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n\n walk(xfa);\n return output;\n }\n }, {\n key: \"shouldBuildText\",\n value: function shouldBuildText(name) {\n return !(name === \"textarea\" || name === \"input\" || name === \"option\" || name === \"select\");\n }\n }]);\n\n return XfaText;\n}();\n\nexports.XfaText = XfaText;\n\n/***/ }),\n/* 172 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.NodeStandardFontDataFactory = exports.NodeCanvasFactory = exports.NodeCMapReaderFactory = void 0;\n\nvar _base_factory = __w_pdfjs_require__(159);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n;\n\nvar fetchData = function fetchData(url) {\n return new Promise(function (resolve, reject) {\n var fs = require(\"fs\");\n\n fs.readFile(url, function (error, data) {\n if (error || !data) {\n reject(new Error(error));\n return;\n }\n\n resolve(new Uint8Array(data));\n });\n });\n};\n\nvar NodeCanvasFactory = /*#__PURE__*/function (_BaseCanvasFactory) {\n _inherits(NodeCanvasFactory, _BaseCanvasFactory);\n\n var _super = _createSuper(NodeCanvasFactory);\n\n function NodeCanvasFactory() {\n _classCallCheck(this, NodeCanvasFactory);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(NodeCanvasFactory, [{\n key: \"_createCanvas\",\n value: function _createCanvas(width, height) {\n var Canvas = require(\"canvas\");\n\n return Canvas.createCanvas(width, height);\n }\n }]);\n\n return NodeCanvasFactory;\n}(_base_factory.BaseCanvasFactory);\n\nexports.NodeCanvasFactory = NodeCanvasFactory;\n\nvar NodeCMapReaderFactory = /*#__PURE__*/function (_BaseCMapReaderFactor) {\n _inherits(NodeCMapReaderFactory, _BaseCMapReaderFactor);\n\n var _super2 = _createSuper(NodeCMapReaderFactory);\n\n function NodeCMapReaderFactory() {\n _classCallCheck(this, NodeCMapReaderFactory);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(NodeCMapReaderFactory, [{\n key: \"_fetchData\",\n value: function _fetchData(url, compressionType) {\n return fetchData(url).then(function (data) {\n return {\n cMapData: data,\n compressionType: compressionType\n };\n });\n }\n }]);\n\n return NodeCMapReaderFactory;\n}(_base_factory.BaseCMapReaderFactory);\n\nexports.NodeCMapReaderFactory = NodeCMapReaderFactory;\n\nvar NodeStandardFontDataFactory = /*#__PURE__*/function (_BaseStandardFontData) {\n _inherits(NodeStandardFontDataFactory, _BaseStandardFontData);\n\n var _super3 = _createSuper(NodeStandardFontDataFactory);\n\n function NodeStandardFontDataFactory() {\n _classCallCheck(this, NodeStandardFontDataFactory);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(NodeStandardFontDataFactory, [{\n key: \"_fetchData\",\n value: function _fetchData(url) {\n return fetchData(url);\n }\n }]);\n\n return NodeStandardFontDataFactory;\n}(_base_factory.BaseStandardFontDataFactory);\n\nexports.NodeStandardFontDataFactory = NodeStandardFontDataFactory;\n\n/***/ }),\n/* 173 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.AnnotationLayer = void 0;\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _display_utils = __w_pdfjs_require__(158);\n\nvar _annotation_storage = __w_pdfjs_require__(161);\n\nvar _scripting_utils = __w_pdfjs_require__(174);\n\nvar _xfa_layer = __w_pdfjs_require__(175);\n\nfunction _classStaticPrivateMethodGet(receiver, classConstructor, method) { _classCheckPrivateStaticAccess(receiver, classConstructor); return method; }\n\nfunction _classCheckPrivateStaticAccess(receiver, classConstructor) { if (receiver !== classConstructor) { throw new TypeError(\"Private static access of wrong provenance\"); } }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar DEFAULT_TAB_INDEX = 1000;\nvar GetElementsByNameSet = new WeakSet();\n\nfunction getRectDims(rect) {\n return {\n width: rect[2] - rect[0],\n height: rect[3] - rect[1]\n };\n}\n\nvar AnnotationElementFactory = /*#__PURE__*/function () {\n function AnnotationElementFactory() {\n _classCallCheck(this, AnnotationElementFactory);\n }\n\n _createClass(AnnotationElementFactory, null, [{\n key: \"create\",\n value: function create(parameters) {\n var subtype = parameters.data.annotationType;\n\n switch (subtype) {\n case _util.AnnotationType.LINK:\n return new LinkAnnotationElement(parameters);\n\n case _util.AnnotationType.TEXT:\n return new TextAnnotationElement(parameters);\n\n case _util.AnnotationType.WIDGET:\n var fieldType = parameters.data.fieldType;\n\n switch (fieldType) {\n case \"Tx\":\n return new TextWidgetAnnotationElement(parameters);\n\n case \"Btn\":\n if (parameters.data.radioButton) {\n return new RadioButtonWidgetAnnotationElement(parameters);\n } else if (parameters.data.checkBox) {\n return new CheckboxWidgetAnnotationElement(parameters);\n }\n\n return new PushButtonWidgetAnnotationElement(parameters);\n\n case \"Ch\":\n return new ChoiceWidgetAnnotationElement(parameters);\n }\n\n return new WidgetAnnotationElement(parameters);\n\n case _util.AnnotationType.POPUP:\n return new PopupAnnotationElement(parameters);\n\n case _util.AnnotationType.FREETEXT:\n return new FreeTextAnnotationElement(parameters);\n\n case _util.AnnotationType.LINE:\n return new LineAnnotationElement(parameters);\n\n case _util.AnnotationType.SQUARE:\n return new SquareAnnotationElement(parameters);\n\n case _util.AnnotationType.CIRCLE:\n return new CircleAnnotationElement(parameters);\n\n case _util.AnnotationType.POLYLINE:\n return new PolylineAnnotationElement(parameters);\n\n case _util.AnnotationType.CARET:\n return new CaretAnnotationElement(parameters);\n\n case _util.AnnotationType.INK:\n return new InkAnnotationElement(parameters);\n\n case _util.AnnotationType.POLYGON:\n return new PolygonAnnotationElement(parameters);\n\n case _util.AnnotationType.HIGHLIGHT:\n return new HighlightAnnotationElement(parameters);\n\n case _util.AnnotationType.UNDERLINE:\n return new UnderlineAnnotationElement(parameters);\n\n case _util.AnnotationType.SQUIGGLY:\n return new SquigglyAnnotationElement(parameters);\n\n case _util.AnnotationType.STRIKEOUT:\n return new StrikeOutAnnotationElement(parameters);\n\n case _util.AnnotationType.STAMP:\n return new StampAnnotationElement(parameters);\n\n case _util.AnnotationType.FILEATTACHMENT:\n return new FileAttachmentAnnotationElement(parameters);\n\n default:\n return new AnnotationElement(parameters);\n }\n }\n }]);\n\n return AnnotationElementFactory;\n}();\n\nvar AnnotationElement = /*#__PURE__*/function () {\n function AnnotationElement(parameters) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$isRenderable = _ref.isRenderable,\n isRenderable = _ref$isRenderable === void 0 ? false : _ref$isRenderable,\n _ref$ignoreBorder = _ref.ignoreBorder,\n ignoreBorder = _ref$ignoreBorder === void 0 ? false : _ref$ignoreBorder,\n _ref$createQuadrilate = _ref.createQuadrilaterals,\n createQuadrilaterals = _ref$createQuadrilate === void 0 ? false : _ref$createQuadrilate;\n\n _classCallCheck(this, AnnotationElement);\n\n this.isRenderable = isRenderable;\n this.data = parameters.data;\n this.layer = parameters.layer;\n this.page = parameters.page;\n this.viewport = parameters.viewport;\n this.linkService = parameters.linkService;\n this.downloadManager = parameters.downloadManager;\n this.imageResourcesPath = parameters.imageResourcesPath;\n this.renderForms = parameters.renderForms;\n this.svgFactory = parameters.svgFactory;\n this.annotationStorage = parameters.annotationStorage;\n this.enableScripting = parameters.enableScripting;\n this.hasJSActions = parameters.hasJSActions;\n this._fieldObjects = parameters.fieldObjects;\n this._mouseState = parameters.mouseState;\n\n if (isRenderable) {\n this.container = this._createContainer(ignoreBorder);\n }\n\n if (createQuadrilaterals) {\n this.quadrilaterals = this._createQuadrilaterals(ignoreBorder);\n }\n }\n\n _createClass(AnnotationElement, [{\n key: \"_createContainer\",\n value: function _createContainer() {\n var ignoreBorder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var data = this.data,\n page = this.page,\n viewport = this.viewport;\n var container = document.createElement(\"section\");\n\n var _getRectDims = getRectDims(data.rect),\n width = _getRectDims.width,\n height = _getRectDims.height;\n\n container.setAttribute(\"data-annotation-id\", data.id);\n\n var rect = _util.Util.normalizeRect([data.rect[0], page.view[3] - data.rect[1] + page.view[1], data.rect[2], page.view[3] - data.rect[3] + page.view[1]]);\n\n if (data.hasOwnCanvas) {\n var transform = viewport.transform.slice();\n\n var _Util$singularValueDe = _util.Util.singularValueDecompose2dScale(transform),\n _Util$singularValueDe2 = _slicedToArray(_Util$singularValueDe, 2),\n scaleX = _Util$singularValueDe2[0],\n scaleY = _Util$singularValueDe2[1];\n\n width = Math.ceil(width * scaleX);\n height = Math.ceil(height * scaleY);\n rect[0] *= scaleX;\n rect[1] *= scaleY;\n\n for (var i = 0; i < 4; i++) {\n transform[i] = Math.sign(transform[i]);\n }\n\n container.style.transform = \"matrix(\".concat(transform.join(\",\"), \")\");\n } else {\n container.style.transform = \"matrix(\".concat(viewport.transform.join(\",\"), \")\");\n }\n\n container.style.transformOrigin = \"\".concat(-rect[0], \"px \").concat(-rect[1], \"px\");\n\n if (!ignoreBorder && data.borderStyle.width > 0) {\n container.style.borderWidth = \"\".concat(data.borderStyle.width, \"px\");\n\n if (data.borderStyle.style !== _util.AnnotationBorderStyleType.UNDERLINE) {\n width -= 2 * data.borderStyle.width;\n height -= 2 * data.borderStyle.width;\n }\n\n var horizontalRadius = data.borderStyle.horizontalCornerRadius;\n var verticalRadius = data.borderStyle.verticalCornerRadius;\n\n if (horizontalRadius > 0 || verticalRadius > 0) {\n var radius = \"\".concat(horizontalRadius, \"px / \").concat(verticalRadius, \"px\");\n container.style.borderRadius = radius;\n }\n\n switch (data.borderStyle.style) {\n case _util.AnnotationBorderStyleType.SOLID:\n container.style.borderStyle = \"solid\";\n break;\n\n case _util.AnnotationBorderStyleType.DASHED:\n container.style.borderStyle = \"dashed\";\n break;\n\n case _util.AnnotationBorderStyleType.BEVELED:\n (0, _util.warn)(\"Unimplemented border style: beveled\");\n break;\n\n case _util.AnnotationBorderStyleType.INSET:\n (0, _util.warn)(\"Unimplemented border style: inset\");\n break;\n\n case _util.AnnotationBorderStyleType.UNDERLINE:\n container.style.borderBottomStyle = \"solid\";\n break;\n\n default:\n break;\n }\n\n var borderColor = data.borderColor || data.color || null;\n\n if (borderColor) {\n container.style.borderColor = _util.Util.makeHexColor(data.color[0] | 0, data.color[1] | 0, data.color[2] | 0);\n } else {\n container.style.borderWidth = 0;\n }\n }\n\n container.style.left = \"\".concat(rect[0], \"px\");\n container.style.top = \"\".concat(rect[1], \"px\");\n\n if (data.hasOwnCanvas) {\n container.style.width = container.style.height = \"auto\";\n } else {\n container.style.width = \"\".concat(width, \"px\");\n container.style.height = \"\".concat(height, \"px\");\n }\n\n return container;\n }\n }, {\n key: \"_commonActions\",\n get: function get() {\n var _this = this;\n\n var setColor = function setColor(jsName, styleName, event) {\n var color = event.detail[jsName];\n event.target.style[styleName] = _scripting_utils.ColorConverters[\"\".concat(color[0], \"_HTML\")](color.slice(1));\n };\n\n return (0, _util.shadow)(this, \"_commonActions\", {\n display: function display(event) {\n var hidden = event.detail.display % 2 === 1;\n event.target.style.visibility = hidden ? \"hidden\" : \"visible\";\n\n _this.annotationStorage.setValue(_this.data.id, {\n hidden: hidden,\n print: event.detail.display === 0 || event.detail.display === 3\n });\n },\n print: function print(event) {\n _this.annotationStorage.setValue(_this.data.id, {\n print: event.detail.print\n });\n },\n hidden: function hidden(event) {\n event.target.style.visibility = event.detail.hidden ? \"hidden\" : \"visible\";\n\n _this.annotationStorage.setValue(_this.data.id, {\n hidden: event.detail.hidden\n });\n },\n focus: function focus(event) {\n setTimeout(function () {\n return event.target.focus({\n preventScroll: false\n });\n }, 0);\n },\n userName: function userName(event) {\n event.target.title = event.detail.userName;\n },\n readonly: function readonly(event) {\n if (event.detail.readonly) {\n event.target.setAttribute(\"readonly\", \"\");\n } else {\n event.target.removeAttribute(\"readonly\");\n }\n },\n required: function required(event) {\n if (event.detail.required) {\n event.target.setAttribute(\"required\", \"\");\n } else {\n event.target.removeAttribute(\"required\");\n }\n },\n bgColor: function bgColor(event) {\n setColor(\"bgColor\", \"backgroundColor\", event);\n },\n fillColor: function fillColor(event) {\n setColor(\"fillColor\", \"backgroundColor\", event);\n },\n fgColor: function fgColor(event) {\n setColor(\"fgColor\", \"color\", event);\n },\n textColor: function textColor(event) {\n setColor(\"textColor\", \"color\", event);\n },\n borderColor: function borderColor(event) {\n setColor(\"borderColor\", \"borderColor\", event);\n },\n strokeColor: function strokeColor(event) {\n setColor(\"strokeColor\", \"borderColor\", event);\n }\n });\n }\n }, {\n key: \"_dispatchEventFromSandbox\",\n value: function _dispatchEventFromSandbox(actions, jsEvent) {\n var commonActions = this._commonActions;\n\n for (var _i2 = 0, _Object$keys = Object.keys(jsEvent.detail); _i2 < _Object$keys.length; _i2++) {\n var name = _Object$keys[_i2];\n var action = actions[name] || commonActions[name];\n\n if (action) {\n action(jsEvent);\n }\n }\n }\n }, {\n key: \"_setDefaultPropertiesFromJS\",\n value: function _setDefaultPropertiesFromJS(element) {\n if (!this.enableScripting) {\n return;\n }\n\n var storedData = this.annotationStorage.getRawValue(this.data.id);\n\n if (!storedData) {\n return;\n }\n\n var commonActions = this._commonActions;\n\n for (var _i3 = 0, _Object$entries = Object.entries(storedData); _i3 < _Object$entries.length; _i3++) {\n var _Object$entries$_i = _slicedToArray(_Object$entries[_i3], 2),\n actionName = _Object$entries$_i[0],\n detail = _Object$entries$_i[1];\n\n var action = commonActions[actionName];\n\n if (action) {\n action({\n detail: detail,\n target: element\n });\n delete storedData[actionName];\n }\n }\n }\n }, {\n key: \"_createQuadrilaterals\",\n value: function _createQuadrilaterals() {\n var ignoreBorder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (!this.data.quadPoints) {\n return null;\n }\n\n var quadrilaterals = [];\n var savedRect = this.data.rect;\n\n var _iterator = _createForOfIteratorHelper(this.data.quadPoints),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var quadPoint = _step.value;\n this.data.rect = [quadPoint[2].x, quadPoint[2].y, quadPoint[1].x, quadPoint[1].y];\n quadrilaterals.push(this._createContainer(ignoreBorder));\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n this.data.rect = savedRect;\n return quadrilaterals;\n }\n }, {\n key: \"_createPopup\",\n value: function _createPopup(trigger, data) {\n var container = this.container;\n\n if (this.quadrilaterals) {\n trigger = trigger || this.quadrilaterals;\n container = this.quadrilaterals[0];\n }\n\n if (!trigger) {\n trigger = document.createElement(\"div\");\n trigger.style.height = container.style.height;\n trigger.style.width = container.style.width;\n container.appendChild(trigger);\n }\n\n var popupElement = new PopupElement({\n container: container,\n trigger: trigger,\n color: data.color,\n titleObj: data.titleObj,\n modificationDate: data.modificationDate,\n contentsObj: data.contentsObj,\n richText: data.richText,\n hideWrapper: true\n });\n var popup = popupElement.render();\n popup.style.left = container.style.width;\n container.appendChild(popup);\n }\n }, {\n key: \"_renderQuadrilaterals\",\n value: function _renderQuadrilaterals(className) {\n var _iterator2 = _createForOfIteratorHelper(this.quadrilaterals),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var quadrilateral = _step2.value;\n quadrilateral.className = className;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return this.quadrilaterals;\n }\n }, {\n key: \"render\",\n value: function render() {\n (0, _util.unreachable)(\"Abstract method `AnnotationElement.render` called\");\n }\n }, {\n key: \"_getElementsByName\",\n value: function _getElementsByName(name) {\n var skipId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var fields = [];\n\n if (this._fieldObjects) {\n var fieldObj = this._fieldObjects[name];\n\n if (fieldObj) {\n var _iterator3 = _createForOfIteratorHelper(fieldObj),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var _step3$value = _step3.value,\n page = _step3$value.page,\n id = _step3$value.id,\n exportValues = _step3$value.exportValues;\n\n if (page === -1) {\n continue;\n }\n\n if (id === skipId) {\n continue;\n }\n\n var exportValue = typeof exportValues === \"string\" ? exportValues : null;\n var domElement = document.getElementById(id);\n\n if (domElement && !GetElementsByNameSet.has(domElement)) {\n (0, _util.warn)(\"_getElementsByName - element not allowed: \".concat(id));\n continue;\n }\n\n fields.push({\n id: id,\n exportValue: exportValue,\n domElement: domElement\n });\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n }\n\n return fields;\n }\n\n var _iterator4 = _createForOfIteratorHelper(document.getElementsByName(name)),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var _domElement = _step4.value;\n var _id = _domElement.id,\n _exportValue = _domElement.exportValue;\n\n if (_id === skipId) {\n continue;\n }\n\n if (!GetElementsByNameSet.has(_domElement)) {\n continue;\n }\n\n fields.push({\n id: _id,\n exportValue: _exportValue,\n domElement: _domElement\n });\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n return fields;\n }\n }], [{\n key: \"platform\",\n get: function get() {\n var platform = typeof navigator !== \"undefined\" ? navigator.platform : \"\";\n return (0, _util.shadow)(this, \"platform\", {\n isWin: platform.includes(\"Win\"),\n isMac: platform.includes(\"Mac\")\n });\n }\n }]);\n\n return AnnotationElement;\n}();\n\nvar LinkAnnotationElement = /*#__PURE__*/function (_AnnotationElement) {\n _inherits(LinkAnnotationElement, _AnnotationElement);\n\n var _super = _createSuper(LinkAnnotationElement);\n\n function LinkAnnotationElement(parameters) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n _classCallCheck(this, LinkAnnotationElement);\n\n var isRenderable = !!(parameters.data.url || parameters.data.dest || parameters.data.action || parameters.data.isTooltipOnly || parameters.data.resetForm || parameters.data.actions && (parameters.data.actions.Action || parameters.data.actions[\"Mouse Up\"] || parameters.data.actions[\"Mouse Down\"]));\n return _super.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: !!(options !== null && options !== void 0 && options.ignoreBorder),\n createQuadrilaterals: true\n });\n }\n\n _createClass(LinkAnnotationElement, [{\n key: \"render\",\n value: function render() {\n var data = this.data,\n linkService = this.linkService;\n var link = document.createElement(\"a\");\n\n if (data.url) {\n linkService.addLinkAttributes(link, data.url, data.newWindow);\n } else if (data.action) {\n this._bindNamedAction(link, data.action);\n } else if (data.dest) {\n this._bindLink(link, data.dest);\n } else {\n var hasClickAction = false;\n\n if (data.actions && (data.actions.Action || data.actions[\"Mouse Up\"] || data.actions[\"Mouse Down\"]) && this.enableScripting && this.hasJSActions) {\n hasClickAction = true;\n\n this._bindJSAction(link, data);\n }\n\n if (data.resetForm) {\n this._bindResetFormAction(link, data.resetForm);\n } else if (!hasClickAction) {\n this._bindLink(link, \"\");\n }\n }\n\n if (this.quadrilaterals) {\n return this._renderQuadrilaterals(\"linkAnnotation\").map(function (quadrilateral, index) {\n var linkElement = index === 0 ? link : link.cloneNode();\n quadrilateral.appendChild(linkElement);\n return quadrilateral;\n });\n }\n\n this.container.className = \"linkAnnotation\";\n this.container.appendChild(link);\n return this.container;\n }\n }, {\n key: \"_bindLink\",\n value: function _bindLink(link, destination) {\n var _this2 = this;\n\n link.href = this.linkService.getDestinationHash(destination);\n\n link.onclick = function () {\n if (destination) {\n _this2.linkService.goToDestination(destination);\n }\n\n return false;\n };\n\n if (destination || destination === \"\") {\n link.className = \"internalLink\";\n }\n }\n }, {\n key: \"_bindNamedAction\",\n value: function _bindNamedAction(link, action) {\n var _this3 = this;\n\n link.href = this.linkService.getAnchorUrl(\"\");\n\n link.onclick = function () {\n _this3.linkService.executeNamedAction(action);\n\n return false;\n };\n\n link.className = \"internalLink\";\n }\n }, {\n key: \"_bindJSAction\",\n value: function _bindJSAction(link, data) {\n var _this4 = this;\n\n link.href = this.linkService.getAnchorUrl(\"\");\n var map = new Map([[\"Action\", \"onclick\"], [\"Mouse Up\", \"onmouseup\"], [\"Mouse Down\", \"onmousedown\"]]);\n\n var _loop = function _loop() {\n var name = _Object$keys2[_i4];\n var jsName = map.get(name);\n\n if (!jsName) {\n return \"continue\";\n }\n\n link[jsName] = function () {\n var _this4$linkService$ev;\n\n (_this4$linkService$ev = _this4.linkService.eventBus) === null || _this4$linkService$ev === void 0 ? void 0 : _this4$linkService$ev.dispatch(\"dispatcheventinsandbox\", {\n source: _this4,\n detail: {\n id: data.id,\n name: name\n }\n });\n return false;\n };\n };\n\n for (var _i4 = 0, _Object$keys2 = Object.keys(data.actions); _i4 < _Object$keys2.length; _i4++) {\n var _ret = _loop();\n\n if (_ret === \"continue\") continue;\n }\n\n if (!link.onclick) {\n link.onclick = function () {\n return false;\n };\n }\n\n link.className = \"internalLink\";\n }\n }, {\n key: \"_bindResetFormAction\",\n value: function _bindResetFormAction(link, resetForm) {\n var _this5 = this;\n\n var otherClickAction = link.onclick;\n\n if (!otherClickAction) {\n link.href = this.linkService.getAnchorUrl(\"\");\n }\n\n link.className = \"internalLink\";\n\n if (!this._fieldObjects) {\n (0, _util.warn)(\"_bindResetFormAction - \\\"resetForm\\\" action not supported, \" + \"ensure that the `fieldObjects` parameter is provided.\");\n\n if (!otherClickAction) {\n link.onclick = function () {\n return false;\n };\n }\n\n return;\n }\n\n link.onclick = function () {\n if (otherClickAction) {\n otherClickAction();\n }\n\n var resetFormFields = resetForm.fields,\n resetFormRefs = resetForm.refs,\n include = resetForm.include;\n var allFields = [];\n\n if (resetFormFields.length !== 0 || resetFormRefs.length !== 0) {\n var fieldIds = new Set(resetFormRefs);\n\n var _iterator5 = _createForOfIteratorHelper(resetFormFields),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var fieldName = _step5.value;\n\n var _fields = _this5._fieldObjects[fieldName] || [];\n\n var _iterator7 = _createForOfIteratorHelper(_fields),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var id = _step7.value.id;\n fieldIds.add(id);\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n for (var _i5 = 0, _Object$values = Object.values(_this5._fieldObjects); _i5 < _Object$values.length; _i5++) {\n var fields = _Object$values[_i5];\n\n var _iterator6 = _createForOfIteratorHelper(fields),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var field = _step6.value;\n\n if (fieldIds.has(field.id) === include) {\n allFields.push(field);\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n }\n } else {\n for (var _i6 = 0, _Object$values2 = Object.values(_this5._fieldObjects); _i6 < _Object$values2.length; _i6++) {\n var _fields2 = _Object$values2[_i6];\n allFields.push.apply(allFields, _toConsumableArray(_fields2));\n }\n }\n\n var storage = _this5.annotationStorage;\n var allIds = [];\n\n for (var _i7 = 0, _allFields = allFields; _i7 < _allFields.length; _i7++) {\n var _field = _allFields[_i7];\n var _id2 = _field.id;\n allIds.push(_id2);\n\n switch (_field.type) {\n case \"text\":\n {\n var value = _field.defaultValue || \"\";\n storage.setValue(_id2, {\n value: value\n });\n break;\n }\n\n case \"checkbox\":\n case \"radiobutton\":\n {\n var _value = _field.defaultValue === _field.exportValues;\n\n storage.setValue(_id2, {\n value: _value\n });\n break;\n }\n\n case \"combobox\":\n case \"listbox\":\n {\n var _value2 = _field.defaultValue || \"\";\n\n storage.setValue(_id2, {\n value: _value2\n });\n break;\n }\n\n default:\n continue;\n }\n\n var domElement = document.getElementById(_id2);\n\n if (!domElement || !GetElementsByNameSet.has(domElement)) {\n continue;\n }\n\n domElement.dispatchEvent(new Event(\"resetform\"));\n }\n\n if (_this5.enableScripting) {\n var _this5$linkService$ev;\n\n (_this5$linkService$ev = _this5.linkService.eventBus) === null || _this5$linkService$ev === void 0 ? void 0 : _this5$linkService$ev.dispatch(\"dispatcheventinsandbox\", {\n source: _this5,\n detail: {\n id: \"app\",\n ids: allIds,\n name: \"ResetForm\"\n }\n });\n }\n\n return false;\n };\n }\n }]);\n\n return LinkAnnotationElement;\n}(AnnotationElement);\n\nvar TextAnnotationElement = /*#__PURE__*/function (_AnnotationElement2) {\n _inherits(TextAnnotationElement, _AnnotationElement2);\n\n var _super2 = _createSuper(TextAnnotationElement);\n\n function TextAnnotationElement(parameters) {\n var _parameters$data$titl, _parameters$data$cont, _parameters$data$rich;\n\n _classCallCheck(this, TextAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl = parameters.data.titleObj) !== null && _parameters$data$titl !== void 0 && _parameters$data$titl.str || (_parameters$data$cont = parameters.data.contentsObj) !== null && _parameters$data$cont !== void 0 && _parameters$data$cont.str || (_parameters$data$rich = parameters.data.richText) !== null && _parameters$data$rich !== void 0 && _parameters$data$rich.str);\n return _super2.call(this, parameters, {\n isRenderable: isRenderable\n });\n }\n\n _createClass(TextAnnotationElement, [{\n key: \"render\",\n value: function render() {\n this.container.className = \"textAnnotation\";\n var image = document.createElement(\"img\");\n image.style.height = this.container.style.height;\n image.style.width = this.container.style.width;\n image.src = this.imageResourcesPath + \"annotation-\" + this.data.name.toLowerCase() + \".svg\";\n image.alt = \"[{{type}} Annotation]\";\n image.dataset.l10nId = \"text_annotation_type\";\n image.dataset.l10nArgs = JSON.stringify({\n type: this.data.name\n });\n\n if (!this.data.hasPopup) {\n this._createPopup(image, this.data);\n }\n\n this.container.appendChild(image);\n return this.container;\n }\n }]);\n\n return TextAnnotationElement;\n}(AnnotationElement);\n\nvar WidgetAnnotationElement = /*#__PURE__*/function (_AnnotationElement3) {\n _inherits(WidgetAnnotationElement, _AnnotationElement3);\n\n var _super3 = _createSuper(WidgetAnnotationElement);\n\n function WidgetAnnotationElement() {\n _classCallCheck(this, WidgetAnnotationElement);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(WidgetAnnotationElement, [{\n key: \"render\",\n value: function render() {\n if (this.data.alternativeText) {\n this.container.title = this.data.alternativeText;\n }\n\n return this.container;\n }\n }, {\n key: \"_getKeyModifier\",\n value: function _getKeyModifier(event) {\n var _AnnotationElement$pl = AnnotationElement.platform,\n isWin = _AnnotationElement$pl.isWin,\n isMac = _AnnotationElement$pl.isMac;\n return isWin && event.ctrlKey || isMac && event.metaKey;\n }\n }, {\n key: \"_setEventListener\",\n value: function _setEventListener(element, baseName, eventName, valueGetter) {\n var _this6 = this;\n\n if (baseName.includes(\"mouse\")) {\n element.addEventListener(baseName, function (event) {\n var _this6$linkService$ev;\n\n (_this6$linkService$ev = _this6.linkService.eventBus) === null || _this6$linkService$ev === void 0 ? void 0 : _this6$linkService$ev.dispatch(\"dispatcheventinsandbox\", {\n source: _this6,\n detail: {\n id: _this6.data.id,\n name: eventName,\n value: valueGetter(event),\n shift: event.shiftKey,\n modifier: _this6._getKeyModifier(event)\n }\n });\n });\n } else {\n element.addEventListener(baseName, function (event) {\n var _this6$linkService$ev2;\n\n (_this6$linkService$ev2 = _this6.linkService.eventBus) === null || _this6$linkService$ev2 === void 0 ? void 0 : _this6$linkService$ev2.dispatch(\"dispatcheventinsandbox\", {\n source: _this6,\n detail: {\n id: _this6.data.id,\n name: eventName,\n value: valueGetter(event)\n }\n });\n });\n }\n }\n }, {\n key: \"_setEventListeners\",\n value: function _setEventListeners(element, names, getter) {\n var _iterator8 = _createForOfIteratorHelper(names),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var _this$data$actions;\n\n var _step8$value = _slicedToArray(_step8.value, 2),\n baseName = _step8$value[0],\n eventName = _step8$value[1];\n\n if (eventName === \"Action\" || (_this$data$actions = this.data.actions) !== null && _this$data$actions !== void 0 && _this$data$actions[eventName]) {\n this._setEventListener(element, baseName, eventName, getter);\n }\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n }\n }, {\n key: \"_setBackgroundColor\",\n value: function _setBackgroundColor(element) {\n var color = this.data.backgroundColor || null;\n element.style.backgroundColor = color === null ? \"transparent\" : _util.Util.makeHexColor(color[0], color[1], color[2]);\n }\n }]);\n\n return WidgetAnnotationElement;\n}(AnnotationElement);\n\nvar TextWidgetAnnotationElement = /*#__PURE__*/function (_WidgetAnnotationElem) {\n _inherits(TextWidgetAnnotationElement, _WidgetAnnotationElem);\n\n var _super4 = _createSuper(TextWidgetAnnotationElement);\n\n function TextWidgetAnnotationElement(parameters) {\n _classCallCheck(this, TextWidgetAnnotationElement);\n\n var isRenderable = parameters.renderForms || !parameters.data.hasAppearance && !!parameters.data.fieldValue;\n return _super4.call(this, parameters, {\n isRenderable: isRenderable\n });\n }\n\n _createClass(TextWidgetAnnotationElement, [{\n key: \"setPropertyOnSiblings\",\n value: function setPropertyOnSiblings(base, key, value, keyInStorage) {\n var storage = this.annotationStorage;\n\n var _iterator9 = _createForOfIteratorHelper(this._getElementsByName(base.name, base.id)),\n _step9;\n\n try {\n for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n var element = _step9.value;\n\n if (element.domElement) {\n element.domElement[key] = value;\n }\n\n storage.setValue(element.id, _defineProperty({}, keyInStorage, value));\n }\n } catch (err) {\n _iterator9.e(err);\n } finally {\n _iterator9.f();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this7 = this;\n\n var storage = this.annotationStorage;\n var id = this.data.id;\n this.container.className = \"textWidgetAnnotation\";\n var element = null;\n\n if (this.renderForms) {\n var storedData = storage.getValue(id, {\n value: this.data.fieldValue\n });\n var textContent = storedData.formattedValue || storedData.value || \"\";\n var elementData = {\n userValue: null,\n formattedValue: null,\n valueOnFocus: \"\"\n };\n\n if (this.data.multiLine) {\n element = document.createElement(\"textarea\");\n element.textContent = textContent;\n } else {\n element = document.createElement(\"input\");\n element.type = \"text\";\n element.setAttribute(\"value\", textContent);\n }\n\n GetElementsByNameSet.add(element);\n element.disabled = this.data.readOnly;\n element.name = this.data.fieldName;\n element.tabIndex = DEFAULT_TAB_INDEX;\n elementData.userValue = textContent;\n element.setAttribute(\"id\", id);\n element.addEventListener(\"input\", function (event) {\n storage.setValue(id, {\n value: event.target.value\n });\n\n _this7.setPropertyOnSiblings(element, \"value\", event.target.value, \"value\");\n });\n element.addEventListener(\"resetform\", function (event) {\n var _this7$data$defaultFi;\n\n var defaultValue = (_this7$data$defaultFi = _this7.data.defaultFieldValue) !== null && _this7$data$defaultFi !== void 0 ? _this7$data$defaultFi : \"\";\n element.value = elementData.userValue = defaultValue;\n elementData.formattedValue = null;\n });\n\n var blurListener = function blurListener(event) {\n var formattedValue = elementData.formattedValue;\n\n if (formattedValue !== null && formattedValue !== undefined) {\n event.target.value = formattedValue;\n }\n\n event.target.scrollLeft = 0;\n };\n\n if (this.enableScripting && this.hasJSActions) {\n var _this$data$actions2;\n\n element.addEventListener(\"focus\", function (event) {\n if (elementData.userValue) {\n event.target.value = elementData.userValue;\n }\n\n elementData.valueOnFocus = event.target.value;\n });\n element.addEventListener(\"updatefromsandbox\", function (jsEvent) {\n var actions = {\n value: function value(event) {\n var _event$detail$value;\n\n elementData.userValue = (_event$detail$value = event.detail.value) !== null && _event$detail$value !== void 0 ? _event$detail$value : \"\";\n storage.setValue(id, {\n value: elementData.userValue.toString()\n });\n event.target.value = elementData.userValue;\n },\n formattedValue: function formattedValue(event) {\n var formattedValue = event.detail.formattedValue;\n elementData.formattedValue = formattedValue;\n\n if (formattedValue !== null && formattedValue !== undefined && event.target !== document.activeElement) {\n event.target.value = formattedValue;\n }\n\n storage.setValue(id, {\n formattedValue: formattedValue\n });\n },\n selRange: function selRange(event) {\n var _event$target;\n\n (_event$target = event.target).setSelectionRange.apply(_event$target, _toConsumableArray(event.detail.selRange));\n }\n };\n\n _this7._dispatchEventFromSandbox(actions, jsEvent);\n });\n element.addEventListener(\"keydown\", function (event) {\n var _this7$linkService$ev;\n\n var commitKey = -1;\n\n if (event.key === \"Escape\") {\n commitKey = 0;\n } else if (event.key === \"Enter\") {\n commitKey = 2;\n } else if (event.key === \"Tab\") {\n commitKey = 3;\n }\n\n if (commitKey === -1) {\n return;\n }\n\n var value = event.target.value;\n\n if (elementData.valueOnFocus === value) {\n return;\n }\n\n elementData.userValue = value;\n (_this7$linkService$ev = _this7.linkService.eventBus) === null || _this7$linkService$ev === void 0 ? void 0 : _this7$linkService$ev.dispatch(\"dispatcheventinsandbox\", {\n source: _this7,\n detail: {\n id: id,\n name: \"Keystroke\",\n value: value,\n willCommit: true,\n commitKey: commitKey,\n selStart: event.target.selectionStart,\n selEnd: event.target.selectionEnd\n }\n });\n });\n var _blurListener = blurListener;\n blurListener = null;\n element.addEventListener(\"blur\", function (event) {\n var value = event.target.value;\n elementData.userValue = value;\n\n if (_this7._mouseState.isDown && elementData.valueOnFocus !== value) {\n var _this7$linkService$ev2;\n\n (_this7$linkService$ev2 = _this7.linkService.eventBus) === null || _this7$linkService$ev2 === void 0 ? void 0 : _this7$linkService$ev2.dispatch(\"dispatcheventinsandbox\", {\n source: _this7,\n detail: {\n id: id,\n name: \"Keystroke\",\n value: value,\n willCommit: true,\n commitKey: 1,\n selStart: event.target.selectionStart,\n selEnd: event.target.selectionEnd\n }\n });\n }\n\n _blurListener(event);\n });\n\n if ((_this$data$actions2 = this.data.actions) !== null && _this$data$actions2 !== void 0 && _this$data$actions2.Keystroke) {\n element.addEventListener(\"beforeinput\", function (event) {\n var _this7$linkService$ev3;\n\n var data = event.data,\n target = event.target;\n var value = target.value,\n selectionStart = target.selectionStart,\n selectionEnd = target.selectionEnd;\n var selStart = selectionStart,\n selEnd = selectionEnd;\n\n switch (event.inputType) {\n case \"deleteWordBackward\":\n {\n var match = value.substring(0, selectionStart).match(/\\w*[^\\w]*$/);\n\n if (match) {\n selStart -= match[0].length;\n }\n\n break;\n }\n\n case \"deleteWordForward\":\n {\n var _match = value.substring(selectionStart).match(/^[^\\w]*\\w*/);\n\n if (_match) {\n selEnd += _match[0].length;\n }\n\n break;\n }\n\n case \"deleteContentBackward\":\n if (selectionStart === selectionEnd) {\n selStart -= 1;\n }\n\n break;\n\n case \"deleteContentForward\":\n if (selectionStart === selectionEnd) {\n selEnd += 1;\n }\n\n break;\n }\n\n event.preventDefault();\n (_this7$linkService$ev3 = _this7.linkService.eventBus) === null || _this7$linkService$ev3 === void 0 ? void 0 : _this7$linkService$ev3.dispatch(\"dispatcheventinsandbox\", {\n source: _this7,\n detail: {\n id: id,\n name: \"Keystroke\",\n value: value,\n change: data || \"\",\n willCommit: false,\n selStart: selStart,\n selEnd: selEnd\n }\n });\n });\n }\n\n this._setEventListeners(element, [[\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], function (event) {\n return event.target.value;\n });\n }\n\n if (blurListener) {\n element.addEventListener(\"blur\", blurListener);\n }\n\n if (this.data.maxLen !== null) {\n element.maxLength = this.data.maxLen;\n }\n\n if (this.data.comb) {\n var fieldWidth = this.data.rect[2] - this.data.rect[0];\n var combWidth = fieldWidth / this.data.maxLen;\n element.classList.add(\"comb\");\n element.style.letterSpacing = \"calc(\".concat(combWidth, \"px - 1ch)\");\n }\n } else {\n element = document.createElement(\"div\");\n element.textContent = this.data.fieldValue;\n element.style.verticalAlign = \"middle\";\n element.style.display = \"table-cell\";\n }\n\n this._setTextStyle(element);\n\n this._setBackgroundColor(element);\n\n this._setDefaultPropertiesFromJS(element);\n\n this.container.appendChild(element);\n return this.container;\n }\n }, {\n key: \"_setTextStyle\",\n value: function _setTextStyle(element) {\n var TEXT_ALIGNMENT = [\"left\", \"center\", \"right\"];\n var _this$data$defaultApp = this.data.defaultAppearanceData,\n fontSize = _this$data$defaultApp.fontSize,\n fontColor = _this$data$defaultApp.fontColor;\n var style = element.style;\n\n if (fontSize) {\n style.fontSize = \"\".concat(fontSize, \"px\");\n }\n\n style.color = _util.Util.makeHexColor(fontColor[0], fontColor[1], fontColor[2]);\n\n if (this.data.textAlignment !== null) {\n style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment];\n }\n }\n }]);\n\n return TextWidgetAnnotationElement;\n}(WidgetAnnotationElement);\n\nvar CheckboxWidgetAnnotationElement = /*#__PURE__*/function (_WidgetAnnotationElem2) {\n _inherits(CheckboxWidgetAnnotationElement, _WidgetAnnotationElem2);\n\n var _super5 = _createSuper(CheckboxWidgetAnnotationElement);\n\n function CheckboxWidgetAnnotationElement(parameters) {\n _classCallCheck(this, CheckboxWidgetAnnotationElement);\n\n return _super5.call(this, parameters, {\n isRenderable: parameters.renderForms\n });\n }\n\n _createClass(CheckboxWidgetAnnotationElement, [{\n key: \"render\",\n value: function render() {\n var _this8 = this;\n\n var storage = this.annotationStorage;\n var data = this.data;\n var id = data.id;\n var value = storage.getValue(id, {\n value: data.exportValue === data.fieldValue\n }).value;\n\n if (typeof value === \"string\") {\n value = value !== \"Off\";\n storage.setValue(id, {\n value: value\n });\n }\n\n this.container.className = \"buttonWidgetAnnotation checkBox\";\n var element = document.createElement(\"input\");\n GetElementsByNameSet.add(element);\n element.disabled = data.readOnly;\n element.type = \"checkbox\";\n element.name = data.fieldName;\n\n if (value) {\n element.setAttribute(\"checked\", true);\n }\n\n element.setAttribute(\"id\", id);\n element.setAttribute(\"exportValue\", data.exportValue);\n element.tabIndex = DEFAULT_TAB_INDEX;\n element.addEventListener(\"change\", function (event) {\n var _event$target2 = event.target,\n name = _event$target2.name,\n checked = _event$target2.checked;\n\n var _iterator10 = _createForOfIteratorHelper(_this8._getElementsByName(name, id)),\n _step10;\n\n try {\n for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n var checkbox = _step10.value;\n var curChecked = checked && checkbox.exportValue === data.exportValue;\n\n if (checkbox.domElement) {\n checkbox.domElement.checked = curChecked;\n }\n\n storage.setValue(checkbox.id, {\n value: curChecked\n });\n }\n } catch (err) {\n _iterator10.e(err);\n } finally {\n _iterator10.f();\n }\n\n storage.setValue(id, {\n value: checked\n });\n });\n element.addEventListener(\"resetform\", function (event) {\n var defaultValue = data.defaultFieldValue || \"Off\";\n event.target.checked = defaultValue === data.exportValue;\n });\n\n if (this.enableScripting && this.hasJSActions) {\n element.addEventListener(\"updatefromsandbox\", function (jsEvent) {\n var actions = {\n value: function value(event) {\n event.target.checked = event.detail.value !== \"Off\";\n storage.setValue(id, {\n value: event.target.checked\n });\n }\n };\n\n _this8._dispatchEventFromSandbox(actions, jsEvent);\n });\n\n this._setEventListeners(element, [[\"change\", \"Validate\"], [\"change\", \"Action\"], [\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], function (event) {\n return event.target.checked;\n });\n }\n\n this._setBackgroundColor(element);\n\n this._setDefaultPropertiesFromJS(element);\n\n this.container.appendChild(element);\n return this.container;\n }\n }]);\n\n return CheckboxWidgetAnnotationElement;\n}(WidgetAnnotationElement);\n\nvar RadioButtonWidgetAnnotationElement = /*#__PURE__*/function (_WidgetAnnotationElem3) {\n _inherits(RadioButtonWidgetAnnotationElement, _WidgetAnnotationElem3);\n\n var _super6 = _createSuper(RadioButtonWidgetAnnotationElement);\n\n function RadioButtonWidgetAnnotationElement(parameters) {\n _classCallCheck(this, RadioButtonWidgetAnnotationElement);\n\n return _super6.call(this, parameters, {\n isRenderable: parameters.renderForms\n });\n }\n\n _createClass(RadioButtonWidgetAnnotationElement, [{\n key: \"render\",\n value: function render() {\n var _this9 = this;\n\n this.container.className = \"buttonWidgetAnnotation radioButton\";\n var storage = this.annotationStorage;\n var data = this.data;\n var id = data.id;\n var value = storage.getValue(id, {\n value: data.fieldValue === data.buttonValue\n }).value;\n\n if (typeof value === \"string\") {\n value = value !== data.buttonValue;\n storage.setValue(id, {\n value: value\n });\n }\n\n var element = document.createElement(\"input\");\n GetElementsByNameSet.add(element);\n element.disabled = data.readOnly;\n element.type = \"radio\";\n element.name = data.fieldName;\n\n if (value) {\n element.setAttribute(\"checked\", true);\n }\n\n element.setAttribute(\"id\", id);\n element.tabIndex = DEFAULT_TAB_INDEX;\n element.addEventListener(\"change\", function (event) {\n var _event$target3 = event.target,\n name = _event$target3.name,\n checked = _event$target3.checked;\n\n var _iterator11 = _createForOfIteratorHelper(_this9._getElementsByName(name, id)),\n _step11;\n\n try {\n for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n var radio = _step11.value;\n storage.setValue(radio.id, {\n value: false\n });\n }\n } catch (err) {\n _iterator11.e(err);\n } finally {\n _iterator11.f();\n }\n\n storage.setValue(id, {\n value: checked\n });\n });\n element.addEventListener(\"resetform\", function (event) {\n var defaultValue = data.defaultFieldValue;\n event.target.checked = defaultValue !== null && defaultValue !== undefined && defaultValue === data.buttonValue;\n });\n\n if (this.enableScripting && this.hasJSActions) {\n var pdfButtonValue = data.buttonValue;\n element.addEventListener(\"updatefromsandbox\", function (jsEvent) {\n var actions = {\n value: function value(event) {\n var checked = pdfButtonValue === event.detail.value;\n\n var _iterator12 = _createForOfIteratorHelper(_this9._getElementsByName(event.target.name)),\n _step12;\n\n try {\n for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n var radio = _step12.value;\n var curChecked = checked && radio.id === id;\n\n if (radio.domElement) {\n radio.domElement.checked = curChecked;\n }\n\n storage.setValue(radio.id, {\n value: curChecked\n });\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n }\n };\n\n _this9._dispatchEventFromSandbox(actions, jsEvent);\n });\n\n this._setEventListeners(element, [[\"change\", \"Validate\"], [\"change\", \"Action\"], [\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], function (event) {\n return event.target.checked;\n });\n }\n\n this._setBackgroundColor(element);\n\n this._setDefaultPropertiesFromJS(element);\n\n this.container.appendChild(element);\n return this.container;\n }\n }]);\n\n return RadioButtonWidgetAnnotationElement;\n}(WidgetAnnotationElement);\n\nvar PushButtonWidgetAnnotationElement = /*#__PURE__*/function (_LinkAnnotationElemen) {\n _inherits(PushButtonWidgetAnnotationElement, _LinkAnnotationElemen);\n\n var _super7 = _createSuper(PushButtonWidgetAnnotationElement);\n\n function PushButtonWidgetAnnotationElement(parameters) {\n _classCallCheck(this, PushButtonWidgetAnnotationElement);\n\n return _super7.call(this, parameters, {\n ignoreBorder: parameters.data.hasAppearance\n });\n }\n\n _createClass(PushButtonWidgetAnnotationElement, [{\n key: \"render\",\n value: function render() {\n var container = _get(_getPrototypeOf(PushButtonWidgetAnnotationElement.prototype), \"render\", this).call(this);\n\n container.className = \"buttonWidgetAnnotation pushButton\";\n\n if (this.data.alternativeText) {\n container.title = this.data.alternativeText;\n }\n\n this._setDefaultPropertiesFromJS(container);\n\n return container;\n }\n }]);\n\n return PushButtonWidgetAnnotationElement;\n}(LinkAnnotationElement);\n\nvar ChoiceWidgetAnnotationElement = /*#__PURE__*/function (_WidgetAnnotationElem4) {\n _inherits(ChoiceWidgetAnnotationElement, _WidgetAnnotationElem4);\n\n var _super8 = _createSuper(ChoiceWidgetAnnotationElement);\n\n function ChoiceWidgetAnnotationElement(parameters) {\n _classCallCheck(this, ChoiceWidgetAnnotationElement);\n\n return _super8.call(this, parameters, {\n isRenderable: parameters.renderForms\n });\n }\n\n _createClass(ChoiceWidgetAnnotationElement, [{\n key: \"render\",\n value: function render() {\n var _this10 = this;\n\n this.container.className = \"choiceWidgetAnnotation\";\n var storage = this.annotationStorage;\n var id = this.data.id;\n var storedData = storage.getValue(id, {\n value: this.data.fieldValue\n });\n var fontSize = this.data.defaultAppearanceData.fontSize;\n\n if (!fontSize) {\n fontSize = 9;\n }\n\n var fontSizeStyle = \"calc(\".concat(fontSize, \"px * var(--zoom-factor))\");\n var selectElement = document.createElement(\"select\");\n GetElementsByNameSet.add(selectElement);\n selectElement.disabled = this.data.readOnly;\n selectElement.name = this.data.fieldName;\n selectElement.setAttribute(\"id\", id);\n selectElement.tabIndex = DEFAULT_TAB_INDEX;\n selectElement.style.fontSize = \"\".concat(fontSize, \"px\");\n\n if (!this.data.combo) {\n selectElement.size = this.data.options.length;\n\n if (this.data.multiSelect) {\n selectElement.multiple = true;\n }\n }\n\n selectElement.addEventListener(\"resetform\", function (event) {\n var defaultValue = _this10.data.defaultFieldValue;\n\n var _iterator13 = _createForOfIteratorHelper(selectElement.options),\n _step13;\n\n try {\n for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {\n var option = _step13.value;\n option.selected = option.value === defaultValue;\n }\n } catch (err) {\n _iterator13.e(err);\n } finally {\n _iterator13.f();\n }\n });\n\n var _iterator14 = _createForOfIteratorHelper(this.data.options),\n _step14;\n\n try {\n for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {\n var option = _step14.value;\n var optionElement = document.createElement(\"option\");\n optionElement.textContent = option.displayValue;\n optionElement.value = option.exportValue;\n\n if (this.data.combo) {\n optionElement.style.fontSize = fontSizeStyle;\n }\n\n if (storedData.value.includes(option.exportValue)) {\n optionElement.setAttribute(\"selected\", true);\n }\n\n selectElement.appendChild(optionElement);\n }\n } catch (err) {\n _iterator14.e(err);\n } finally {\n _iterator14.f();\n }\n\n var getValue = function getValue(event, isExport) {\n var name = isExport ? \"value\" : \"textContent\";\n var options = event.target.options;\n\n if (!event.target.multiple) {\n return options.selectedIndex === -1 ? null : options[options.selectedIndex][name];\n }\n\n return Array.prototype.filter.call(options, function (option) {\n return option.selected;\n }).map(function (option) {\n return option[name];\n });\n };\n\n var getItems = function getItems(event) {\n var options = event.target.options;\n return Array.prototype.map.call(options, function (option) {\n return {\n displayValue: option.textContent,\n exportValue: option.value\n };\n });\n };\n\n if (this.enableScripting && this.hasJSActions) {\n selectElement.addEventListener(\"updatefromsandbox\", function (jsEvent) {\n var actions = {\n value: function value(event) {\n var value = event.detail.value;\n var values = new Set(Array.isArray(value) ? value : [value]);\n\n var _iterator15 = _createForOfIteratorHelper(selectElement.options),\n _step15;\n\n try {\n for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {\n var option = _step15.value;\n option.selected = values.has(option.value);\n }\n } catch (err) {\n _iterator15.e(err);\n } finally {\n _iterator15.f();\n }\n\n storage.setValue(id, {\n value: getValue(event, true)\n });\n },\n multipleSelection: function multipleSelection(event) {\n selectElement.multiple = true;\n },\n remove: function remove(event) {\n var options = selectElement.options;\n var index = event.detail.remove;\n options[index].selected = false;\n selectElement.remove(index);\n\n if (options.length > 0) {\n var i = Array.prototype.findIndex.call(options, function (option) {\n return option.selected;\n });\n\n if (i === -1) {\n options[0].selected = true;\n }\n }\n\n storage.setValue(id, {\n value: getValue(event, true),\n items: getItems(event)\n });\n },\n clear: function clear(event) {\n while (selectElement.length !== 0) {\n selectElement.remove(0);\n }\n\n storage.setValue(id, {\n value: null,\n items: []\n });\n },\n insert: function insert(event) {\n var _event$detail$insert = event.detail.insert,\n index = _event$detail$insert.index,\n displayValue = _event$detail$insert.displayValue,\n exportValue = _event$detail$insert.exportValue;\n var optionElement = document.createElement(\"option\");\n optionElement.textContent = displayValue;\n optionElement.value = exportValue;\n selectElement.insertBefore(optionElement, selectElement.children[index]);\n storage.setValue(id, {\n value: getValue(event, true),\n items: getItems(event)\n });\n },\n items: function items(event) {\n var items = event.detail.items;\n\n while (selectElement.length !== 0) {\n selectElement.remove(0);\n }\n\n var _iterator16 = _createForOfIteratorHelper(items),\n _step16;\n\n try {\n for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {\n var item = _step16.value;\n var displayValue = item.displayValue,\n exportValue = item.exportValue;\n var optionElement = document.createElement(\"option\");\n optionElement.textContent = displayValue;\n optionElement.value = exportValue;\n selectElement.appendChild(optionElement);\n }\n } catch (err) {\n _iterator16.e(err);\n } finally {\n _iterator16.f();\n }\n\n if (selectElement.options.length > 0) {\n selectElement.options[0].selected = true;\n }\n\n storage.setValue(id, {\n value: getValue(event, true),\n items: getItems(event)\n });\n },\n indices: function indices(event) {\n var indices = new Set(event.detail.indices);\n\n var _iterator17 = _createForOfIteratorHelper(event.target.options),\n _step17;\n\n try {\n for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {\n var option = _step17.value;\n option.selected = indices.has(option.index);\n }\n } catch (err) {\n _iterator17.e(err);\n } finally {\n _iterator17.f();\n }\n\n storage.setValue(id, {\n value: getValue(event, true)\n });\n },\n editable: function editable(event) {\n event.target.disabled = !event.detail.editable;\n }\n };\n\n _this10._dispatchEventFromSandbox(actions, jsEvent);\n });\n selectElement.addEventListener(\"input\", function (event) {\n var _this10$linkService$e;\n\n var exportValue = getValue(event, true);\n var value = getValue(event, false);\n storage.setValue(id, {\n value: exportValue\n });\n (_this10$linkService$e = _this10.linkService.eventBus) === null || _this10$linkService$e === void 0 ? void 0 : _this10$linkService$e.dispatch(\"dispatcheventinsandbox\", {\n source: _this10,\n detail: {\n id: id,\n name: \"Keystroke\",\n value: value,\n changeEx: exportValue,\n willCommit: true,\n commitKey: 1,\n keyDown: false\n }\n });\n });\n\n this._setEventListeners(selectElement, [[\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"], [\"input\", \"Action\"]], function (event) {\n return event.target.checked;\n });\n } else {\n selectElement.addEventListener(\"input\", function (event) {\n storage.setValue(id, {\n value: getValue(event, true)\n });\n });\n }\n\n this._setBackgroundColor(selectElement);\n\n this._setDefaultPropertiesFromJS(selectElement);\n\n this.container.appendChild(selectElement);\n return this.container;\n }\n }]);\n\n return ChoiceWidgetAnnotationElement;\n}(WidgetAnnotationElement);\n\nvar PopupAnnotationElement = /*#__PURE__*/function (_AnnotationElement4) {\n _inherits(PopupAnnotationElement, _AnnotationElement4);\n\n var _super9 = _createSuper(PopupAnnotationElement);\n\n function PopupAnnotationElement(parameters) {\n var _parameters$data$titl2, _parameters$data$cont2, _parameters$data$rich2;\n\n _classCallCheck(this, PopupAnnotationElement);\n\n var isRenderable = !!((_parameters$data$titl2 = parameters.data.titleObj) !== null && _parameters$data$titl2 !== void 0 && _parameters$data$titl2.str || (_parameters$data$cont2 = parameters.data.contentsObj) !== null && _parameters$data$cont2 !== void 0 && _parameters$data$cont2.str || (_parameters$data$rich2 = parameters.data.richText) !== null && _parameters$data$rich2 !== void 0 && _parameters$data$rich2.str);\n return _super9.call(this, parameters, {\n isRenderable: isRenderable\n });\n }\n\n _createClass(PopupAnnotationElement, [{\n key: \"render\",\n value: function render() {\n var IGNORE_TYPES = [\"Line\", \"Square\", \"Circle\", \"PolyLine\", \"Polygon\", \"Ink\"];\n this.container.className = \"popupAnnotation\";\n\n if (IGNORE_TYPES.includes(this.data.parentType)) {\n return this.container;\n }\n\n var selector = \"[data-annotation-id=\\\"\".concat(this.data.parentId, \"\\\"]\");\n var parentElements = this.layer.querySelectorAll(selector);\n\n if (parentElements.length === 0) {\n return this.container;\n }\n\n var popup = new PopupElement({\n container: this.container,\n trigger: Array.from(parentElements),\n color: this.data.color,\n titleObj: this.data.titleObj,\n modificationDate: this.data.modificationDate,\n contentsObj: this.data.contentsObj,\n richText: this.data.richText\n });\n var page = this.page;\n\n var rect = _util.Util.normalizeRect([this.data.parentRect[0], page.view[3] - this.data.parentRect[1] + page.view[1], this.data.parentRect[2], page.view[3] - this.data.parentRect[3] + page.view[1]]);\n\n var popupLeft = rect[0] + this.data.parentRect[2] - this.data.parentRect[0];\n var popupTop = rect[1];\n this.container.style.transformOrigin = \"\".concat(-popupLeft, \"px \").concat(-popupTop, \"px\");\n this.container.style.left = \"\".concat(popupLeft, \"px\");\n this.container.style.top = \"\".concat(popupTop, \"px\");\n this.container.appendChild(popup.render());\n return this.container;\n }\n }]);\n\n return PopupAnnotationElement;\n}(AnnotationElement);\n\nvar PopupElement = /*#__PURE__*/function () {\n function PopupElement(parameters) {\n _classCallCheck(this, PopupElement);\n\n this.container = parameters.container;\n this.trigger = parameters.trigger;\n this.color = parameters.color;\n this.titleObj = parameters.titleObj;\n this.modificationDate = parameters.modificationDate;\n this.contentsObj = parameters.contentsObj;\n this.richText = parameters.richText;\n this.hideWrapper = parameters.hideWrapper || false;\n this.pinned = false;\n }\n\n _createClass(PopupElement, [{\n key: \"render\",\n value: function render() {\n var _this$richText, _this$contentsObj;\n\n var BACKGROUND_ENLIGHT = 0.7;\n var wrapper = document.createElement(\"div\");\n wrapper.className = \"popupWrapper\";\n this.hideElement = this.hideWrapper ? wrapper : this.container;\n this.hideElement.hidden = true;\n var popup = document.createElement(\"div\");\n popup.className = \"popup\";\n var color = this.color;\n\n if (color) {\n var r = BACKGROUND_ENLIGHT * (255 - color[0]) + color[0];\n var g = BACKGROUND_ENLIGHT * (255 - color[1]) + color[1];\n var b = BACKGROUND_ENLIGHT * (255 - color[2]) + color[2];\n popup.style.backgroundColor = _util.Util.makeHexColor(r | 0, g | 0, b | 0);\n }\n\n var title = document.createElement(\"h1\");\n title.dir = this.titleObj.dir;\n title.textContent = this.titleObj.str;\n popup.appendChild(title);\n\n var dateObject = _display_utils.PDFDateString.toDateObject(this.modificationDate);\n\n if (dateObject) {\n var modificationDate = document.createElement(\"span\");\n modificationDate.className = \"popupDate\";\n modificationDate.textContent = \"{{date}}, {{time}}\";\n modificationDate.dataset.l10nId = \"annotation_date_string\";\n modificationDate.dataset.l10nArgs = JSON.stringify({\n date: dateObject.toLocaleDateString(),\n time: dateObject.toLocaleTimeString()\n });\n popup.appendChild(modificationDate);\n }\n\n if ((_this$richText = this.richText) !== null && _this$richText !== void 0 && _this$richText.str && (!((_this$contentsObj = this.contentsObj) !== null && _this$contentsObj !== void 0 && _this$contentsObj.str) || this.contentsObj.str === this.richText.str)) {\n _xfa_layer.XfaLayer.render({\n xfaHtml: this.richText.html,\n intent: \"richText\",\n div: popup\n });\n\n popup.lastChild.className = \"richText popupContent\";\n } else {\n var contents = this._formatContents(this.contentsObj);\n\n popup.appendChild(contents);\n }\n\n if (!Array.isArray(this.trigger)) {\n this.trigger = [this.trigger];\n }\n\n var _iterator18 = _createForOfIteratorHelper(this.trigger),\n _step18;\n\n try {\n for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {\n var element = _step18.value;\n element.addEventListener(\"click\", this._toggle.bind(this));\n element.addEventListener(\"mouseover\", this._show.bind(this, false));\n element.addEventListener(\"mouseout\", this._hide.bind(this, false));\n }\n } catch (err) {\n _iterator18.e(err);\n } finally {\n _iterator18.f();\n }\n\n popup.addEventListener(\"click\", this._hide.bind(this, true));\n wrapper.appendChild(popup);\n return wrapper;\n }\n }, {\n key: \"_formatContents\",\n value: function _formatContents(_ref2) {\n var str = _ref2.str,\n dir = _ref2.dir;\n var p = document.createElement(\"p\");\n p.className = \"popupContent\";\n p.dir = dir;\n var lines = str.split(/(?:\\r\\n?|\\n)/);\n\n for (var i = 0, ii = lines.length; i < ii; ++i) {\n var line = lines[i];\n p.appendChild(document.createTextNode(line));\n\n if (i < ii - 1) {\n p.appendChild(document.createElement(\"br\"));\n }\n }\n\n return p;\n }\n }, {\n key: \"_toggle\",\n value: function _toggle() {\n if (this.pinned) {\n this._hide(true);\n } else {\n this._show(true);\n }\n }\n }, {\n key: \"_show\",\n value: function _show() {\n var pin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (pin) {\n this.pinned = true;\n }\n\n if (this.hideElement.hidden) {\n this.hideElement.hidden = false;\n this.container.style.zIndex += 1;\n }\n }\n }, {\n key: \"_hide\",\n value: function _hide() {\n var unpin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (unpin) {\n this.pinned = false;\n }\n\n if (!this.hideElement.hidden && !this.pinned) {\n this.hideElement.hidden = true;\n this.container.style.zIndex -= 1;\n }\n }\n }]);\n\n return PopupElement;\n}();\n\nvar FreeTextAnnotationElement = /*#__PURE__*/function (_AnnotationElement5) {\n _inherits(FreeTextAnnotationElement, _AnnotationElement5);\n\n var _super10 = _createSuper(FreeTextAnnotationElement);\n\n function FreeTextAnnotationElement(parameters) {\n var _parameters$data$titl3, _parameters$data$cont3, _parameters$data$rich3;\n\n _classCallCheck(this, FreeTextAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl3 = parameters.data.titleObj) !== null && _parameters$data$titl3 !== void 0 && _parameters$data$titl3.str || (_parameters$data$cont3 = parameters.data.contentsObj) !== null && _parameters$data$cont3 !== void 0 && _parameters$data$cont3.str || (_parameters$data$rich3 = parameters.data.richText) !== null && _parameters$data$rich3 !== void 0 && _parameters$data$rich3.str);\n return _super10.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true\n });\n }\n\n _createClass(FreeTextAnnotationElement, [{\n key: \"render\",\n value: function render() {\n this.container.className = \"freeTextAnnotation\";\n\n if (!this.data.hasPopup) {\n this._createPopup(null, this.data);\n }\n\n return this.container;\n }\n }]);\n\n return FreeTextAnnotationElement;\n}(AnnotationElement);\n\nvar LineAnnotationElement = /*#__PURE__*/function (_AnnotationElement6) {\n _inherits(LineAnnotationElement, _AnnotationElement6);\n\n var _super11 = _createSuper(LineAnnotationElement);\n\n function LineAnnotationElement(parameters) {\n var _parameters$data$titl4, _parameters$data$cont4, _parameters$data$rich4;\n\n _classCallCheck(this, LineAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl4 = parameters.data.titleObj) !== null && _parameters$data$titl4 !== void 0 && _parameters$data$titl4.str || (_parameters$data$cont4 = parameters.data.contentsObj) !== null && _parameters$data$cont4 !== void 0 && _parameters$data$cont4.str || (_parameters$data$rich4 = parameters.data.richText) !== null && _parameters$data$rich4 !== void 0 && _parameters$data$rich4.str);\n return _super11.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true\n });\n }\n\n _createClass(LineAnnotationElement, [{\n key: \"render\",\n value: function render() {\n this.container.className = \"lineAnnotation\";\n var data = this.data;\n\n var _getRectDims2 = getRectDims(data.rect),\n width = _getRectDims2.width,\n height = _getRectDims2.height;\n\n var svg = this.svgFactory.create(width, height);\n var line = this.svgFactory.createElement(\"svg:line\");\n line.setAttribute(\"x1\", data.rect[2] - data.lineCoordinates[0]);\n line.setAttribute(\"y1\", data.rect[3] - data.lineCoordinates[1]);\n line.setAttribute(\"x2\", data.rect[2] - data.lineCoordinates[2]);\n line.setAttribute(\"y2\", data.rect[3] - data.lineCoordinates[3]);\n line.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n line.setAttribute(\"stroke\", \"transparent\");\n line.setAttribute(\"fill\", \"transparent\");\n svg.appendChild(line);\n this.container.append(svg);\n\n this._createPopup(line, data);\n\n return this.container;\n }\n }]);\n\n return LineAnnotationElement;\n}(AnnotationElement);\n\nvar SquareAnnotationElement = /*#__PURE__*/function (_AnnotationElement7) {\n _inherits(SquareAnnotationElement, _AnnotationElement7);\n\n var _super12 = _createSuper(SquareAnnotationElement);\n\n function SquareAnnotationElement(parameters) {\n var _parameters$data$titl5, _parameters$data$cont5, _parameters$data$rich5;\n\n _classCallCheck(this, SquareAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl5 = parameters.data.titleObj) !== null && _parameters$data$titl5 !== void 0 && _parameters$data$titl5.str || (_parameters$data$cont5 = parameters.data.contentsObj) !== null && _parameters$data$cont5 !== void 0 && _parameters$data$cont5.str || (_parameters$data$rich5 = parameters.data.richText) !== null && _parameters$data$rich5 !== void 0 && _parameters$data$rich5.str);\n return _super12.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true\n });\n }\n\n _createClass(SquareAnnotationElement, [{\n key: \"render\",\n value: function render() {\n this.container.className = \"squareAnnotation\";\n var data = this.data;\n\n var _getRectDims3 = getRectDims(data.rect),\n width = _getRectDims3.width,\n height = _getRectDims3.height;\n\n var svg = this.svgFactory.create(width, height);\n var borderWidth = data.borderStyle.width;\n var square = this.svgFactory.createElement(\"svg:rect\");\n square.setAttribute(\"x\", borderWidth / 2);\n square.setAttribute(\"y\", borderWidth / 2);\n square.setAttribute(\"width\", width - borderWidth);\n square.setAttribute(\"height\", height - borderWidth);\n square.setAttribute(\"stroke-width\", borderWidth || 1);\n square.setAttribute(\"stroke\", \"transparent\");\n square.setAttribute(\"fill\", \"transparent\");\n svg.appendChild(square);\n this.container.append(svg);\n\n this._createPopup(square, data);\n\n return this.container;\n }\n }]);\n\n return SquareAnnotationElement;\n}(AnnotationElement);\n\nvar CircleAnnotationElement = /*#__PURE__*/function (_AnnotationElement8) {\n _inherits(CircleAnnotationElement, _AnnotationElement8);\n\n var _super13 = _createSuper(CircleAnnotationElement);\n\n function CircleAnnotationElement(parameters) {\n var _parameters$data$titl6, _parameters$data$cont6, _parameters$data$rich6;\n\n _classCallCheck(this, CircleAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl6 = parameters.data.titleObj) !== null && _parameters$data$titl6 !== void 0 && _parameters$data$titl6.str || (_parameters$data$cont6 = parameters.data.contentsObj) !== null && _parameters$data$cont6 !== void 0 && _parameters$data$cont6.str || (_parameters$data$rich6 = parameters.data.richText) !== null && _parameters$data$rich6 !== void 0 && _parameters$data$rich6.str);\n return _super13.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true\n });\n }\n\n _createClass(CircleAnnotationElement, [{\n key: \"render\",\n value: function render() {\n this.container.className = \"circleAnnotation\";\n var data = this.data;\n\n var _getRectDims4 = getRectDims(data.rect),\n width = _getRectDims4.width,\n height = _getRectDims4.height;\n\n var svg = this.svgFactory.create(width, height);\n var borderWidth = data.borderStyle.width;\n var circle = this.svgFactory.createElement(\"svg:ellipse\");\n circle.setAttribute(\"cx\", width / 2);\n circle.setAttribute(\"cy\", height / 2);\n circle.setAttribute(\"rx\", width / 2 - borderWidth / 2);\n circle.setAttribute(\"ry\", height / 2 - borderWidth / 2);\n circle.setAttribute(\"stroke-width\", borderWidth || 1);\n circle.setAttribute(\"stroke\", \"transparent\");\n circle.setAttribute(\"fill\", \"transparent\");\n svg.appendChild(circle);\n this.container.append(svg);\n\n this._createPopup(circle, data);\n\n return this.container;\n }\n }]);\n\n return CircleAnnotationElement;\n}(AnnotationElement);\n\nvar PolylineAnnotationElement = /*#__PURE__*/function (_AnnotationElement9) {\n _inherits(PolylineAnnotationElement, _AnnotationElement9);\n\n var _super14 = _createSuper(PolylineAnnotationElement);\n\n function PolylineAnnotationElement(parameters) {\n var _parameters$data$titl7, _parameters$data$cont7, _parameters$data$rich7;\n\n var _this11;\n\n _classCallCheck(this, PolylineAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl7 = parameters.data.titleObj) !== null && _parameters$data$titl7 !== void 0 && _parameters$data$titl7.str || (_parameters$data$cont7 = parameters.data.contentsObj) !== null && _parameters$data$cont7 !== void 0 && _parameters$data$cont7.str || (_parameters$data$rich7 = parameters.data.richText) !== null && _parameters$data$rich7 !== void 0 && _parameters$data$rich7.str);\n _this11 = _super14.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true\n });\n _this11.containerClassName = \"polylineAnnotation\";\n _this11.svgElementName = \"svg:polyline\";\n return _this11;\n }\n\n _createClass(PolylineAnnotationElement, [{\n key: \"render\",\n value: function render() {\n this.container.className = this.containerClassName;\n var data = this.data;\n\n var _getRectDims5 = getRectDims(data.rect),\n width = _getRectDims5.width,\n height = _getRectDims5.height;\n\n var svg = this.svgFactory.create(width, height);\n var points = [];\n\n var _iterator19 = _createForOfIteratorHelper(data.vertices),\n _step19;\n\n try {\n for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {\n var coordinate = _step19.value;\n var x = coordinate.x - data.rect[0];\n var y = data.rect[3] - coordinate.y;\n points.push(x + \",\" + y);\n }\n } catch (err) {\n _iterator19.e(err);\n } finally {\n _iterator19.f();\n }\n\n points = points.join(\" \");\n var polyline = this.svgFactory.createElement(this.svgElementName);\n polyline.setAttribute(\"points\", points);\n polyline.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n polyline.setAttribute(\"stroke\", \"transparent\");\n polyline.setAttribute(\"fill\", \"transparent\");\n svg.appendChild(polyline);\n this.container.append(svg);\n\n this._createPopup(polyline, data);\n\n return this.container;\n }\n }]);\n\n return PolylineAnnotationElement;\n}(AnnotationElement);\n\nvar PolygonAnnotationElement = /*#__PURE__*/function (_PolylineAnnotationEl) {\n _inherits(PolygonAnnotationElement, _PolylineAnnotationEl);\n\n var _super15 = _createSuper(PolygonAnnotationElement);\n\n function PolygonAnnotationElement(parameters) {\n var _this12;\n\n _classCallCheck(this, PolygonAnnotationElement);\n\n _this12 = _super15.call(this, parameters);\n _this12.containerClassName = \"polygonAnnotation\";\n _this12.svgElementName = \"svg:polygon\";\n return _this12;\n }\n\n return _createClass(PolygonAnnotationElement);\n}(PolylineAnnotationElement);\n\nvar CaretAnnotationElement = /*#__PURE__*/function (_AnnotationElement10) {\n _inherits(CaretAnnotationElement, _AnnotationElement10);\n\n var _super16 = _createSuper(CaretAnnotationElement);\n\n function CaretAnnotationElement(parameters) {\n var _parameters$data$titl8, _parameters$data$cont8, _parameters$data$rich8;\n\n _classCallCheck(this, CaretAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl8 = parameters.data.titleObj) !== null && _parameters$data$titl8 !== void 0 && _parameters$data$titl8.str || (_parameters$data$cont8 = parameters.data.contentsObj) !== null && _parameters$data$cont8 !== void 0 && _parameters$data$cont8.str || (_parameters$data$rich8 = parameters.data.richText) !== null && _parameters$data$rich8 !== void 0 && _parameters$data$rich8.str);\n return _super16.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true\n });\n }\n\n _createClass(CaretAnnotationElement, [{\n key: \"render\",\n value: function render() {\n this.container.className = \"caretAnnotation\";\n\n if (!this.data.hasPopup) {\n this._createPopup(null, this.data);\n }\n\n return this.container;\n }\n }]);\n\n return CaretAnnotationElement;\n}(AnnotationElement);\n\nvar InkAnnotationElement = /*#__PURE__*/function (_AnnotationElement11) {\n _inherits(InkAnnotationElement, _AnnotationElement11);\n\n var _super17 = _createSuper(InkAnnotationElement);\n\n function InkAnnotationElement(parameters) {\n var _parameters$data$titl9, _parameters$data$cont9, _parameters$data$rich9;\n\n var _this13;\n\n _classCallCheck(this, InkAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl9 = parameters.data.titleObj) !== null && _parameters$data$titl9 !== void 0 && _parameters$data$titl9.str || (_parameters$data$cont9 = parameters.data.contentsObj) !== null && _parameters$data$cont9 !== void 0 && _parameters$data$cont9.str || (_parameters$data$rich9 = parameters.data.richText) !== null && _parameters$data$rich9 !== void 0 && _parameters$data$rich9.str);\n _this13 = _super17.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true\n });\n _this13.containerClassName = \"inkAnnotation\";\n _this13.svgElementName = \"svg:polyline\";\n return _this13;\n }\n\n _createClass(InkAnnotationElement, [{\n key: \"render\",\n value: function render() {\n this.container.className = this.containerClassName;\n var data = this.data;\n\n var _getRectDims6 = getRectDims(data.rect),\n width = _getRectDims6.width,\n height = _getRectDims6.height;\n\n var svg = this.svgFactory.create(width, height);\n\n var _iterator20 = _createForOfIteratorHelper(data.inkLists),\n _step20;\n\n try {\n for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {\n var inkList = _step20.value;\n var points = [];\n\n var _iterator21 = _createForOfIteratorHelper(inkList),\n _step21;\n\n try {\n for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {\n var coordinate = _step21.value;\n var x = coordinate.x - data.rect[0];\n var y = data.rect[3] - coordinate.y;\n points.push(\"\".concat(x, \",\").concat(y));\n }\n } catch (err) {\n _iterator21.e(err);\n } finally {\n _iterator21.f();\n }\n\n points = points.join(\" \");\n var polyline = this.svgFactory.createElement(this.svgElementName);\n polyline.setAttribute(\"points\", points);\n polyline.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n polyline.setAttribute(\"stroke\", \"transparent\");\n polyline.setAttribute(\"fill\", \"transparent\");\n\n this._createPopup(polyline, data);\n\n svg.appendChild(polyline);\n }\n } catch (err) {\n _iterator20.e(err);\n } finally {\n _iterator20.f();\n }\n\n this.container.append(svg);\n return this.container;\n }\n }]);\n\n return InkAnnotationElement;\n}(AnnotationElement);\n\nvar HighlightAnnotationElement = /*#__PURE__*/function (_AnnotationElement12) {\n _inherits(HighlightAnnotationElement, _AnnotationElement12);\n\n var _super18 = _createSuper(HighlightAnnotationElement);\n\n function HighlightAnnotationElement(parameters) {\n var _parameters$data$titl10, _parameters$data$cont10, _parameters$data$rich10;\n\n _classCallCheck(this, HighlightAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl10 = parameters.data.titleObj) !== null && _parameters$data$titl10 !== void 0 && _parameters$data$titl10.str || (_parameters$data$cont10 = parameters.data.contentsObj) !== null && _parameters$data$cont10 !== void 0 && _parameters$data$cont10.str || (_parameters$data$rich10 = parameters.data.richText) !== null && _parameters$data$rich10 !== void 0 && _parameters$data$rich10.str);\n return _super18.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n\n _createClass(HighlightAnnotationElement, [{\n key: \"render\",\n value: function render() {\n if (!this.data.hasPopup) {\n this._createPopup(null, this.data);\n }\n\n if (this.quadrilaterals) {\n return this._renderQuadrilaterals(\"highlightAnnotation\");\n }\n\n this.container.className = \"highlightAnnotation\";\n return this.container;\n }\n }]);\n\n return HighlightAnnotationElement;\n}(AnnotationElement);\n\nvar UnderlineAnnotationElement = /*#__PURE__*/function (_AnnotationElement13) {\n _inherits(UnderlineAnnotationElement, _AnnotationElement13);\n\n var _super19 = _createSuper(UnderlineAnnotationElement);\n\n function UnderlineAnnotationElement(parameters) {\n var _parameters$data$titl11, _parameters$data$cont11, _parameters$data$rich11;\n\n _classCallCheck(this, UnderlineAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl11 = parameters.data.titleObj) !== null && _parameters$data$titl11 !== void 0 && _parameters$data$titl11.str || (_parameters$data$cont11 = parameters.data.contentsObj) !== null && _parameters$data$cont11 !== void 0 && _parameters$data$cont11.str || (_parameters$data$rich11 = parameters.data.richText) !== null && _parameters$data$rich11 !== void 0 && _parameters$data$rich11.str);\n return _super19.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n\n _createClass(UnderlineAnnotationElement, [{\n key: \"render\",\n value: function render() {\n if (!this.data.hasPopup) {\n this._createPopup(null, this.data);\n }\n\n if (this.quadrilaterals) {\n return this._renderQuadrilaterals(\"underlineAnnotation\");\n }\n\n this.container.className = \"underlineAnnotation\";\n return this.container;\n }\n }]);\n\n return UnderlineAnnotationElement;\n}(AnnotationElement);\n\nvar SquigglyAnnotationElement = /*#__PURE__*/function (_AnnotationElement14) {\n _inherits(SquigglyAnnotationElement, _AnnotationElement14);\n\n var _super20 = _createSuper(SquigglyAnnotationElement);\n\n function SquigglyAnnotationElement(parameters) {\n var _parameters$data$titl12, _parameters$data$cont12, _parameters$data$rich12;\n\n _classCallCheck(this, SquigglyAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl12 = parameters.data.titleObj) !== null && _parameters$data$titl12 !== void 0 && _parameters$data$titl12.str || (_parameters$data$cont12 = parameters.data.contentsObj) !== null && _parameters$data$cont12 !== void 0 && _parameters$data$cont12.str || (_parameters$data$rich12 = parameters.data.richText) !== null && _parameters$data$rich12 !== void 0 && _parameters$data$rich12.str);\n return _super20.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n\n _createClass(SquigglyAnnotationElement, [{\n key: \"render\",\n value: function render() {\n if (!this.data.hasPopup) {\n this._createPopup(null, this.data);\n }\n\n if (this.quadrilaterals) {\n return this._renderQuadrilaterals(\"squigglyAnnotation\");\n }\n\n this.container.className = \"squigglyAnnotation\";\n return this.container;\n }\n }]);\n\n return SquigglyAnnotationElement;\n}(AnnotationElement);\n\nvar StrikeOutAnnotationElement = /*#__PURE__*/function (_AnnotationElement15) {\n _inherits(StrikeOutAnnotationElement, _AnnotationElement15);\n\n var _super21 = _createSuper(StrikeOutAnnotationElement);\n\n function StrikeOutAnnotationElement(parameters) {\n var _parameters$data$titl13, _parameters$data$cont13, _parameters$data$rich13;\n\n _classCallCheck(this, StrikeOutAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl13 = parameters.data.titleObj) !== null && _parameters$data$titl13 !== void 0 && _parameters$data$titl13.str || (_parameters$data$cont13 = parameters.data.contentsObj) !== null && _parameters$data$cont13 !== void 0 && _parameters$data$cont13.str || (_parameters$data$rich13 = parameters.data.richText) !== null && _parameters$data$rich13 !== void 0 && _parameters$data$rich13.str);\n return _super21.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n\n _createClass(StrikeOutAnnotationElement, [{\n key: \"render\",\n value: function render() {\n if (!this.data.hasPopup) {\n this._createPopup(null, this.data);\n }\n\n if (this.quadrilaterals) {\n return this._renderQuadrilaterals(\"strikeoutAnnotation\");\n }\n\n this.container.className = \"strikeoutAnnotation\";\n return this.container;\n }\n }]);\n\n return StrikeOutAnnotationElement;\n}(AnnotationElement);\n\nvar StampAnnotationElement = /*#__PURE__*/function (_AnnotationElement16) {\n _inherits(StampAnnotationElement, _AnnotationElement16);\n\n var _super22 = _createSuper(StampAnnotationElement);\n\n function StampAnnotationElement(parameters) {\n var _parameters$data$titl14, _parameters$data$cont14, _parameters$data$rich14;\n\n _classCallCheck(this, StampAnnotationElement);\n\n var isRenderable = !!(parameters.data.hasPopup || (_parameters$data$titl14 = parameters.data.titleObj) !== null && _parameters$data$titl14 !== void 0 && _parameters$data$titl14.str || (_parameters$data$cont14 = parameters.data.contentsObj) !== null && _parameters$data$cont14 !== void 0 && _parameters$data$cont14.str || (_parameters$data$rich14 = parameters.data.richText) !== null && _parameters$data$rich14 !== void 0 && _parameters$data$rich14.str);\n return _super22.call(this, parameters, {\n isRenderable: isRenderable,\n ignoreBorder: true\n });\n }\n\n _createClass(StampAnnotationElement, [{\n key: \"render\",\n value: function render() {\n this.container.className = \"stampAnnotation\";\n\n if (!this.data.hasPopup) {\n this._createPopup(null, this.data);\n }\n\n return this.container;\n }\n }]);\n\n return StampAnnotationElement;\n}(AnnotationElement);\n\nvar FileAttachmentAnnotationElement = /*#__PURE__*/function (_AnnotationElement17) {\n _inherits(FileAttachmentAnnotationElement, _AnnotationElement17);\n\n var _super23 = _createSuper(FileAttachmentAnnotationElement);\n\n function FileAttachmentAnnotationElement(parameters) {\n var _this14$linkService$e;\n\n var _this14;\n\n _classCallCheck(this, FileAttachmentAnnotationElement);\n\n _this14 = _super23.call(this, parameters, {\n isRenderable: true\n });\n var _this14$data$file = _this14.data.file,\n filename = _this14$data$file.filename,\n content = _this14$data$file.content;\n _this14.filename = (0, _display_utils.getFilenameFromUrl)(filename);\n _this14.content = content;\n (_this14$linkService$e = _this14.linkService.eventBus) === null || _this14$linkService$e === void 0 ? void 0 : _this14$linkService$e.dispatch(\"fileattachmentannotation\", {\n source: _assertThisInitialized(_this14),\n filename: filename,\n content: content\n });\n return _this14;\n }\n\n _createClass(FileAttachmentAnnotationElement, [{\n key: \"render\",\n value: function render() {\n var _this$data$titleObj, _this$data$contentsOb;\n\n this.container.className = \"fileAttachmentAnnotation\";\n var trigger = document.createElement(\"div\");\n trigger.style.height = this.container.style.height;\n trigger.style.width = this.container.style.width;\n trigger.addEventListener(\"dblclick\", this._download.bind(this));\n\n if (!this.data.hasPopup && ((_this$data$titleObj = this.data.titleObj) !== null && _this$data$titleObj !== void 0 && _this$data$titleObj.str || (_this$data$contentsOb = this.data.contentsObj) !== null && _this$data$contentsOb !== void 0 && _this$data$contentsOb.str || this.data.richText)) {\n this._createPopup(trigger, this.data);\n }\n\n this.container.appendChild(trigger);\n return this.container;\n }\n }, {\n key: \"_download\",\n value: function _download() {\n var _this$downloadManager;\n\n (_this$downloadManager = this.downloadManager) === null || _this$downloadManager === void 0 ? void 0 : _this$downloadManager.openOrDownloadData(this.container, this.content, this.filename);\n }\n }]);\n\n return FileAttachmentAnnotationElement;\n}(AnnotationElement);\n\nvar AnnotationLayer = /*#__PURE__*/function () {\n function AnnotationLayer() {\n _classCallCheck(this, AnnotationLayer);\n }\n\n _createClass(AnnotationLayer, null, [{\n key: \"render\",\n value: function render(parameters) {\n var sortedAnnotations = [],\n popupAnnotations = [];\n\n var _iterator22 = _createForOfIteratorHelper(parameters.annotations),\n _step22;\n\n try {\n for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {\n var _data = _step22.value;\n\n if (!_data) {\n continue;\n }\n\n var _getRectDims7 = getRectDims(_data.rect),\n width = _getRectDims7.width,\n height = _getRectDims7.height;\n\n if (width <= 0 || height <= 0) {\n continue;\n }\n\n if (_data.annotationType === _util.AnnotationType.POPUP) {\n popupAnnotations.push(_data);\n continue;\n }\n\n sortedAnnotations.push(_data);\n }\n } catch (err) {\n _iterator22.e(err);\n } finally {\n _iterator22.f();\n }\n\n if (popupAnnotations.length) {\n sortedAnnotations.push.apply(sortedAnnotations, popupAnnotations);\n }\n\n var div = parameters.div;\n\n for (var _i8 = 0, _sortedAnnotations = sortedAnnotations; _i8 < _sortedAnnotations.length; _i8++) {\n var data = _sortedAnnotations[_i8];\n var element = AnnotationElementFactory.create({\n data: data,\n layer: div,\n page: parameters.page,\n viewport: parameters.viewport,\n linkService: parameters.linkService,\n downloadManager: parameters.downloadManager,\n imageResourcesPath: parameters.imageResourcesPath || \"\",\n renderForms: parameters.renderForms !== false,\n svgFactory: new _display_utils.DOMSVGFactory(),\n annotationStorage: parameters.annotationStorage || new _annotation_storage.AnnotationStorage(),\n enableScripting: parameters.enableScripting,\n hasJSActions: parameters.hasJSActions,\n fieldObjects: parameters.fieldObjects,\n mouseState: parameters.mouseState || {\n isDown: false\n }\n });\n\n if (element.isRenderable) {\n var rendered = element.render();\n\n if (data.hidden) {\n rendered.style.visibility = \"hidden\";\n }\n\n if (Array.isArray(rendered)) {\n var _iterator23 = _createForOfIteratorHelper(rendered),\n _step23;\n\n try {\n for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {\n var renderedElement = _step23.value;\n div.appendChild(renderedElement);\n }\n } catch (err) {\n _iterator23.e(err);\n } finally {\n _iterator23.f();\n }\n } else {\n if (element instanceof PopupAnnotationElement) {\n div.prepend(rendered);\n } else {\n div.appendChild(rendered);\n }\n }\n }\n }\n\n _classStaticPrivateMethodGet(this, AnnotationLayer, _setAnnotationCanvasMap).call(this, div, parameters.annotationCanvasMap);\n }\n }, {\n key: \"update\",\n value: function update(parameters) {\n var page = parameters.page,\n viewport = parameters.viewport,\n annotations = parameters.annotations,\n annotationCanvasMap = parameters.annotationCanvasMap,\n div = parameters.div;\n var transform = viewport.transform;\n var matrix = \"matrix(\".concat(transform.join(\",\"), \")\");\n var scale, ownMatrix;\n\n var _iterator24 = _createForOfIteratorHelper(annotations),\n _step24;\n\n try {\n for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {\n var data = _step24.value;\n var elements = div.querySelectorAll(\"[data-annotation-id=\\\"\".concat(data.id, \"\\\"]\"));\n\n if (elements) {\n var _iterator25 = _createForOfIteratorHelper(elements),\n _step25;\n\n try {\n for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {\n var element = _step25.value;\n\n if (data.hasOwnCanvas) {\n var rect = _util.Util.normalizeRect([data.rect[0], page.view[3] - data.rect[1] + page.view[1], data.rect[2], page.view[3] - data.rect[3] + page.view[1]]);\n\n if (!ownMatrix) {\n scale = Math.abs(transform[0] || transform[1]);\n var ownTransform = transform.slice();\n\n for (var i = 0; i < 4; i++) {\n ownTransform[i] = Math.sign(ownTransform[i]);\n }\n\n ownMatrix = \"matrix(\".concat(ownTransform.join(\",\"), \")\");\n }\n\n var left = rect[0] * scale;\n var top = rect[1] * scale;\n element.style.left = \"\".concat(left, \"px\");\n element.style.top = \"\".concat(top, \"px\");\n element.style.transformOrigin = \"\".concat(-left, \"px \").concat(-top, \"px\");\n element.style.transform = ownMatrix;\n } else {\n element.style.transform = matrix;\n }\n }\n } catch (err) {\n _iterator25.e(err);\n } finally {\n _iterator25.f();\n }\n }\n }\n } catch (err) {\n _iterator24.e(err);\n } finally {\n _iterator24.f();\n }\n\n _classStaticPrivateMethodGet(this, AnnotationLayer, _setAnnotationCanvasMap).call(this, div, annotationCanvasMap);\n\n div.hidden = false;\n }\n }]);\n\n return AnnotationLayer;\n}();\n\nexports.AnnotationLayer = AnnotationLayer;\n\nfunction _setAnnotationCanvasMap(div, annotationCanvasMap) {\n if (!annotationCanvasMap) {\n return;\n }\n\n var _iterator26 = _createForOfIteratorHelper(annotationCanvasMap),\n _step26;\n\n try {\n for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {\n var _step26$value = _slicedToArray(_step26.value, 2),\n id = _step26$value[0],\n canvas = _step26$value[1];\n\n var element = div.querySelector(\"[data-annotation-id=\\\"\".concat(id, \"\\\"]\"));\n\n if (!element) {\n continue;\n }\n\n var firstChild = element.firstChild;\n\n if (firstChild.nodeName === \"CANVAS\") {\n element.replaceChild(canvas, firstChild);\n } else {\n element.insertBefore(canvas, firstChild);\n }\n }\n } catch (err) {\n _iterator26.e(err);\n } finally {\n _iterator26.f();\n }\n\n annotationCanvasMap.clear();\n}\n\n/***/ }),\n/* 174 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.ColorConverters = void 0;\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction makeColorComp(n) {\n return Math.floor(Math.max(0, Math.min(1, n)) * 255).toString(16).padStart(2, \"0\");\n}\n\nvar ColorConverters = /*#__PURE__*/function () {\n function ColorConverters() {\n _classCallCheck(this, ColorConverters);\n }\n\n _createClass(ColorConverters, null, [{\n key: \"CMYK_G\",\n value: function CMYK_G(_ref) {\n var _ref2 = _slicedToArray(_ref, 4),\n c = _ref2[0],\n y = _ref2[1],\n m = _ref2[2],\n k = _ref2[3];\n\n return [\"G\", 1 - Math.min(1, 0.3 * c + 0.59 * m + 0.11 * y + k)];\n }\n }, {\n key: \"G_CMYK\",\n value: function G_CMYK(_ref3) {\n var _ref4 = _slicedToArray(_ref3, 1),\n g = _ref4[0];\n\n return [\"CMYK\", 0, 0, 0, 1 - g];\n }\n }, {\n key: \"G_RGB\",\n value: function G_RGB(_ref5) {\n var _ref6 = _slicedToArray(_ref5, 1),\n g = _ref6[0];\n\n return [\"RGB\", g, g, g];\n }\n }, {\n key: \"G_HTML\",\n value: function G_HTML(_ref7) {\n var _ref8 = _slicedToArray(_ref7, 1),\n g = _ref8[0];\n\n var G = makeColorComp(g);\n return \"#\".concat(G).concat(G).concat(G);\n }\n }, {\n key: \"RGB_G\",\n value: function RGB_G(_ref9) {\n var _ref10 = _slicedToArray(_ref9, 3),\n r = _ref10[0],\n g = _ref10[1],\n b = _ref10[2];\n\n return [\"G\", 0.3 * r + 0.59 * g + 0.11 * b];\n }\n }, {\n key: \"RGB_HTML\",\n value: function RGB_HTML(_ref11) {\n var _ref12 = _slicedToArray(_ref11, 3),\n r = _ref12[0],\n g = _ref12[1],\n b = _ref12[2];\n\n var R = makeColorComp(r);\n var G = makeColorComp(g);\n var B = makeColorComp(b);\n return \"#\".concat(R).concat(G).concat(B);\n }\n }, {\n key: \"T_HTML\",\n value: function T_HTML() {\n return \"#00000000\";\n }\n }, {\n key: \"CMYK_RGB\",\n value: function CMYK_RGB(_ref13) {\n var _ref14 = _slicedToArray(_ref13, 4),\n c = _ref14[0],\n y = _ref14[1],\n m = _ref14[2],\n k = _ref14[3];\n\n return [\"RGB\", 1 - Math.min(1, c + k), 1 - Math.min(1, m + k), 1 - Math.min(1, y + k)];\n }\n }, {\n key: \"CMYK_HTML\",\n value: function CMYK_HTML(components) {\n return this.RGB_HTML(this.CMYK_RGB(components));\n }\n }, {\n key: \"RGB_CMYK\",\n value: function RGB_CMYK(_ref15) {\n var _ref16 = _slicedToArray(_ref15, 3),\n r = _ref16[0],\n g = _ref16[1],\n b = _ref16[2];\n\n var c = 1 - r;\n var m = 1 - g;\n var y = 1 - b;\n var k = Math.min(c, m, y);\n return [\"CMYK\", c, m, y, k];\n }\n }]);\n\n return ColorConverters;\n}();\n\nexports.ColorConverters = ColorConverters;\n\n/***/ }),\n/* 175 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.XfaLayer = void 0;\n\nvar _xfa_text = __w_pdfjs_require__(171);\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar XfaLayer = /*#__PURE__*/function () {\n function XfaLayer() {\n _classCallCheck(this, XfaLayer);\n }\n\n _createClass(XfaLayer, null, [{\n key: \"setupStorage\",\n value: function setupStorage(html, id, element, storage, intent) {\n var storedData = storage.getValue(id, {\n value: null\n });\n\n switch (element.name) {\n case \"textarea\":\n if (storedData.value !== null) {\n html.textContent = storedData.value;\n }\n\n if (intent === \"print\") {\n break;\n }\n\n html.addEventListener(\"input\", function (event) {\n storage.setValue(id, {\n value: event.target.value\n });\n });\n break;\n\n case \"input\":\n if (element.attributes.type === \"radio\" || element.attributes.type === \"checkbox\") {\n if (storedData.value === element.attributes.xfaOn) {\n html.setAttribute(\"checked\", true);\n } else if (storedData.value === element.attributes.xfaOff) {\n html.removeAttribute(\"checked\");\n }\n\n if (intent === \"print\") {\n break;\n }\n\n html.addEventListener(\"change\", function (event) {\n storage.setValue(id, {\n value: event.target.checked ? event.target.getAttribute(\"xfaOn\") : event.target.getAttribute(\"xfaOff\")\n });\n });\n } else {\n if (storedData.value !== null) {\n html.setAttribute(\"value\", storedData.value);\n }\n\n if (intent === \"print\") {\n break;\n }\n\n html.addEventListener(\"input\", function (event) {\n storage.setValue(id, {\n value: event.target.value\n });\n });\n }\n\n break;\n\n case \"select\":\n if (storedData.value !== null) {\n var _iterator = _createForOfIteratorHelper(element.children),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var option = _step.value;\n\n if (option.attributes.value === storedData.value) {\n option.attributes.selected = true;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n\n html.addEventListener(\"input\", function (event) {\n var options = event.target.options;\n var value = options.selectedIndex === -1 ? \"\" : options[options.selectedIndex].value;\n storage.setValue(id, {\n value: value\n });\n });\n break;\n }\n }\n }, {\n key: \"setAttributes\",\n value: function setAttributes(_ref) {\n var html = _ref.html,\n element = _ref.element,\n _ref$storage = _ref.storage,\n storage = _ref$storage === void 0 ? null : _ref$storage,\n intent = _ref.intent,\n linkService = _ref.linkService;\n var attributes = element.attributes;\n var isHTMLAnchorElement = html instanceof HTMLAnchorElement;\n\n if (attributes.type === \"radio\") {\n attributes.name = \"\".concat(attributes.name, \"-\").concat(intent);\n }\n\n for (var _i = 0, _Object$entries = Object.entries(attributes); _i < _Object$entries.length; _i++) {\n var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),\n key = _Object$entries$_i[0],\n value = _Object$entries$_i[1];\n\n if (value === null || value === undefined || key === \"dataId\") {\n continue;\n }\n\n if (key !== \"style\") {\n if (key === \"textContent\") {\n html.textContent = value;\n } else if (key === \"class\") {\n if (value.length) {\n html.setAttribute(key, value.join(\" \"));\n }\n } else {\n if (isHTMLAnchorElement && (key === \"href\" || key === \"newWindow\")) {\n continue;\n }\n\n html.setAttribute(key, value);\n }\n } else {\n Object.assign(html.style, value);\n }\n }\n\n if (isHTMLAnchorElement) {\n linkService.addLinkAttributes(html, attributes.href, attributes.newWindow);\n }\n\n if (storage && attributes.dataId) {\n this.setupStorage(html, attributes.dataId, element, storage);\n }\n }\n }, {\n key: \"render\",\n value: function render(parameters) {\n var storage = parameters.annotationStorage;\n var linkService = parameters.linkService;\n var root = parameters.xfaHtml;\n var intent = parameters.intent || \"display\";\n var rootHtml = document.createElement(root.name);\n\n if (root.attributes) {\n this.setAttributes({\n html: rootHtml,\n element: root,\n intent: intent,\n linkService: linkService\n });\n }\n\n var stack = [[root, -1, rootHtml]];\n var rootDiv = parameters.div;\n rootDiv.appendChild(rootHtml);\n\n if (parameters.viewport) {\n var transform = \"matrix(\".concat(parameters.viewport.transform.join(\",\"), \")\");\n rootDiv.style.transform = transform;\n }\n\n if (intent !== \"richText\") {\n rootDiv.setAttribute(\"class\", \"xfaLayer xfaFont\");\n }\n\n var textDivs = [];\n\n while (stack.length > 0) {\n var _child$attributes;\n\n var _stack = _slicedToArray(stack[stack.length - 1], 3),\n parent = _stack[0],\n i = _stack[1],\n html = _stack[2];\n\n if (i + 1 === parent.children.length) {\n stack.pop();\n continue;\n }\n\n var child = parent.children[++stack[stack.length - 1][1]];\n\n if (child === null) {\n continue;\n }\n\n var name = child.name;\n\n if (name === \"#text\") {\n var node = document.createTextNode(child.value);\n textDivs.push(node);\n html.appendChild(node);\n continue;\n }\n\n var childHtml = void 0;\n\n if (child !== null && child !== void 0 && (_child$attributes = child.attributes) !== null && _child$attributes !== void 0 && _child$attributes.xmlns) {\n childHtml = document.createElementNS(child.attributes.xmlns, name);\n } else {\n childHtml = document.createElement(name);\n }\n\n html.appendChild(childHtml);\n\n if (child.attributes) {\n this.setAttributes({\n html: childHtml,\n element: child,\n storage: storage,\n intent: intent,\n linkService: linkService\n });\n }\n\n if (child.children && child.children.length > 0) {\n stack.push([child, -1, childHtml]);\n } else if (child.value) {\n var _node = document.createTextNode(child.value);\n\n if (_xfa_text.XfaText.shouldBuildText(name)) {\n textDivs.push(_node);\n }\n\n childHtml.appendChild(_node);\n }\n }\n\n var _iterator2 = _createForOfIteratorHelper(rootDiv.querySelectorAll(\".xfaNonInteractive input, .xfaNonInteractive textarea\")),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var el = _step2.value;\n el.setAttribute(\"readOnly\", true);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return {\n textDivs: textDivs\n };\n }\n }, {\n key: \"update\",\n value: function update(parameters) {\n var transform = \"matrix(\".concat(parameters.viewport.transform.join(\",\"), \")\");\n parameters.div.style.transform = transform;\n parameters.div.hidden = false;\n }\n }]);\n\n return XfaLayer;\n}();\n\nexports.XfaLayer = XfaLayer;\n\n/***/ }),\n/* 176 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.renderTextLayer = renderTextLayer;\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nvar MAX_TEXT_DIVS_TO_RENDER = 100000;\nvar DEFAULT_FONT_SIZE = 30;\nvar DEFAULT_FONT_ASCENT = 0.8;\nvar ascentCache = new Map();\nvar AllWhitespaceRegexp = /^\\s+$/g;\n\nfunction getAscent(fontFamily, ctx) {\n var cachedAscent = ascentCache.get(fontFamily);\n\n if (cachedAscent) {\n return cachedAscent;\n }\n\n ctx.save();\n ctx.font = \"\".concat(DEFAULT_FONT_SIZE, \"px \").concat(fontFamily);\n var metrics = ctx.measureText(\"\");\n var ascent = metrics.fontBoundingBoxAscent;\n var descent = Math.abs(metrics.fontBoundingBoxDescent);\n\n if (ascent) {\n ctx.restore();\n var ratio = ascent / (ascent + descent);\n ascentCache.set(fontFamily, ratio);\n return ratio;\n }\n\n ctx.strokeStyle = \"red\";\n ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n ctx.strokeText(\"g\", 0, 0);\n var pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data;\n descent = 0;\n\n for (var i = pixels.length - 1 - 3; i >= 0; i -= 4) {\n if (pixels[i] > 0) {\n descent = Math.ceil(i / 4 / DEFAULT_FONT_SIZE);\n break;\n }\n }\n\n ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n ctx.strokeText(\"A\", 0, DEFAULT_FONT_SIZE);\n pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data;\n ascent = 0;\n\n for (var _i = 0, ii = pixels.length; _i < ii; _i += 4) {\n if (pixels[_i] > 0) {\n ascent = DEFAULT_FONT_SIZE - Math.floor(_i / 4 / DEFAULT_FONT_SIZE);\n break;\n }\n }\n\n ctx.restore();\n\n if (ascent) {\n var _ratio = ascent / (ascent + descent);\n\n ascentCache.set(fontFamily, _ratio);\n return _ratio;\n }\n\n ascentCache.set(fontFamily, DEFAULT_FONT_ASCENT);\n return DEFAULT_FONT_ASCENT;\n}\n\nfunction appendText(task, geom, styles, ctx) {\n var textDiv = document.createElement(\"span\");\n var textDivProperties = task._enhanceTextSelection ? {\n angle: 0,\n canvasWidth: 0,\n hasText: geom.str !== \"\",\n hasEOL: geom.hasEOL,\n originalTransform: null,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n paddingTop: 0,\n scale: 1\n } : {\n angle: 0,\n canvasWidth: 0,\n hasText: geom.str !== \"\",\n hasEOL: geom.hasEOL\n };\n\n task._textDivs.push(textDiv);\n\n var tx = _util.Util.transform(task._viewport.transform, geom.transform);\n\n var angle = Math.atan2(tx[1], tx[0]);\n var style = styles[geom.fontName];\n\n if (style.vertical) {\n angle += Math.PI / 2;\n }\n\n var fontHeight = Math.hypot(tx[2], tx[3]);\n var fontAscent = fontHeight * getAscent(style.fontFamily, ctx);\n var left, top;\n\n if (angle === 0) {\n left = tx[4];\n top = tx[5] - fontAscent;\n } else {\n left = tx[4] + fontAscent * Math.sin(angle);\n top = tx[5] - fontAscent * Math.cos(angle);\n }\n\n textDiv.style.left = \"\".concat(left, \"px\");\n textDiv.style.top = \"\".concat(top, \"px\");\n textDiv.style.fontSize = \"\".concat(fontHeight, \"px\");\n textDiv.style.fontFamily = style.fontFamily;\n textDiv.setAttribute(\"role\", \"presentation\");\n textDiv.textContent = geom.str;\n textDiv.dir = geom.dir;\n\n if (task._fontInspectorEnabled) {\n textDiv.dataset.fontName = geom.fontName;\n }\n\n if (angle !== 0) {\n textDivProperties.angle = angle * (180 / Math.PI);\n }\n\n var shouldScaleText = false;\n\n if (geom.str.length > 1 || task._enhanceTextSelection && AllWhitespaceRegexp.test(geom.str)) {\n shouldScaleText = true;\n } else if (geom.str !== \" \" && geom.transform[0] !== geom.transform[3]) {\n var absScaleX = Math.abs(geom.transform[0]),\n absScaleY = Math.abs(geom.transform[3]);\n\n if (absScaleX !== absScaleY && Math.max(absScaleX, absScaleY) / Math.min(absScaleX, absScaleY) > 1.5) {\n shouldScaleText = true;\n }\n }\n\n if (shouldScaleText) {\n if (style.vertical) {\n textDivProperties.canvasWidth = geom.height * task._viewport.scale;\n } else {\n textDivProperties.canvasWidth = geom.width * task._viewport.scale;\n }\n }\n\n task._textDivProperties.set(textDiv, textDivProperties);\n\n if (task._textContentStream) {\n task._layoutText(textDiv);\n }\n\n if (task._enhanceTextSelection && textDivProperties.hasText) {\n var angleCos = 1,\n angleSin = 0;\n\n if (angle !== 0) {\n angleCos = Math.cos(angle);\n angleSin = Math.sin(angle);\n }\n\n var divWidth = (style.vertical ? geom.height : geom.width) * task._viewport.scale;\n var divHeight = fontHeight;\n var m, b;\n\n if (angle !== 0) {\n m = [angleCos, angleSin, -angleSin, angleCos, left, top];\n b = _util.Util.getAxialAlignedBoundingBox([0, 0, divWidth, divHeight], m);\n } else {\n b = [left, top, left + divWidth, top + divHeight];\n }\n\n task._bounds.push({\n left: b[0],\n top: b[1],\n right: b[2],\n bottom: b[3],\n div: textDiv,\n size: [divWidth, divHeight],\n m: m\n });\n }\n}\n\nfunction render(task) {\n if (task._canceled) {\n return;\n }\n\n var textDivs = task._textDivs;\n var capability = task._capability;\n var textDivsLength = textDivs.length;\n\n if (textDivsLength > MAX_TEXT_DIVS_TO_RENDER) {\n task._renderingDone = true;\n capability.resolve();\n return;\n }\n\n if (!task._textContentStream) {\n for (var i = 0; i < textDivsLength; i++) {\n task._layoutText(textDivs[i]);\n }\n }\n\n task._renderingDone = true;\n capability.resolve();\n}\n\nfunction findPositiveMin(ts, offset, count) {\n var result = 0;\n\n for (var i = 0; i < count; i++) {\n var t = ts[offset++];\n\n if (t > 0) {\n result = result ? Math.min(t, result) : t;\n }\n }\n\n return result;\n}\n\nfunction expand(task) {\n var bounds = task._bounds;\n var viewport = task._viewport;\n var expanded = expandBounds(viewport.width, viewport.height, bounds);\n\n for (var i = 0; i < expanded.length; i++) {\n var div = bounds[i].div;\n\n var divProperties = task._textDivProperties.get(div);\n\n if (divProperties.angle === 0) {\n divProperties.paddingLeft = bounds[i].left - expanded[i].left;\n divProperties.paddingTop = bounds[i].top - expanded[i].top;\n divProperties.paddingRight = expanded[i].right - bounds[i].right;\n divProperties.paddingBottom = expanded[i].bottom - bounds[i].bottom;\n\n task._textDivProperties.set(div, divProperties);\n\n continue;\n }\n\n var e = expanded[i],\n b = bounds[i];\n var m = b.m,\n c = m[0],\n s = m[1];\n var points = [[0, 0], [0, b.size[1]], [b.size[0], 0], b.size];\n var ts = new Float64Array(64);\n\n for (var j = 0, jj = points.length; j < jj; j++) {\n var t = _util.Util.applyTransform(points[j], m);\n\n ts[j + 0] = c && (e.left - t[0]) / c;\n ts[j + 4] = s && (e.top - t[1]) / s;\n ts[j + 8] = c && (e.right - t[0]) / c;\n ts[j + 12] = s && (e.bottom - t[1]) / s;\n ts[j + 16] = s && (e.left - t[0]) / -s;\n ts[j + 20] = c && (e.top - t[1]) / c;\n ts[j + 24] = s && (e.right - t[0]) / -s;\n ts[j + 28] = c && (e.bottom - t[1]) / c;\n ts[j + 32] = c && (e.left - t[0]) / -c;\n ts[j + 36] = s && (e.top - t[1]) / -s;\n ts[j + 40] = c && (e.right - t[0]) / -c;\n ts[j + 44] = s && (e.bottom - t[1]) / -s;\n ts[j + 48] = s && (e.left - t[0]) / s;\n ts[j + 52] = c && (e.top - t[1]) / -c;\n ts[j + 56] = s && (e.right - t[0]) / s;\n ts[j + 60] = c && (e.bottom - t[1]) / -c;\n }\n\n var boxScale = 1 + Math.min(Math.abs(c), Math.abs(s));\n divProperties.paddingLeft = findPositiveMin(ts, 32, 16) / boxScale;\n divProperties.paddingTop = findPositiveMin(ts, 48, 16) / boxScale;\n divProperties.paddingRight = findPositiveMin(ts, 0, 16) / boxScale;\n divProperties.paddingBottom = findPositiveMin(ts, 16, 16) / boxScale;\n\n task._textDivProperties.set(div, divProperties);\n }\n}\n\nfunction expandBounds(width, height, boxes) {\n var bounds = boxes.map(function (box, i) {\n return {\n x1: box.left,\n y1: box.top,\n x2: box.right,\n y2: box.bottom,\n index: i,\n x1New: undefined,\n x2New: undefined\n };\n });\n expandBoundsLTR(width, bounds);\n var expanded = new Array(boxes.length);\n\n var _iterator = _createForOfIteratorHelper(bounds),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var b = _step.value;\n var i = b.index;\n expanded[i] = {\n left: b.x1New,\n top: 0,\n right: b.x2New,\n bottom: 0\n };\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n boxes.map(function (box, i) {\n var e = expanded[i],\n b = bounds[i];\n b.x1 = box.top;\n b.y1 = width - e.right;\n b.x2 = box.bottom;\n b.y2 = width - e.left;\n b.index = i;\n b.x1New = undefined;\n b.x2New = undefined;\n });\n expandBoundsLTR(height, bounds);\n\n var _iterator2 = _createForOfIteratorHelper(bounds),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _b = _step2.value;\n var _i2 = _b.index;\n expanded[_i2].top = _b.x1New;\n expanded[_i2].bottom = _b.x2New;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return expanded;\n}\n\nfunction expandBoundsLTR(width, bounds) {\n bounds.sort(function (a, b) {\n return a.x1 - b.x1 || a.index - b.index;\n });\n var fakeBoundary = {\n x1: -Infinity,\n y1: -Infinity,\n x2: 0,\n y2: Infinity,\n index: -1,\n x1New: 0,\n x2New: 0\n };\n var horizon = [{\n start: -Infinity,\n end: Infinity,\n boundary: fakeBoundary\n }];\n\n var _iterator3 = _createForOfIteratorHelper(bounds),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var boundary = _step3.value;\n var i = 0;\n\n while (i < horizon.length && horizon[i].end <= boundary.y1) {\n i++;\n }\n\n var j = horizon.length - 1;\n\n while (j >= 0 && horizon[j].start >= boundary.y2) {\n j--;\n }\n\n var _horizonPart = void 0,\n _affectedBoundary = void 0;\n\n var q = void 0,\n k = void 0,\n maxXNew = -Infinity;\n\n for (q = i; q <= j; q++) {\n _horizonPart = horizon[q];\n _affectedBoundary = _horizonPart.boundary;\n var xNew = void 0;\n\n if (_affectedBoundary.x2 > boundary.x1) {\n xNew = _affectedBoundary.index > boundary.index ? _affectedBoundary.x1New : boundary.x1;\n } else if (_affectedBoundary.x2New === undefined) {\n xNew = (_affectedBoundary.x2 + boundary.x1) / 2;\n } else {\n xNew = _affectedBoundary.x2New;\n }\n\n if (xNew > maxXNew) {\n maxXNew = xNew;\n }\n }\n\n boundary.x1New = maxXNew;\n\n for (q = i; q <= j; q++) {\n _horizonPart = horizon[q];\n _affectedBoundary = _horizonPart.boundary;\n\n if (_affectedBoundary.x2New === undefined) {\n if (_affectedBoundary.x2 > boundary.x1) {\n if (_affectedBoundary.index > boundary.index) {\n _affectedBoundary.x2New = _affectedBoundary.x2;\n }\n } else {\n _affectedBoundary.x2New = maxXNew;\n }\n } else if (_affectedBoundary.x2New > maxXNew) {\n _affectedBoundary.x2New = Math.max(maxXNew, _affectedBoundary.x2);\n }\n }\n\n var changedHorizon = [];\n var lastBoundary = null;\n\n for (q = i; q <= j; q++) {\n _horizonPart = horizon[q];\n _affectedBoundary = _horizonPart.boundary;\n var useBoundary = _affectedBoundary.x2 > boundary.x2 ? _affectedBoundary : boundary;\n\n if (lastBoundary === useBoundary) {\n changedHorizon[changedHorizon.length - 1].end = _horizonPart.end;\n } else {\n changedHorizon.push({\n start: _horizonPart.start,\n end: _horizonPart.end,\n boundary: useBoundary\n });\n lastBoundary = useBoundary;\n }\n }\n\n if (horizon[i].start < boundary.y1) {\n changedHorizon[0].start = boundary.y1;\n changedHorizon.unshift({\n start: horizon[i].start,\n end: boundary.y1,\n boundary: horizon[i].boundary\n });\n }\n\n if (boundary.y2 < horizon[j].end) {\n changedHorizon[changedHorizon.length - 1].end = boundary.y2;\n changedHorizon.push({\n start: boundary.y2,\n end: horizon[j].end,\n boundary: horizon[j].boundary\n });\n }\n\n for (q = i; q <= j; q++) {\n _horizonPart = horizon[q];\n _affectedBoundary = _horizonPart.boundary;\n\n if (_affectedBoundary.x2New !== undefined) {\n continue;\n }\n\n var used = false;\n\n for (k = i - 1; !used && k >= 0 && horizon[k].start >= _affectedBoundary.y1; k--) {\n used = horizon[k].boundary === _affectedBoundary;\n }\n\n for (k = j + 1; !used && k < horizon.length && horizon[k].end <= _affectedBoundary.y2; k++) {\n used = horizon[k].boundary === _affectedBoundary;\n }\n\n for (k = 0; !used && k < changedHorizon.length; k++) {\n used = changedHorizon[k].boundary === _affectedBoundary;\n }\n\n if (!used) {\n _affectedBoundary.x2New = maxXNew;\n }\n }\n\n Array.prototype.splice.apply(horizon, [i, j - i + 1].concat(changedHorizon));\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n for (var _i3 = 0, _horizon = horizon; _i3 < _horizon.length; _i3++) {\n var horizonPart = _horizon[_i3];\n var affectedBoundary = horizonPart.boundary;\n\n if (affectedBoundary.x2New === undefined) {\n affectedBoundary.x2New = Math.max(width, affectedBoundary.x2);\n }\n }\n}\n\nvar TextLayerRenderTask = /*#__PURE__*/function () {\n function TextLayerRenderTask(_ref) {\n var _globalThis$FontInspe,\n _this = this;\n\n var textContent = _ref.textContent,\n textContentStream = _ref.textContentStream,\n container = _ref.container,\n viewport = _ref.viewport,\n textDivs = _ref.textDivs,\n textContentItemsStr = _ref.textContentItemsStr,\n enhanceTextSelection = _ref.enhanceTextSelection;\n\n _classCallCheck(this, TextLayerRenderTask);\n\n this._textContent = textContent;\n this._textContentStream = textContentStream;\n this._container = container;\n this._document = container.ownerDocument;\n this._viewport = viewport;\n this._textDivs = textDivs || [];\n this._textContentItemsStr = textContentItemsStr || [];\n this._enhanceTextSelection = !!enhanceTextSelection;\n this._fontInspectorEnabled = !!((_globalThis$FontInspe = globalThis.FontInspector) !== null && _globalThis$FontInspe !== void 0 && _globalThis$FontInspe.enabled);\n this._reader = null;\n this._layoutTextLastFontSize = null;\n this._layoutTextLastFontFamily = null;\n this._layoutTextCtx = null;\n this._textDivProperties = new WeakMap();\n this._renderingDone = false;\n this._canceled = false;\n this._capability = (0, _util.createPromiseCapability)();\n this._renderTimer = null;\n this._bounds = [];\n\n this._capability.promise[\"finally\"](function () {\n if (!_this._enhanceTextSelection) {\n _this._textDivProperties = null;\n }\n\n if (_this._layoutTextCtx) {\n _this._layoutTextCtx.canvas.width = 0;\n _this._layoutTextCtx.canvas.height = 0;\n _this._layoutTextCtx = null;\n }\n })[\"catch\"](function () {});\n }\n\n _createClass(TextLayerRenderTask, [{\n key: \"promise\",\n get: function get() {\n return this._capability.promise;\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n this._canceled = true;\n\n if (this._reader) {\n this._reader.cancel(new _util.AbortException(\"TextLayer task cancelled.\"))[\"catch\"](function () {});\n\n this._reader = null;\n }\n\n if (this._renderTimer !== null) {\n clearTimeout(this._renderTimer);\n this._renderTimer = null;\n }\n\n this._capability.reject(new Error(\"TextLayer task cancelled.\"));\n }\n }, {\n key: \"_processItems\",\n value: function _processItems(items, styleCache) {\n for (var i = 0, len = items.length; i < len; i++) {\n if (items[i].str === undefined) {\n if (items[i].type === \"beginMarkedContentProps\" || items[i].type === \"beginMarkedContent\") {\n var parent = this._container;\n this._container = document.createElement(\"span\");\n\n this._container.classList.add(\"markedContent\");\n\n if (items[i].id !== null) {\n this._container.setAttribute(\"id\", \"\".concat(items[i].id));\n }\n\n parent.appendChild(this._container);\n } else if (items[i].type === \"endMarkedContent\") {\n this._container = this._container.parentNode;\n }\n\n continue;\n }\n\n this._textContentItemsStr.push(items[i].str);\n\n appendText(this, items[i], styleCache, this._layoutTextCtx);\n }\n }\n }, {\n key: \"_layoutText\",\n value: function _layoutText(textDiv) {\n var textDivProperties = this._textDivProperties.get(textDiv);\n\n var transform = \"\";\n\n if (textDivProperties.canvasWidth !== 0 && textDivProperties.hasText) {\n var _textDiv$style = textDiv.style,\n fontSize = _textDiv$style.fontSize,\n fontFamily = _textDiv$style.fontFamily;\n\n if (fontSize !== this._layoutTextLastFontSize || fontFamily !== this._layoutTextLastFontFamily) {\n this._layoutTextCtx.font = \"\".concat(fontSize, \" \").concat(fontFamily);\n this._layoutTextLastFontSize = fontSize;\n this._layoutTextLastFontFamily = fontFamily;\n }\n\n var _this$_layoutTextCtx$ = this._layoutTextCtx.measureText(textDiv.textContent),\n width = _this$_layoutTextCtx$.width;\n\n if (width > 0) {\n var scale = textDivProperties.canvasWidth / width;\n\n if (this._enhanceTextSelection) {\n textDivProperties.scale = scale;\n }\n\n transform = \"scaleX(\".concat(scale, \")\");\n }\n }\n\n if (textDivProperties.angle !== 0) {\n transform = \"rotate(\".concat(textDivProperties.angle, \"deg) \").concat(transform);\n }\n\n if (transform.length > 0) {\n if (this._enhanceTextSelection) {\n textDivProperties.originalTransform = transform;\n }\n\n textDiv.style.transform = transform;\n }\n\n if (textDivProperties.hasText) {\n this._container.appendChild(textDiv);\n }\n\n if (textDivProperties.hasEOL) {\n var br = document.createElement(\"br\");\n br.setAttribute(\"role\", \"presentation\");\n\n this._container.appendChild(br);\n }\n }\n }, {\n key: \"_render\",\n value: function _render() {\n var _this2 = this;\n\n var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var capability = (0, _util.createPromiseCapability)();\n var styleCache = Object.create(null);\n\n var canvas = this._document.createElement(\"canvas\");\n\n canvas.height = canvas.width = DEFAULT_FONT_SIZE;\n this._layoutTextCtx = canvas.getContext(\"2d\", {\n alpha: false\n });\n\n if (this._textContent) {\n var textItems = this._textContent.items;\n var textStyles = this._textContent.styles;\n\n this._processItems(textItems, textStyles);\n\n capability.resolve();\n } else if (this._textContentStream) {\n var pump = function pump() {\n _this2._reader.read().then(function (_ref2) {\n var value = _ref2.value,\n done = _ref2.done;\n\n if (done) {\n capability.resolve();\n return;\n }\n\n Object.assign(styleCache, value.styles);\n\n _this2._processItems(value.items, styleCache);\n\n pump();\n }, capability.reject);\n };\n\n this._reader = this._textContentStream.getReader();\n pump();\n } else {\n throw new Error('Neither \"textContent\" nor \"textContentStream\" parameters specified.');\n }\n\n capability.promise.then(function () {\n styleCache = null;\n\n if (!timeout) {\n render(_this2);\n } else {\n _this2._renderTimer = setTimeout(function () {\n render(_this2);\n _this2._renderTimer = null;\n }, timeout);\n }\n }, this._capability.reject);\n }\n }, {\n key: \"expandTextDivs\",\n value: function expandTextDivs() {\n var expandDivs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (!this._enhanceTextSelection || !this._renderingDone) {\n return;\n }\n\n if (this._bounds !== null) {\n expand(this);\n this._bounds = null;\n }\n\n var transformBuf = [],\n paddingBuf = [];\n\n for (var i = 0, ii = this._textDivs.length; i < ii; i++) {\n var div = this._textDivs[i];\n\n var divProps = this._textDivProperties.get(div);\n\n if (!divProps.hasText) {\n continue;\n }\n\n if (expandDivs) {\n transformBuf.length = 0;\n paddingBuf.length = 0;\n\n if (divProps.originalTransform) {\n transformBuf.push(divProps.originalTransform);\n }\n\n if (divProps.paddingTop > 0) {\n paddingBuf.push(\"\".concat(divProps.paddingTop, \"px\"));\n transformBuf.push(\"translateY(\".concat(-divProps.paddingTop, \"px)\"));\n } else {\n paddingBuf.push(0);\n }\n\n if (divProps.paddingRight > 0) {\n paddingBuf.push(\"\".concat(divProps.paddingRight / divProps.scale, \"px\"));\n } else {\n paddingBuf.push(0);\n }\n\n if (divProps.paddingBottom > 0) {\n paddingBuf.push(\"\".concat(divProps.paddingBottom, \"px\"));\n } else {\n paddingBuf.push(0);\n }\n\n if (divProps.paddingLeft > 0) {\n paddingBuf.push(\"\".concat(divProps.paddingLeft / divProps.scale, \"px\"));\n transformBuf.push(\"translateX(\".concat(-divProps.paddingLeft / divProps.scale, \"px)\"));\n } else {\n paddingBuf.push(0);\n }\n\n div.style.padding = paddingBuf.join(\" \");\n\n if (transformBuf.length) {\n div.style.transform = transformBuf.join(\" \");\n }\n } else {\n div.style.padding = null;\n div.style.transform = divProps.originalTransform;\n }\n }\n }\n }]);\n\n return TextLayerRenderTask;\n}();\n\nfunction renderTextLayer(renderParameters) {\n var task = new TextLayerRenderTask({\n textContent: renderParameters.textContent,\n textContentStream: renderParameters.textContentStream,\n container: renderParameters.container,\n viewport: renderParameters.viewport,\n textDivs: renderParameters.textDivs,\n textContentItemsStr: renderParameters.textContentItemsStr,\n enhanceTextSelection: renderParameters.enhanceTextSelection\n });\n\n task._render(renderParameters.timeout);\n\n return task;\n}\n\n/***/ }),\n/* 177 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.SVGGraphics = void 0;\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _display_utils = __w_pdfjs_require__(158);\n\nvar _is_node = __w_pdfjs_require__(3);\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar SVGGraphics = /*#__PURE__*/_createClass(function SVGGraphics() {\n _classCallCheck(this, SVGGraphics);\n\n (0, _util.unreachable)(\"Not implemented: SVGGraphics\");\n});\n\nexports.SVGGraphics = SVGGraphics;\n{\n var opListToTree = function opListToTree(opList) {\n var opTree = [];\n var tmp = [];\n\n var _iterator = _createForOfIteratorHelper(opList),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var opListElement = _step.value;\n\n if (opListElement.fn === \"save\") {\n opTree.push({\n fnId: 92,\n fn: \"group\",\n items: []\n });\n tmp.push(opTree);\n opTree = opTree[opTree.length - 1].items;\n continue;\n }\n\n if (opListElement.fn === \"restore\") {\n opTree = tmp.pop();\n } else {\n opTree.push(opListElement);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return opTree;\n };\n\n var pf = function pf(value) {\n if (Number.isInteger(value)) {\n return value.toString();\n }\n\n var s = value.toFixed(10);\n var i = s.length - 1;\n\n if (s[i] !== \"0\") {\n return s;\n }\n\n do {\n i--;\n } while (s[i] === \"0\");\n\n return s.substring(0, s[i] === \".\" ? i : i + 1);\n };\n\n var pm = function pm(m) {\n if (m[4] === 0 && m[5] === 0) {\n if (m[1] === 0 && m[2] === 0) {\n if (m[0] === 1 && m[3] === 1) {\n return \"\";\n }\n\n return \"scale(\".concat(pf(m[0]), \" \").concat(pf(m[3]), \")\");\n }\n\n if (m[0] === m[3] && m[1] === -m[2]) {\n var a = Math.acos(m[0]) * 180 / Math.PI;\n return \"rotate(\".concat(pf(a), \")\");\n }\n } else {\n if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) {\n return \"translate(\".concat(pf(m[4]), \" \").concat(pf(m[5]), \")\");\n }\n }\n\n return \"matrix(\".concat(pf(m[0]), \" \").concat(pf(m[1]), \" \").concat(pf(m[2]), \" \").concat(pf(m[3]), \" \").concat(pf(m[4]), \" \") + \"\".concat(pf(m[5]), \")\");\n };\n\n var SVG_DEFAULTS = {\n fontStyle: \"normal\",\n fontWeight: \"normal\",\n fillColor: \"#000000\"\n };\n var XML_NS = \"http://www.w3.org/XML/1998/namespace\";\n var XLINK_NS = \"http://www.w3.org/1999/xlink\";\n var LINE_CAP_STYLES = [\"butt\", \"round\", \"square\"];\n var LINE_JOIN_STYLES = [\"miter\", \"round\", \"bevel\"];\n\n var createObjectURL = function createObjectURL(data) {\n var contentType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\";\n var forceDataSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n if (URL.createObjectURL && typeof Blob !== \"undefined\" && !forceDataSchema) {\n return URL.createObjectURL(new Blob([data], {\n type: contentType\n }));\n }\n\n var digits = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n var buffer = \"data:\".concat(contentType, \";base64,\");\n\n for (var i = 0, ii = data.length; i < ii; i += 3) {\n var b1 = data[i] & 0xff;\n var b2 = data[i + 1] & 0xff;\n var b3 = data[i + 2] & 0xff;\n var d1 = b1 >> 2,\n d2 = (b1 & 3) << 4 | b2 >> 4;\n var d3 = i + 1 < ii ? (b2 & 0xf) << 2 | b3 >> 6 : 64;\n var d4 = i + 2 < ii ? b3 & 0x3f : 64;\n buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4];\n }\n\n return buffer;\n };\n\n var convertImgDataToPng = function () {\n var PNG_HEADER = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);\n var CHUNK_WRAPPER_SIZE = 12;\n var crcTable = new Int32Array(256);\n\n for (var i = 0; i < 256; i++) {\n var c = i;\n\n for (var h = 0; h < 8; h++) {\n if (c & 1) {\n c = 0xedb88320 ^ c >> 1 & 0x7fffffff;\n } else {\n c = c >> 1 & 0x7fffffff;\n }\n }\n\n crcTable[i] = c;\n }\n\n function crc32(data, start, end) {\n var crc = -1;\n\n for (var _i = start; _i < end; _i++) {\n var a = (crc ^ data[_i]) & 0xff;\n var b = crcTable[a];\n crc = crc >>> 8 ^ b;\n }\n\n return crc ^ -1;\n }\n\n function writePngChunk(type, body, data, offset) {\n var p = offset;\n var len = body.length;\n data[p] = len >> 24 & 0xff;\n data[p + 1] = len >> 16 & 0xff;\n data[p + 2] = len >> 8 & 0xff;\n data[p + 3] = len & 0xff;\n p += 4;\n data[p] = type.charCodeAt(0) & 0xff;\n data[p + 1] = type.charCodeAt(1) & 0xff;\n data[p + 2] = type.charCodeAt(2) & 0xff;\n data[p + 3] = type.charCodeAt(3) & 0xff;\n p += 4;\n data.set(body, p);\n p += body.length;\n var crc = crc32(data, offset + 4, p);\n data[p] = crc >> 24 & 0xff;\n data[p + 1] = crc >> 16 & 0xff;\n data[p + 2] = crc >> 8 & 0xff;\n data[p + 3] = crc & 0xff;\n }\n\n function adler32(data, start, end) {\n var a = 1;\n var b = 0;\n\n for (var _i2 = start; _i2 < end; ++_i2) {\n a = (a + (data[_i2] & 0xff)) % 65521;\n b = (b + a) % 65521;\n }\n\n return b << 16 | a;\n }\n\n function deflateSync(literals) {\n if (!_is_node.isNodeJS) {\n return deflateSyncUncompressed(literals);\n }\n\n try {\n var input;\n\n if (parseInt(process.versions.node) >= 8) {\n input = literals;\n } else {\n input = Buffer.from(literals);\n }\n\n var output = require(\"zlib\").deflateSync(input, {\n level: 9\n });\n\n return output instanceof Uint8Array ? output : new Uint8Array(output);\n } catch (e) {\n (0, _util.warn)(\"Not compressing PNG because zlib.deflateSync is unavailable: \" + e);\n }\n\n return deflateSyncUncompressed(literals);\n }\n\n function deflateSyncUncompressed(literals) {\n var len = literals.length;\n var maxBlockLength = 0xffff;\n var deflateBlocks = Math.ceil(len / maxBlockLength);\n var idat = new Uint8Array(2 + len + deflateBlocks * 5 + 4);\n var pi = 0;\n idat[pi++] = 0x78;\n idat[pi++] = 0x9c;\n var pos = 0;\n\n while (len > maxBlockLength) {\n idat[pi++] = 0x00;\n idat[pi++] = 0xff;\n idat[pi++] = 0xff;\n idat[pi++] = 0x00;\n idat[pi++] = 0x00;\n idat.set(literals.subarray(pos, pos + maxBlockLength), pi);\n pi += maxBlockLength;\n pos += maxBlockLength;\n len -= maxBlockLength;\n }\n\n idat[pi++] = 0x01;\n idat[pi++] = len & 0xff;\n idat[pi++] = len >> 8 & 0xff;\n idat[pi++] = ~len & 0xffff & 0xff;\n idat[pi++] = (~len & 0xffff) >> 8 & 0xff;\n idat.set(literals.subarray(pos), pi);\n pi += literals.length - pos;\n var adler = adler32(literals, 0, literals.length);\n idat[pi++] = adler >> 24 & 0xff;\n idat[pi++] = adler >> 16 & 0xff;\n idat[pi++] = adler >> 8 & 0xff;\n idat[pi++] = adler & 0xff;\n return idat;\n }\n\n function encode(imgData, kind, forceDataSchema, isMask) {\n var width = imgData.width;\n var height = imgData.height;\n var bitDepth, colorType, lineSize;\n var bytes = imgData.data;\n\n switch (kind) {\n case _util.ImageKind.GRAYSCALE_1BPP:\n colorType = 0;\n bitDepth = 1;\n lineSize = width + 7 >> 3;\n break;\n\n case _util.ImageKind.RGB_24BPP:\n colorType = 2;\n bitDepth = 8;\n lineSize = width * 3;\n break;\n\n case _util.ImageKind.RGBA_32BPP:\n colorType = 6;\n bitDepth = 8;\n lineSize = width * 4;\n break;\n\n default:\n throw new Error(\"invalid format\");\n }\n\n var literals = new Uint8Array((1 + lineSize) * height);\n var offsetLiterals = 0,\n offsetBytes = 0;\n\n for (var y = 0; y < height; ++y) {\n literals[offsetLiterals++] = 0;\n literals.set(bytes.subarray(offsetBytes, offsetBytes + lineSize), offsetLiterals);\n offsetBytes += lineSize;\n offsetLiterals += lineSize;\n }\n\n if (kind === _util.ImageKind.GRAYSCALE_1BPP && isMask) {\n offsetLiterals = 0;\n\n for (var _y = 0; _y < height; _y++) {\n offsetLiterals++;\n\n for (var _i3 = 0; _i3 < lineSize; _i3++) {\n literals[offsetLiterals++] ^= 0xff;\n }\n }\n }\n\n var ihdr = new Uint8Array([width >> 24 & 0xff, width >> 16 & 0xff, width >> 8 & 0xff, width & 0xff, height >> 24 & 0xff, height >> 16 & 0xff, height >> 8 & 0xff, height & 0xff, bitDepth, colorType, 0x00, 0x00, 0x00]);\n var idat = deflateSync(literals);\n var pngLength = PNG_HEADER.length + CHUNK_WRAPPER_SIZE * 3 + ihdr.length + idat.length;\n var data = new Uint8Array(pngLength);\n var offset = 0;\n data.set(PNG_HEADER, offset);\n offset += PNG_HEADER.length;\n writePngChunk(\"IHDR\", ihdr, data, offset);\n offset += CHUNK_WRAPPER_SIZE + ihdr.length;\n writePngChunk(\"IDATA\", idat, data, offset);\n offset += CHUNK_WRAPPER_SIZE + idat.length;\n writePngChunk(\"IEND\", new Uint8Array(0), data, offset);\n return createObjectURL(data, \"image/png\", forceDataSchema);\n }\n\n return function convertImgDataToPng(imgData, forceDataSchema, isMask) {\n var kind = imgData.kind === undefined ? _util.ImageKind.GRAYSCALE_1BPP : imgData.kind;\n return encode(imgData, kind, forceDataSchema, isMask);\n };\n }();\n\n var SVGExtraState = /*#__PURE__*/function () {\n function SVGExtraState() {\n _classCallCheck(this, SVGExtraState);\n\n this.fontSizeScale = 1;\n this.fontWeight = SVG_DEFAULTS.fontWeight;\n this.fontSize = 0;\n this.textMatrix = _util.IDENTITY_MATRIX;\n this.fontMatrix = _util.FONT_IDENTITY_MATRIX;\n this.leading = 0;\n this.textRenderingMode = _util.TextRenderingMode.FILL;\n this.textMatrixScale = 1;\n this.x = 0;\n this.y = 0;\n this.lineX = 0;\n this.lineY = 0;\n this.charSpacing = 0;\n this.wordSpacing = 0;\n this.textHScale = 1;\n this.textRise = 0;\n this.fillColor = SVG_DEFAULTS.fillColor;\n this.strokeColor = \"#000000\";\n this.fillAlpha = 1;\n this.strokeAlpha = 1;\n this.lineWidth = 1;\n this.lineJoin = \"\";\n this.lineCap = \"\";\n this.miterLimit = 0;\n this.dashArray = [];\n this.dashPhase = 0;\n this.dependencies = [];\n this.activeClipUrl = null;\n this.clipGroup = null;\n this.maskId = \"\";\n }\n\n _createClass(SVGExtraState, [{\n key: \"clone\",\n value: function clone() {\n return Object.create(this);\n }\n }, {\n key: \"setCurrentPoint\",\n value: function setCurrentPoint(x, y) {\n this.x = x;\n this.y = y;\n }\n }]);\n\n return SVGExtraState;\n }();\n\n var clipCount = 0;\n var maskCount = 0;\n var shadingCount = 0;\n\n exports.SVGGraphics = SVGGraphics = /*#__PURE__*/function () {\n function SVGGraphics(commonObjs, objs) {\n var forceDataSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n _classCallCheck(this, SVGGraphics);\n\n this.svgFactory = new _display_utils.DOMSVGFactory();\n this.current = new SVGExtraState();\n this.transformMatrix = _util.IDENTITY_MATRIX;\n this.transformStack = [];\n this.extraStack = [];\n this.commonObjs = commonObjs;\n this.objs = objs;\n this.pendingClip = null;\n this.pendingEOFill = false;\n this.embedFonts = false;\n this.embeddedFonts = Object.create(null);\n this.cssStyle = null;\n this.forceDataSchema = !!forceDataSchema;\n this._operatorIdMapping = [];\n\n for (var op in _util.OPS) {\n this._operatorIdMapping[_util.OPS[op]] = op;\n }\n }\n\n _createClass(SVGGraphics, [{\n key: \"save\",\n value: function save() {\n this.transformStack.push(this.transformMatrix);\n var old = this.current;\n this.extraStack.push(old);\n this.current = old.clone();\n }\n }, {\n key: \"restore\",\n value: function restore() {\n this.transformMatrix = this.transformStack.pop();\n this.current = this.extraStack.pop();\n this.pendingClip = null;\n this.tgrp = null;\n }\n }, {\n key: \"group\",\n value: function group(items) {\n this.save();\n this.executeOpTree(items);\n this.restore();\n }\n }, {\n key: \"loadDependencies\",\n value: function loadDependencies(operatorList) {\n var _this = this;\n\n var fnArray = operatorList.fnArray;\n var argsArray = operatorList.argsArray;\n\n for (var i = 0, ii = fnArray.length; i < ii; i++) {\n if (fnArray[i] !== _util.OPS.dependency) {\n continue;\n }\n\n var _iterator2 = _createForOfIteratorHelper(argsArray[i]),\n _step2;\n\n try {\n var _loop = function _loop() {\n var obj = _step2.value;\n var objsPool = obj.startsWith(\"g_\") ? _this.commonObjs : _this.objs;\n var promise = new Promise(function (resolve) {\n objsPool.get(obj, resolve);\n });\n\n _this.current.dependencies.push(promise);\n };\n\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n _loop();\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n\n return Promise.all(this.current.dependencies);\n }\n }, {\n key: \"transform\",\n value: function transform(a, b, c, d, e, f) {\n var transformMatrix = [a, b, c, d, e, f];\n this.transformMatrix = _util.Util.transform(this.transformMatrix, transformMatrix);\n this.tgrp = null;\n }\n }, {\n key: \"getSVG\",\n value: function getSVG(operatorList, viewport) {\n var _this2 = this;\n\n this.viewport = viewport;\n\n var svgElement = this._initialize(viewport);\n\n return this.loadDependencies(operatorList).then(function () {\n _this2.transformMatrix = _util.IDENTITY_MATRIX;\n\n _this2.executeOpTree(_this2.convertOpList(operatorList));\n\n return svgElement;\n });\n }\n }, {\n key: \"convertOpList\",\n value: function convertOpList(operatorList) {\n var operatorIdMapping = this._operatorIdMapping;\n var argsArray = operatorList.argsArray;\n var fnArray = operatorList.fnArray;\n var opList = [];\n\n for (var i = 0, ii = fnArray.length; i < ii; i++) {\n var fnId = fnArray[i];\n opList.push({\n fnId: fnId,\n fn: operatorIdMapping[fnId],\n args: argsArray[i]\n });\n }\n\n return opListToTree(opList);\n }\n }, {\n key: \"executeOpTree\",\n value: function executeOpTree(opTree) {\n var _iterator3 = _createForOfIteratorHelper(opTree),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var opTreeElement = _step3.value;\n var fn = opTreeElement.fn;\n var fnId = opTreeElement.fnId;\n var args = opTreeElement.args;\n\n switch (fnId | 0) {\n case _util.OPS.beginText:\n this.beginText();\n break;\n\n case _util.OPS.dependency:\n break;\n\n case _util.OPS.setLeading:\n this.setLeading(args);\n break;\n\n case _util.OPS.setLeadingMoveText:\n this.setLeadingMoveText(args[0], args[1]);\n break;\n\n case _util.OPS.setFont:\n this.setFont(args);\n break;\n\n case _util.OPS.showText:\n this.showText(args[0]);\n break;\n\n case _util.OPS.showSpacedText:\n this.showText(args[0]);\n break;\n\n case _util.OPS.endText:\n this.endText();\n break;\n\n case _util.OPS.moveText:\n this.moveText(args[0], args[1]);\n break;\n\n case _util.OPS.setCharSpacing:\n this.setCharSpacing(args[0]);\n break;\n\n case _util.OPS.setWordSpacing:\n this.setWordSpacing(args[0]);\n break;\n\n case _util.OPS.setHScale:\n this.setHScale(args[0]);\n break;\n\n case _util.OPS.setTextMatrix:\n this.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]);\n break;\n\n case _util.OPS.setTextRise:\n this.setTextRise(args[0]);\n break;\n\n case _util.OPS.setTextRenderingMode:\n this.setTextRenderingMode(args[0]);\n break;\n\n case _util.OPS.setLineWidth:\n this.setLineWidth(args[0]);\n break;\n\n case _util.OPS.setLineJoin:\n this.setLineJoin(args[0]);\n break;\n\n case _util.OPS.setLineCap:\n this.setLineCap(args[0]);\n break;\n\n case _util.OPS.setMiterLimit:\n this.setMiterLimit(args[0]);\n break;\n\n case _util.OPS.setFillRGBColor:\n this.setFillRGBColor(args[0], args[1], args[2]);\n break;\n\n case _util.OPS.setStrokeRGBColor:\n this.setStrokeRGBColor(args[0], args[1], args[2]);\n break;\n\n case _util.OPS.setStrokeColorN:\n this.setStrokeColorN(args);\n break;\n\n case _util.OPS.setFillColorN:\n this.setFillColorN(args);\n break;\n\n case _util.OPS.shadingFill:\n this.shadingFill(args[0]);\n break;\n\n case _util.OPS.setDash:\n this.setDash(args[0], args[1]);\n break;\n\n case _util.OPS.setRenderingIntent:\n this.setRenderingIntent(args[0]);\n break;\n\n case _util.OPS.setFlatness:\n this.setFlatness(args[0]);\n break;\n\n case _util.OPS.setGState:\n this.setGState(args[0]);\n break;\n\n case _util.OPS.fill:\n this.fill();\n break;\n\n case _util.OPS.eoFill:\n this.eoFill();\n break;\n\n case _util.OPS.stroke:\n this.stroke();\n break;\n\n case _util.OPS.fillStroke:\n this.fillStroke();\n break;\n\n case _util.OPS.eoFillStroke:\n this.eoFillStroke();\n break;\n\n case _util.OPS.clip:\n this.clip(\"nonzero\");\n break;\n\n case _util.OPS.eoClip:\n this.clip(\"evenodd\");\n break;\n\n case _util.OPS.paintSolidColorImageMask:\n this.paintSolidColorImageMask();\n break;\n\n case _util.OPS.paintImageXObject:\n this.paintImageXObject(args[0]);\n break;\n\n case _util.OPS.paintInlineImageXObject:\n this.paintInlineImageXObject(args[0]);\n break;\n\n case _util.OPS.paintImageMaskXObject:\n this.paintImageMaskXObject(args[0]);\n break;\n\n case _util.OPS.paintFormXObjectBegin:\n this.paintFormXObjectBegin(args[0], args[1]);\n break;\n\n case _util.OPS.paintFormXObjectEnd:\n this.paintFormXObjectEnd();\n break;\n\n case _util.OPS.closePath:\n this.closePath();\n break;\n\n case _util.OPS.closeStroke:\n this.closeStroke();\n break;\n\n case _util.OPS.closeFillStroke:\n this.closeFillStroke();\n break;\n\n case _util.OPS.closeEOFillStroke:\n this.closeEOFillStroke();\n break;\n\n case _util.OPS.nextLine:\n this.nextLine();\n break;\n\n case _util.OPS.transform:\n this.transform(args[0], args[1], args[2], args[3], args[4], args[5]);\n break;\n\n case _util.OPS.constructPath:\n this.constructPath(args[0], args[1]);\n break;\n\n case _util.OPS.endPath:\n this.endPath();\n break;\n\n case 92:\n this.group(opTreeElement.items);\n break;\n\n default:\n (0, _util.warn)(\"Unimplemented operator \".concat(fn));\n break;\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n }\n }, {\n key: \"setWordSpacing\",\n value: function setWordSpacing(wordSpacing) {\n this.current.wordSpacing = wordSpacing;\n }\n }, {\n key: \"setCharSpacing\",\n value: function setCharSpacing(charSpacing) {\n this.current.charSpacing = charSpacing;\n }\n }, {\n key: \"nextLine\",\n value: function nextLine() {\n this.moveText(0, this.current.leading);\n }\n }, {\n key: \"setTextMatrix\",\n value: function setTextMatrix(a, b, c, d, e, f) {\n var current = this.current;\n current.textMatrix = current.lineMatrix = [a, b, c, d, e, f];\n current.textMatrixScale = Math.hypot(a, b);\n current.x = current.lineX = 0;\n current.y = current.lineY = 0;\n current.xcoords = [];\n current.ycoords = [];\n current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n current.tspan.setAttributeNS(null, \"font-size\", \"\".concat(pf(current.fontSize), \"px\"));\n current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n current.txtElement = this.svgFactory.createElement(\"svg:text\");\n current.txtElement.appendChild(current.tspan);\n }\n }, {\n key: \"beginText\",\n value: function beginText() {\n var current = this.current;\n current.x = current.lineX = 0;\n current.y = current.lineY = 0;\n current.textMatrix = _util.IDENTITY_MATRIX;\n current.lineMatrix = _util.IDENTITY_MATRIX;\n current.textMatrixScale = 1;\n current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n current.txtElement = this.svgFactory.createElement(\"svg:text\");\n current.txtgrp = this.svgFactory.createElement(\"svg:g\");\n current.xcoords = [];\n current.ycoords = [];\n }\n }, {\n key: \"moveText\",\n value: function moveText(x, y) {\n var current = this.current;\n current.x = current.lineX += x;\n current.y = current.lineY += y;\n current.xcoords = [];\n current.ycoords = [];\n current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n current.tspan.setAttributeNS(null, \"font-size\", \"\".concat(pf(current.fontSize), \"px\"));\n current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n }\n }, {\n key: \"showText\",\n value: function showText(glyphs) {\n var current = this.current;\n var font = current.font;\n var fontSize = current.fontSize;\n\n if (fontSize === 0) {\n return;\n }\n\n var fontSizeScale = current.fontSizeScale;\n var charSpacing = current.charSpacing;\n var wordSpacing = current.wordSpacing;\n var fontDirection = current.fontDirection;\n var textHScale = current.textHScale * fontDirection;\n var vertical = font.vertical;\n var spacingDir = vertical ? 1 : -1;\n var defaultVMetrics = font.defaultVMetrics;\n var widthAdvanceScale = fontSize * current.fontMatrix[0];\n var x = 0;\n\n var _iterator4 = _createForOfIteratorHelper(glyphs),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var glyph = _step4.value;\n\n if (glyph === null) {\n x += fontDirection * wordSpacing;\n continue;\n } else if (typeof glyph === \"number\") {\n x += spacingDir * glyph * fontSize / 1000;\n continue;\n }\n\n var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n var character = glyph.fontChar;\n var scaledX = void 0,\n scaledY = void 0;\n var width = glyph.width;\n\n if (vertical) {\n var vx = void 0;\n var vmetric = glyph.vmetric || defaultVMetrics;\n vx = glyph.vmetric ? vmetric[1] : width * 0.5;\n vx = -vx * widthAdvanceScale;\n var vy = vmetric[2] * widthAdvanceScale;\n width = vmetric ? -vmetric[0] : width;\n scaledX = vx / fontSizeScale;\n scaledY = (x + vy) / fontSizeScale;\n } else {\n scaledX = x / fontSizeScale;\n scaledY = 0;\n }\n\n if (glyph.isInFont || font.missingFile) {\n current.xcoords.push(current.x + scaledX);\n\n if (vertical) {\n current.ycoords.push(-current.y + scaledY);\n }\n\n current.tspan.textContent += character;\n } else {}\n\n var charWidth = void 0;\n\n if (vertical) {\n charWidth = width * widthAdvanceScale - spacing * fontDirection;\n } else {\n charWidth = width * widthAdvanceScale + spacing * fontDirection;\n }\n\n x += charWidth;\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n current.tspan.setAttributeNS(null, \"x\", current.xcoords.map(pf).join(\" \"));\n\n if (vertical) {\n current.tspan.setAttributeNS(null, \"y\", current.ycoords.map(pf).join(\" \"));\n } else {\n current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n }\n\n if (vertical) {\n current.y -= x;\n } else {\n current.x += x * textHScale;\n }\n\n current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n current.tspan.setAttributeNS(null, \"font-size\", \"\".concat(pf(current.fontSize), \"px\"));\n\n if (current.fontStyle !== SVG_DEFAULTS.fontStyle) {\n current.tspan.setAttributeNS(null, \"font-style\", current.fontStyle);\n }\n\n if (current.fontWeight !== SVG_DEFAULTS.fontWeight) {\n current.tspan.setAttributeNS(null, \"font-weight\", current.fontWeight);\n }\n\n var fillStrokeMode = current.textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK;\n\n if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n if (current.fillColor !== SVG_DEFAULTS.fillColor) {\n current.tspan.setAttributeNS(null, \"fill\", current.fillColor);\n }\n\n if (current.fillAlpha < 1) {\n current.tspan.setAttributeNS(null, \"fill-opacity\", current.fillAlpha);\n }\n } else if (current.textRenderingMode === _util.TextRenderingMode.ADD_TO_PATH) {\n current.tspan.setAttributeNS(null, \"fill\", \"transparent\");\n } else {\n current.tspan.setAttributeNS(null, \"fill\", \"none\");\n }\n\n if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n var lineWidthScale = 1 / (current.textMatrixScale || 1);\n\n this._setStrokeAttributes(current.tspan, lineWidthScale);\n }\n\n var textMatrix = current.textMatrix;\n\n if (current.textRise !== 0) {\n textMatrix = textMatrix.slice();\n textMatrix[5] += current.textRise;\n }\n\n current.txtElement.setAttributeNS(null, \"transform\", \"\".concat(pm(textMatrix), \" scale(\").concat(pf(textHScale), \", -1)\"));\n current.txtElement.setAttributeNS(XML_NS, \"xml:space\", \"preserve\");\n current.txtElement.appendChild(current.tspan);\n current.txtgrp.appendChild(current.txtElement);\n\n this._ensureTransformGroup().appendChild(current.txtElement);\n }\n }, {\n key: \"setLeadingMoveText\",\n value: function setLeadingMoveText(x, y) {\n this.setLeading(-y);\n this.moveText(x, y);\n }\n }, {\n key: \"addFontStyle\",\n value: function addFontStyle(fontObj) {\n if (!fontObj.data) {\n throw new Error(\"addFontStyle: No font data available, \" + 'ensure that the \"fontExtraProperties\" API parameter is set.');\n }\n\n if (!this.cssStyle) {\n this.cssStyle = this.svgFactory.createElement(\"svg:style\");\n this.cssStyle.setAttributeNS(null, \"type\", \"text/css\");\n this.defs.appendChild(this.cssStyle);\n }\n\n var url = createObjectURL(fontObj.data, fontObj.mimetype, this.forceDataSchema);\n this.cssStyle.textContent += \"@font-face { font-family: \\\"\".concat(fontObj.loadedName, \"\\\";\") + \" src: url(\".concat(url, \"); }\\n\");\n }\n }, {\n key: \"setFont\",\n value: function setFont(details) {\n var current = this.current;\n var fontObj = this.commonObjs.get(details[0]);\n var size = details[1];\n current.font = fontObj;\n\n if (this.embedFonts && !fontObj.missingFile && !this.embeddedFonts[fontObj.loadedName]) {\n this.addFontStyle(fontObj);\n this.embeddedFonts[fontObj.loadedName] = fontObj;\n }\n\n current.fontMatrix = fontObj.fontMatrix || _util.FONT_IDENTITY_MATRIX;\n var bold = \"normal\";\n\n if (fontObj.black) {\n bold = \"900\";\n } else if (fontObj.bold) {\n bold = \"bold\";\n }\n\n var italic = fontObj.italic ? \"italic\" : \"normal\";\n\n if (size < 0) {\n size = -size;\n current.fontDirection = -1;\n } else {\n current.fontDirection = 1;\n }\n\n current.fontSize = size;\n current.fontFamily = fontObj.loadedName;\n current.fontWeight = bold;\n current.fontStyle = italic;\n current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n current.xcoords = [];\n current.ycoords = [];\n }\n }, {\n key: \"endText\",\n value: function endText() {\n var _current$txtElement;\n\n var current = this.current;\n\n if (current.textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG && (_current$txtElement = current.txtElement) !== null && _current$txtElement !== void 0 && _current$txtElement.hasChildNodes()) {\n current.element = current.txtElement;\n this.clip(\"nonzero\");\n this.endPath();\n }\n }\n }, {\n key: \"setLineWidth\",\n value: function setLineWidth(width) {\n if (width > 0) {\n this.current.lineWidth = width;\n }\n }\n }, {\n key: \"setLineCap\",\n value: function setLineCap(style) {\n this.current.lineCap = LINE_CAP_STYLES[style];\n }\n }, {\n key: \"setLineJoin\",\n value: function setLineJoin(style) {\n this.current.lineJoin = LINE_JOIN_STYLES[style];\n }\n }, {\n key: \"setMiterLimit\",\n value: function setMiterLimit(limit) {\n this.current.miterLimit = limit;\n }\n }, {\n key: \"setStrokeAlpha\",\n value: function setStrokeAlpha(strokeAlpha) {\n this.current.strokeAlpha = strokeAlpha;\n }\n }, {\n key: \"setStrokeRGBColor\",\n value: function setStrokeRGBColor(r, g, b) {\n this.current.strokeColor = _util.Util.makeHexColor(r, g, b);\n }\n }, {\n key: \"setFillAlpha\",\n value: function setFillAlpha(fillAlpha) {\n this.current.fillAlpha = fillAlpha;\n }\n }, {\n key: \"setFillRGBColor\",\n value: function setFillRGBColor(r, g, b) {\n this.current.fillColor = _util.Util.makeHexColor(r, g, b);\n this.current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n this.current.xcoords = [];\n this.current.ycoords = [];\n }\n }, {\n key: \"setStrokeColorN\",\n value: function setStrokeColorN(args) {\n this.current.strokeColor = this._makeColorN_Pattern(args);\n }\n }, {\n key: \"setFillColorN\",\n value: function setFillColorN(args) {\n this.current.fillColor = this._makeColorN_Pattern(args);\n }\n }, {\n key: \"shadingFill\",\n value: function shadingFill(args) {\n var width = this.viewport.width;\n var height = this.viewport.height;\n\n var inv = _util.Util.inverseTransform(this.transformMatrix);\n\n var bl = _util.Util.applyTransform([0, 0], inv);\n\n var br = _util.Util.applyTransform([0, height], inv);\n\n var ul = _util.Util.applyTransform([width, 0], inv);\n\n var ur = _util.Util.applyTransform([width, height], inv);\n\n var x0 = Math.min(bl[0], br[0], ul[0], ur[0]);\n var y0 = Math.min(bl[1], br[1], ul[1], ur[1]);\n var x1 = Math.max(bl[0], br[0], ul[0], ur[0]);\n var y1 = Math.max(bl[1], br[1], ul[1], ur[1]);\n var rect = this.svgFactory.createElement(\"svg:rect\");\n rect.setAttributeNS(null, \"x\", x0);\n rect.setAttributeNS(null, \"y\", y0);\n rect.setAttributeNS(null, \"width\", x1 - x0);\n rect.setAttributeNS(null, \"height\", y1 - y0);\n rect.setAttributeNS(null, \"fill\", this._makeShadingPattern(args));\n\n if (this.current.fillAlpha < 1) {\n rect.setAttributeNS(null, \"fill-opacity\", this.current.fillAlpha);\n }\n\n this._ensureTransformGroup().appendChild(rect);\n }\n }, {\n key: \"_makeColorN_Pattern\",\n value: function _makeColorN_Pattern(args) {\n if (args[0] === \"TilingPattern\") {\n return this._makeTilingPattern(args);\n }\n\n return this._makeShadingPattern(args);\n }\n }, {\n key: \"_makeTilingPattern\",\n value: function _makeTilingPattern(args) {\n var color = args[1];\n var operatorList = args[2];\n var matrix = args[3] || _util.IDENTITY_MATRIX;\n\n var _args$ = _slicedToArray(args[4], 4),\n x0 = _args$[0],\n y0 = _args$[1],\n x1 = _args$[2],\n y1 = _args$[3];\n\n var xstep = args[5];\n var ystep = args[6];\n var paintType = args[7];\n var tilingId = \"shading\".concat(shadingCount++);\n\n var _Util$normalizeRect = _util.Util.normalizeRect([].concat(_toConsumableArray(_util.Util.applyTransform([x0, y0], matrix)), _toConsumableArray(_util.Util.applyTransform([x1, y1], matrix)))),\n _Util$normalizeRect2 = _slicedToArray(_Util$normalizeRect, 4),\n tx0 = _Util$normalizeRect2[0],\n ty0 = _Util$normalizeRect2[1],\n tx1 = _Util$normalizeRect2[2],\n ty1 = _Util$normalizeRect2[3];\n\n var _Util$singularValueDe = _util.Util.singularValueDecompose2dScale(matrix),\n _Util$singularValueDe2 = _slicedToArray(_Util$singularValueDe, 2),\n xscale = _Util$singularValueDe2[0],\n yscale = _Util$singularValueDe2[1];\n\n var txstep = xstep * xscale;\n var tystep = ystep * yscale;\n var tiling = this.svgFactory.createElement(\"svg:pattern\");\n tiling.setAttributeNS(null, \"id\", tilingId);\n tiling.setAttributeNS(null, \"patternUnits\", \"userSpaceOnUse\");\n tiling.setAttributeNS(null, \"width\", txstep);\n tiling.setAttributeNS(null, \"height\", tystep);\n tiling.setAttributeNS(null, \"x\", \"\".concat(tx0));\n tiling.setAttributeNS(null, \"y\", \"\".concat(ty0));\n var svg = this.svg;\n var transformMatrix = this.transformMatrix;\n var fillColor = this.current.fillColor;\n var strokeColor = this.current.strokeColor;\n var bbox = this.svgFactory.create(tx1 - tx0, ty1 - ty0);\n this.svg = bbox;\n this.transformMatrix = matrix;\n\n if (paintType === 2) {\n var cssColor = _util.Util.makeHexColor.apply(_util.Util, _toConsumableArray(color));\n\n this.current.fillColor = cssColor;\n this.current.strokeColor = cssColor;\n }\n\n this.executeOpTree(this.convertOpList(operatorList));\n this.svg = svg;\n this.transformMatrix = transformMatrix;\n this.current.fillColor = fillColor;\n this.current.strokeColor = strokeColor;\n tiling.appendChild(bbox.childNodes[0]);\n this.defs.appendChild(tiling);\n return \"url(#\".concat(tilingId, \")\");\n }\n }, {\n key: \"_makeShadingPattern\",\n value: function _makeShadingPattern(args) {\n if (typeof args === \"string\") {\n args = this.objs.get(args);\n }\n\n switch (args[0]) {\n case \"RadialAxial\":\n var shadingId = \"shading\".concat(shadingCount++);\n var colorStops = args[3];\n var gradient;\n\n switch (args[1]) {\n case \"axial\":\n var point0 = args[4];\n var point1 = args[5];\n gradient = this.svgFactory.createElement(\"svg:linearGradient\");\n gradient.setAttributeNS(null, \"id\", shadingId);\n gradient.setAttributeNS(null, \"gradientUnits\", \"userSpaceOnUse\");\n gradient.setAttributeNS(null, \"x1\", point0[0]);\n gradient.setAttributeNS(null, \"y1\", point0[1]);\n gradient.setAttributeNS(null, \"x2\", point1[0]);\n gradient.setAttributeNS(null, \"y2\", point1[1]);\n break;\n\n case \"radial\":\n var focalPoint = args[4];\n var circlePoint = args[5];\n var focalRadius = args[6];\n var circleRadius = args[7];\n gradient = this.svgFactory.createElement(\"svg:radialGradient\");\n gradient.setAttributeNS(null, \"id\", shadingId);\n gradient.setAttributeNS(null, \"gradientUnits\", \"userSpaceOnUse\");\n gradient.setAttributeNS(null, \"cx\", circlePoint[0]);\n gradient.setAttributeNS(null, \"cy\", circlePoint[1]);\n gradient.setAttributeNS(null, \"r\", circleRadius);\n gradient.setAttributeNS(null, \"fx\", focalPoint[0]);\n gradient.setAttributeNS(null, \"fy\", focalPoint[1]);\n gradient.setAttributeNS(null, \"fr\", focalRadius);\n break;\n\n default:\n throw new Error(\"Unknown RadialAxial type: \".concat(args[1]));\n }\n\n var _iterator5 = _createForOfIteratorHelper(colorStops),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var colorStop = _step5.value;\n var stop = this.svgFactory.createElement(\"svg:stop\");\n stop.setAttributeNS(null, \"offset\", colorStop[0]);\n stop.setAttributeNS(null, \"stop-color\", colorStop[1]);\n gradient.appendChild(stop);\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n this.defs.appendChild(gradient);\n return \"url(#\".concat(shadingId, \")\");\n\n case \"Mesh\":\n (0, _util.warn)(\"Unimplemented pattern Mesh\");\n return null;\n\n case \"Dummy\":\n return \"hotpink\";\n\n default:\n throw new Error(\"Unknown IR type: \".concat(args[0]));\n }\n }\n }, {\n key: \"setDash\",\n value: function setDash(dashArray, dashPhase) {\n this.current.dashArray = dashArray;\n this.current.dashPhase = dashPhase;\n }\n }, {\n key: \"constructPath\",\n value: function constructPath(ops, args) {\n var current = this.current;\n var x = current.x,\n y = current.y;\n var d = [];\n var j = 0;\n\n var _iterator6 = _createForOfIteratorHelper(ops),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var op = _step6.value;\n\n switch (op | 0) {\n case _util.OPS.rectangle:\n x = args[j++];\n y = args[j++];\n var width = args[j++];\n var height = args[j++];\n var xw = x + width;\n var yh = y + height;\n d.push(\"M\", pf(x), pf(y), \"L\", pf(xw), pf(y), \"L\", pf(xw), pf(yh), \"L\", pf(x), pf(yh), \"Z\");\n break;\n\n case _util.OPS.moveTo:\n x = args[j++];\n y = args[j++];\n d.push(\"M\", pf(x), pf(y));\n break;\n\n case _util.OPS.lineTo:\n x = args[j++];\n y = args[j++];\n d.push(\"L\", pf(x), pf(y));\n break;\n\n case _util.OPS.curveTo:\n x = args[j + 4];\n y = args[j + 5];\n d.push(\"C\", pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]), pf(x), pf(y));\n j += 6;\n break;\n\n case _util.OPS.curveTo2:\n d.push(\"C\", pf(x), pf(y), pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]));\n x = args[j + 2];\n y = args[j + 3];\n j += 4;\n break;\n\n case _util.OPS.curveTo3:\n x = args[j + 2];\n y = args[j + 3];\n d.push(\"C\", pf(args[j]), pf(args[j + 1]), pf(x), pf(y), pf(x), pf(y));\n j += 4;\n break;\n\n case _util.OPS.closePath:\n d.push(\"Z\");\n break;\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n d = d.join(\" \");\n\n if (current.path && ops.length > 0 && ops[0] !== _util.OPS.rectangle && ops[0] !== _util.OPS.moveTo) {\n d = current.path.getAttributeNS(null, \"d\") + d;\n } else {\n current.path = this.svgFactory.createElement(\"svg:path\");\n\n this._ensureTransformGroup().appendChild(current.path);\n }\n\n current.path.setAttributeNS(null, \"d\", d);\n current.path.setAttributeNS(null, \"fill\", \"none\");\n current.element = current.path;\n current.setCurrentPoint(x, y);\n }\n }, {\n key: \"endPath\",\n value: function endPath() {\n var current = this.current;\n current.path = null;\n\n if (!this.pendingClip) {\n return;\n }\n\n if (!current.element) {\n this.pendingClip = null;\n return;\n }\n\n var clipId = \"clippath\".concat(clipCount++);\n var clipPath = this.svgFactory.createElement(\"svg:clipPath\");\n clipPath.setAttributeNS(null, \"id\", clipId);\n clipPath.setAttributeNS(null, \"transform\", pm(this.transformMatrix));\n var clipElement = current.element.cloneNode(true);\n\n if (this.pendingClip === \"evenodd\") {\n clipElement.setAttributeNS(null, \"clip-rule\", \"evenodd\");\n } else {\n clipElement.setAttributeNS(null, \"clip-rule\", \"nonzero\");\n }\n\n this.pendingClip = null;\n clipPath.appendChild(clipElement);\n this.defs.appendChild(clipPath);\n\n if (current.activeClipUrl) {\n current.clipGroup = null;\n\n var _iterator7 = _createForOfIteratorHelper(this.extraStack),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var prev = _step7.value;\n prev.clipGroup = null;\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n\n clipPath.setAttributeNS(null, \"clip-path\", current.activeClipUrl);\n }\n\n current.activeClipUrl = \"url(#\".concat(clipId, \")\");\n this.tgrp = null;\n }\n }, {\n key: \"clip\",\n value: function clip(type) {\n this.pendingClip = type;\n }\n }, {\n key: \"closePath\",\n value: function closePath() {\n var current = this.current;\n\n if (current.path) {\n var d = \"\".concat(current.path.getAttributeNS(null, \"d\"), \"Z\");\n current.path.setAttributeNS(null, \"d\", d);\n }\n }\n }, {\n key: \"setLeading\",\n value: function setLeading(leading) {\n this.current.leading = -leading;\n }\n }, {\n key: \"setTextRise\",\n value: function setTextRise(textRise) {\n this.current.textRise = textRise;\n }\n }, {\n key: \"setTextRenderingMode\",\n value: function setTextRenderingMode(textRenderingMode) {\n this.current.textRenderingMode = textRenderingMode;\n }\n }, {\n key: \"setHScale\",\n value: function setHScale(scale) {\n this.current.textHScale = scale / 100;\n }\n }, {\n key: \"setRenderingIntent\",\n value: function setRenderingIntent(intent) {}\n }, {\n key: \"setFlatness\",\n value: function setFlatness(flatness) {}\n }, {\n key: \"setGState\",\n value: function setGState(states) {\n var _iterator8 = _createForOfIteratorHelper(states),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var _step8$value = _slicedToArray(_step8.value, 2),\n key = _step8$value[0],\n value = _step8$value[1];\n\n switch (key) {\n case \"LW\":\n this.setLineWidth(value);\n break;\n\n case \"LC\":\n this.setLineCap(value);\n break;\n\n case \"LJ\":\n this.setLineJoin(value);\n break;\n\n case \"ML\":\n this.setMiterLimit(value);\n break;\n\n case \"D\":\n this.setDash(value[0], value[1]);\n break;\n\n case \"RI\":\n this.setRenderingIntent(value);\n break;\n\n case \"FL\":\n this.setFlatness(value);\n break;\n\n case \"Font\":\n this.setFont(value);\n break;\n\n case \"CA\":\n this.setStrokeAlpha(value);\n break;\n\n case \"ca\":\n this.setFillAlpha(value);\n break;\n\n default:\n (0, _util.warn)(\"Unimplemented graphic state operator \".concat(key));\n break;\n }\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n }\n }, {\n key: \"fill\",\n value: function fill() {\n var current = this.current;\n\n if (current.element) {\n current.element.setAttributeNS(null, \"fill\", current.fillColor);\n current.element.setAttributeNS(null, \"fill-opacity\", current.fillAlpha);\n this.endPath();\n }\n }\n }, {\n key: \"stroke\",\n value: function stroke() {\n var current = this.current;\n\n if (current.element) {\n this._setStrokeAttributes(current.element);\n\n current.element.setAttributeNS(null, \"fill\", \"none\");\n this.endPath();\n }\n }\n }, {\n key: \"_setStrokeAttributes\",\n value: function _setStrokeAttributes(element) {\n var lineWidthScale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var current = this.current;\n var dashArray = current.dashArray;\n\n if (lineWidthScale !== 1 && dashArray.length > 0) {\n dashArray = dashArray.map(function (value) {\n return lineWidthScale * value;\n });\n }\n\n element.setAttributeNS(null, \"stroke\", current.strokeColor);\n element.setAttributeNS(null, \"stroke-opacity\", current.strokeAlpha);\n element.setAttributeNS(null, \"stroke-miterlimit\", pf(current.miterLimit));\n element.setAttributeNS(null, \"stroke-linecap\", current.lineCap);\n element.setAttributeNS(null, \"stroke-linejoin\", current.lineJoin);\n element.setAttributeNS(null, \"stroke-width\", pf(lineWidthScale * current.lineWidth) + \"px\");\n element.setAttributeNS(null, \"stroke-dasharray\", dashArray.map(pf).join(\" \"));\n element.setAttributeNS(null, \"stroke-dashoffset\", pf(lineWidthScale * current.dashPhase) + \"px\");\n }\n }, {\n key: \"eoFill\",\n value: function eoFill() {\n if (this.current.element) {\n this.current.element.setAttributeNS(null, \"fill-rule\", \"evenodd\");\n }\n\n this.fill();\n }\n }, {\n key: \"fillStroke\",\n value: function fillStroke() {\n this.stroke();\n this.fill();\n }\n }, {\n key: \"eoFillStroke\",\n value: function eoFillStroke() {\n if (this.current.element) {\n this.current.element.setAttributeNS(null, \"fill-rule\", \"evenodd\");\n }\n\n this.fillStroke();\n }\n }, {\n key: \"closeStroke\",\n value: function closeStroke() {\n this.closePath();\n this.stroke();\n }\n }, {\n key: \"closeFillStroke\",\n value: function closeFillStroke() {\n this.closePath();\n this.fillStroke();\n }\n }, {\n key: \"closeEOFillStroke\",\n value: function closeEOFillStroke() {\n this.closePath();\n this.eoFillStroke();\n }\n }, {\n key: \"paintSolidColorImageMask\",\n value: function paintSolidColorImageMask() {\n var rect = this.svgFactory.createElement(\"svg:rect\");\n rect.setAttributeNS(null, \"x\", \"0\");\n rect.setAttributeNS(null, \"y\", \"0\");\n rect.setAttributeNS(null, \"width\", \"1px\");\n rect.setAttributeNS(null, \"height\", \"1px\");\n rect.setAttributeNS(null, \"fill\", this.current.fillColor);\n\n this._ensureTransformGroup().appendChild(rect);\n }\n }, {\n key: \"paintImageXObject\",\n value: function paintImageXObject(objId) {\n var imgData = objId.startsWith(\"g_\") ? this.commonObjs.get(objId) : this.objs.get(objId);\n\n if (!imgData) {\n (0, _util.warn)(\"Dependent image with object ID \".concat(objId, \" is not ready yet\"));\n return;\n }\n\n this.paintInlineImageXObject(imgData);\n }\n }, {\n key: \"paintInlineImageXObject\",\n value: function paintInlineImageXObject(imgData, mask) {\n var width = imgData.width;\n var height = imgData.height;\n var imgSrc = convertImgDataToPng(imgData, this.forceDataSchema, !!mask);\n var cliprect = this.svgFactory.createElement(\"svg:rect\");\n cliprect.setAttributeNS(null, \"x\", \"0\");\n cliprect.setAttributeNS(null, \"y\", \"0\");\n cliprect.setAttributeNS(null, \"width\", pf(width));\n cliprect.setAttributeNS(null, \"height\", pf(height));\n this.current.element = cliprect;\n this.clip(\"nonzero\");\n var imgEl = this.svgFactory.createElement(\"svg:image\");\n imgEl.setAttributeNS(XLINK_NS, \"xlink:href\", imgSrc);\n imgEl.setAttributeNS(null, \"x\", \"0\");\n imgEl.setAttributeNS(null, \"y\", pf(-height));\n imgEl.setAttributeNS(null, \"width\", pf(width) + \"px\");\n imgEl.setAttributeNS(null, \"height\", pf(height) + \"px\");\n imgEl.setAttributeNS(null, \"transform\", \"scale(\".concat(pf(1 / width), \" \").concat(pf(-1 / height), \")\"));\n\n if (mask) {\n mask.appendChild(imgEl);\n } else {\n this._ensureTransformGroup().appendChild(imgEl);\n }\n }\n }, {\n key: \"paintImageMaskXObject\",\n value: function paintImageMaskXObject(imgData) {\n var current = this.current;\n var width = imgData.width;\n var height = imgData.height;\n var fillColor = current.fillColor;\n current.maskId = \"mask\".concat(maskCount++);\n var mask = this.svgFactory.createElement(\"svg:mask\");\n mask.setAttributeNS(null, \"id\", current.maskId);\n var rect = this.svgFactory.createElement(\"svg:rect\");\n rect.setAttributeNS(null, \"x\", \"0\");\n rect.setAttributeNS(null, \"y\", \"0\");\n rect.setAttributeNS(null, \"width\", pf(width));\n rect.setAttributeNS(null, \"height\", pf(height));\n rect.setAttributeNS(null, \"fill\", fillColor);\n rect.setAttributeNS(null, \"mask\", \"url(#\".concat(current.maskId, \")\"));\n this.defs.appendChild(mask);\n\n this._ensureTransformGroup().appendChild(rect);\n\n this.paintInlineImageXObject(imgData, mask);\n }\n }, {\n key: \"paintFormXObjectBegin\",\n value: function paintFormXObjectBegin(matrix, bbox) {\n if (Array.isArray(matrix) && matrix.length === 6) {\n this.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n }\n\n if (bbox) {\n var width = bbox[2] - bbox[0];\n var height = bbox[3] - bbox[1];\n var cliprect = this.svgFactory.createElement(\"svg:rect\");\n cliprect.setAttributeNS(null, \"x\", bbox[0]);\n cliprect.setAttributeNS(null, \"y\", bbox[1]);\n cliprect.setAttributeNS(null, \"width\", pf(width));\n cliprect.setAttributeNS(null, \"height\", pf(height));\n this.current.element = cliprect;\n this.clip(\"nonzero\");\n this.endPath();\n }\n }\n }, {\n key: \"paintFormXObjectEnd\",\n value: function paintFormXObjectEnd() {}\n }, {\n key: \"_initialize\",\n value: function _initialize(viewport) {\n var svg = this.svgFactory.create(viewport.width, viewport.height);\n var definitions = this.svgFactory.createElement(\"svg:defs\");\n svg.appendChild(definitions);\n this.defs = definitions;\n var rootGroup = this.svgFactory.createElement(\"svg:g\");\n rootGroup.setAttributeNS(null, \"transform\", pm(viewport.transform));\n svg.appendChild(rootGroup);\n this.svg = rootGroup;\n return svg;\n }\n }, {\n key: \"_ensureClipGroup\",\n value: function _ensureClipGroup() {\n if (!this.current.clipGroup) {\n var clipGroup = this.svgFactory.createElement(\"svg:g\");\n clipGroup.setAttributeNS(null, \"clip-path\", this.current.activeClipUrl);\n this.svg.appendChild(clipGroup);\n this.current.clipGroup = clipGroup;\n }\n\n return this.current.clipGroup;\n }\n }, {\n key: \"_ensureTransformGroup\",\n value: function _ensureTransformGroup() {\n if (!this.tgrp) {\n this.tgrp = this.svgFactory.createElement(\"svg:g\");\n this.tgrp.setAttributeNS(null, \"transform\", pm(this.transformMatrix));\n\n if (this.current.activeClipUrl) {\n this._ensureClipGroup().appendChild(this.tgrp);\n } else {\n this.svg.appendChild(this.tgrp);\n }\n }\n\n return this.tgrp;\n }\n }]);\n\n return SVGGraphics;\n }();\n}\n\n/***/ }),\n/* 178 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PDFNodeStream = void 0;\n\nvar _regenerator = _interopRequireDefault(__w_pdfjs_require__(156));\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _network_utils = __w_pdfjs_require__(179);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n;\n\nvar fs = require(\"fs\");\n\nvar http = require(\"http\");\n\nvar https = require(\"https\");\n\nvar url = require(\"url\");\n\nvar fileUriRegex = /^file:\\/\\/\\/[a-zA-Z]:\\//;\n\nfunction parseUrl(sourceUrl) {\n var parsedUrl = url.parse(sourceUrl);\n\n if (parsedUrl.protocol === \"file:\" || parsedUrl.host) {\n return parsedUrl;\n }\n\n if (/^[a-z]:[/\\\\]/i.test(sourceUrl)) {\n return url.parse(\"file:///\".concat(sourceUrl));\n }\n\n if (!parsedUrl.host) {\n parsedUrl.protocol = \"file:\";\n }\n\n return parsedUrl;\n}\n\nvar PDFNodeStream = /*#__PURE__*/function () {\n function PDFNodeStream(source) {\n _classCallCheck(this, PDFNodeStream);\n\n this.source = source;\n this.url = parseUrl(source.url);\n this.isHttp = this.url.protocol === \"http:\" || this.url.protocol === \"https:\";\n this.isFsUrl = this.url.protocol === \"file:\";\n this.httpHeaders = this.isHttp && source.httpHeaders || {};\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n\n _createClass(PDFNodeStream, [{\n key: \"_progressiveDataLength\",\n get: function get() {\n var _this$_fullRequestRea, _this$_fullRequestRea2;\n\n return (_this$_fullRequestRea = (_this$_fullRequestRea2 = this._fullRequestReader) === null || _this$_fullRequestRea2 === void 0 ? void 0 : _this$_fullRequestRea2._loaded) !== null && _this$_fullRequestRea !== void 0 ? _this$_fullRequestRea : 0;\n }\n }, {\n key: \"getFullReader\",\n value: function getFullReader() {\n (0, _util.assert)(!this._fullRequestReader, \"PDFNodeStream.getFullReader can only be called once.\");\n this._fullRequestReader = this.isFsUrl ? new PDFNodeStreamFsFullReader(this) : new PDFNodeStreamFullReader(this);\n return this._fullRequestReader;\n }\n }, {\n key: \"getRangeReader\",\n value: function getRangeReader(start, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n\n var rangeReader = this.isFsUrl ? new PDFNodeStreamFsRangeReader(this, start, end) : new PDFNodeStreamRangeReader(this, start, end);\n\n this._rangeRequestReaders.push(rangeReader);\n\n return rangeReader;\n }\n }, {\n key: \"cancelAllRequests\",\n value: function cancelAllRequests(reason) {\n if (this._fullRequestReader) {\n this._fullRequestReader.cancel(reason);\n }\n\n var _iterator = _createForOfIteratorHelper(this._rangeRequestReaders.slice(0)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var reader = _step.value;\n reader.cancel(reason);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }]);\n\n return PDFNodeStream;\n}();\n\nexports.PDFNodeStream = PDFNodeStream;\n\nvar BaseFullReader = /*#__PURE__*/function () {\n function BaseFullReader(stream) {\n _classCallCheck(this, BaseFullReader);\n\n this._url = stream.url;\n this._done = false;\n this._storedError = null;\n this.onProgress = null;\n var source = stream.source;\n this._contentLength = source.length;\n this._loaded = 0;\n this._filename = null;\n this._disableRange = source.disableRange || false;\n this._rangeChunkSize = source.rangeChunkSize;\n\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n\n this._isStreamingSupported = !source.disableStream;\n this._isRangeSupported = !source.disableRange;\n this._readableStream = null;\n this._readCapability = (0, _util.createPromiseCapability)();\n this._headersCapability = (0, _util.createPromiseCapability)();\n }\n\n _createClass(BaseFullReader, [{\n key: \"headersReady\",\n get: function get() {\n return this._headersCapability.promise;\n }\n }, {\n key: \"filename\",\n get: function get() {\n return this._filename;\n }\n }, {\n key: \"contentLength\",\n get: function get() {\n return this._contentLength;\n }\n }, {\n key: \"isRangeSupported\",\n get: function get() {\n return this._isRangeSupported;\n }\n }, {\n key: \"isStreamingSupported\",\n get: function get() {\n return this._isStreamingSupported;\n }\n }, {\n key: \"read\",\n value: function () {\n var _read = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee() {\n var chunk, buffer;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this._readCapability.promise;\n\n case 2:\n if (!this._done) {\n _context.next = 4;\n break;\n }\n\n return _context.abrupt(\"return\", {\n value: undefined,\n done: true\n });\n\n case 4:\n if (!this._storedError) {\n _context.next = 6;\n break;\n }\n\n throw this._storedError;\n\n case 6:\n chunk = this._readableStream.read();\n\n if (!(chunk === null)) {\n _context.next = 10;\n break;\n }\n\n this._readCapability = (0, _util.createPromiseCapability)();\n return _context.abrupt(\"return\", this.read());\n\n case 10:\n this._loaded += chunk.length;\n\n if (this.onProgress) {\n this.onProgress({\n loaded: this._loaded,\n total: this._contentLength\n });\n }\n\n buffer = new Uint8Array(chunk).buffer;\n return _context.abrupt(\"return\", {\n value: buffer,\n done: false\n });\n\n case 14:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function read() {\n return _read.apply(this, arguments);\n }\n\n return read;\n }()\n }, {\n key: \"cancel\",\n value: function cancel(reason) {\n if (!this._readableStream) {\n this._error(reason);\n\n return;\n }\n\n this._readableStream.destroy(reason);\n }\n }, {\n key: \"_error\",\n value: function _error(reason) {\n this._storedError = reason;\n\n this._readCapability.resolve();\n }\n }, {\n key: \"_setReadableStream\",\n value: function _setReadableStream(readableStream) {\n var _this = this;\n\n this._readableStream = readableStream;\n readableStream.on(\"readable\", function () {\n _this._readCapability.resolve();\n });\n readableStream.on(\"end\", function () {\n readableStream.destroy();\n _this._done = true;\n\n _this._readCapability.resolve();\n });\n readableStream.on(\"error\", function (reason) {\n _this._error(reason);\n });\n\n if (!this._isStreamingSupported && this._isRangeSupported) {\n this._error(new _util.AbortException(\"streaming is disabled\"));\n }\n\n if (this._storedError) {\n this._readableStream.destroy(this._storedError);\n }\n }\n }]);\n\n return BaseFullReader;\n}();\n\nvar BaseRangeReader = /*#__PURE__*/function () {\n function BaseRangeReader(stream) {\n _classCallCheck(this, BaseRangeReader);\n\n this._url = stream.url;\n this._done = false;\n this._storedError = null;\n this.onProgress = null;\n this._loaded = 0;\n this._readableStream = null;\n this._readCapability = (0, _util.createPromiseCapability)();\n var source = stream.source;\n this._isStreamingSupported = !source.disableStream;\n }\n\n _createClass(BaseRangeReader, [{\n key: \"isStreamingSupported\",\n get: function get() {\n return this._isStreamingSupported;\n }\n }, {\n key: \"read\",\n value: function () {\n var _read2 = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2() {\n var chunk, buffer;\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this._readCapability.promise;\n\n case 2:\n if (!this._done) {\n _context2.next = 4;\n break;\n }\n\n return _context2.abrupt(\"return\", {\n value: undefined,\n done: true\n });\n\n case 4:\n if (!this._storedError) {\n _context2.next = 6;\n break;\n }\n\n throw this._storedError;\n\n case 6:\n chunk = this._readableStream.read();\n\n if (!(chunk === null)) {\n _context2.next = 10;\n break;\n }\n\n this._readCapability = (0, _util.createPromiseCapability)();\n return _context2.abrupt(\"return\", this.read());\n\n case 10:\n this._loaded += chunk.length;\n\n if (this.onProgress) {\n this.onProgress({\n loaded: this._loaded\n });\n }\n\n buffer = new Uint8Array(chunk).buffer;\n return _context2.abrupt(\"return\", {\n value: buffer,\n done: false\n });\n\n case 14:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function read() {\n return _read2.apply(this, arguments);\n }\n\n return read;\n }()\n }, {\n key: \"cancel\",\n value: function cancel(reason) {\n if (!this._readableStream) {\n this._error(reason);\n\n return;\n }\n\n this._readableStream.destroy(reason);\n }\n }, {\n key: \"_error\",\n value: function _error(reason) {\n this._storedError = reason;\n\n this._readCapability.resolve();\n }\n }, {\n key: \"_setReadableStream\",\n value: function _setReadableStream(readableStream) {\n var _this2 = this;\n\n this._readableStream = readableStream;\n readableStream.on(\"readable\", function () {\n _this2._readCapability.resolve();\n });\n readableStream.on(\"end\", function () {\n readableStream.destroy();\n _this2._done = true;\n\n _this2._readCapability.resolve();\n });\n readableStream.on(\"error\", function (reason) {\n _this2._error(reason);\n });\n\n if (this._storedError) {\n this._readableStream.destroy(this._storedError);\n }\n }\n }]);\n\n return BaseRangeReader;\n}();\n\nfunction createRequestOptions(parsedUrl, headers) {\n return {\n protocol: parsedUrl.protocol,\n auth: parsedUrl.auth,\n host: parsedUrl.hostname,\n port: parsedUrl.port,\n path: parsedUrl.path,\n method: \"GET\",\n headers: headers\n };\n}\n\nvar PDFNodeStreamFullReader = /*#__PURE__*/function (_BaseFullReader) {\n _inherits(PDFNodeStreamFullReader, _BaseFullReader);\n\n var _super = _createSuper(PDFNodeStreamFullReader);\n\n function PDFNodeStreamFullReader(stream) {\n var _this3;\n\n _classCallCheck(this, PDFNodeStreamFullReader);\n\n _this3 = _super.call(this, stream);\n\n var handleResponse = function handleResponse(response) {\n if (response.statusCode === 404) {\n var error = new _util.MissingPDFException(\"Missing PDF \\\"\".concat(_this3._url, \"\\\".\"));\n _this3._storedError = error;\n\n _this3._headersCapability.reject(error);\n\n return;\n }\n\n _this3._headersCapability.resolve();\n\n _this3._setReadableStream(response);\n\n var getResponseHeader = function getResponseHeader(name) {\n return _this3._readableStream.headers[name.toLowerCase()];\n };\n\n var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({\n getResponseHeader: getResponseHeader,\n isHttp: stream.isHttp,\n rangeChunkSize: _this3._rangeChunkSize,\n disableRange: _this3._disableRange\n }),\n allowRangeRequests = _validateRangeRequest.allowRangeRequests,\n suggestedLength = _validateRangeRequest.suggestedLength;\n\n _this3._isRangeSupported = allowRangeRequests;\n _this3._contentLength = suggestedLength || _this3._contentLength;\n _this3._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);\n };\n\n _this3._request = null;\n\n if (_this3._url.protocol === \"http:\") {\n _this3._request = http.request(createRequestOptions(_this3._url, stream.httpHeaders), handleResponse);\n } else {\n _this3._request = https.request(createRequestOptions(_this3._url, stream.httpHeaders), handleResponse);\n }\n\n _this3._request.on(\"error\", function (reason) {\n _this3._storedError = reason;\n\n _this3._headersCapability.reject(reason);\n });\n\n _this3._request.end();\n\n return _this3;\n }\n\n return _createClass(PDFNodeStreamFullReader);\n}(BaseFullReader);\n\nvar PDFNodeStreamRangeReader = /*#__PURE__*/function (_BaseRangeReader) {\n _inherits(PDFNodeStreamRangeReader, _BaseRangeReader);\n\n var _super2 = _createSuper(PDFNodeStreamRangeReader);\n\n function PDFNodeStreamRangeReader(stream, start, end) {\n var _this4;\n\n _classCallCheck(this, PDFNodeStreamRangeReader);\n\n _this4 = _super2.call(this, stream);\n _this4._httpHeaders = {};\n\n for (var property in stream.httpHeaders) {\n var value = stream.httpHeaders[property];\n\n if (typeof value === \"undefined\") {\n continue;\n }\n\n _this4._httpHeaders[property] = value;\n }\n\n _this4._httpHeaders.Range = \"bytes=\".concat(start, \"-\").concat(end - 1);\n\n var handleResponse = function handleResponse(response) {\n if (response.statusCode === 404) {\n var error = new _util.MissingPDFException(\"Missing PDF \\\"\".concat(_this4._url, \"\\\".\"));\n _this4._storedError = error;\n return;\n }\n\n _this4._setReadableStream(response);\n };\n\n _this4._request = null;\n\n if (_this4._url.protocol === \"http:\") {\n _this4._request = http.request(createRequestOptions(_this4._url, _this4._httpHeaders), handleResponse);\n } else {\n _this4._request = https.request(createRequestOptions(_this4._url, _this4._httpHeaders), handleResponse);\n }\n\n _this4._request.on(\"error\", function (reason) {\n _this4._storedError = reason;\n });\n\n _this4._request.end();\n\n return _this4;\n }\n\n return _createClass(PDFNodeStreamRangeReader);\n}(BaseRangeReader);\n\nvar PDFNodeStreamFsFullReader = /*#__PURE__*/function (_BaseFullReader2) {\n _inherits(PDFNodeStreamFsFullReader, _BaseFullReader2);\n\n var _super3 = _createSuper(PDFNodeStreamFsFullReader);\n\n function PDFNodeStreamFsFullReader(stream) {\n var _this5;\n\n _classCallCheck(this, PDFNodeStreamFsFullReader);\n\n _this5 = _super3.call(this, stream);\n var path = decodeURIComponent(_this5._url.path);\n\n if (fileUriRegex.test(_this5._url.href)) {\n path = path.replace(/^\\//, \"\");\n }\n\n fs.lstat(path, function (error, stat) {\n if (error) {\n if (error.code === \"ENOENT\") {\n error = new _util.MissingPDFException(\"Missing PDF \\\"\".concat(path, \"\\\".\"));\n }\n\n _this5._storedError = error;\n\n _this5._headersCapability.reject(error);\n\n return;\n }\n\n _this5._contentLength = stat.size;\n\n _this5._setReadableStream(fs.createReadStream(path));\n\n _this5._headersCapability.resolve();\n });\n return _this5;\n }\n\n return _createClass(PDFNodeStreamFsFullReader);\n}(BaseFullReader);\n\nvar PDFNodeStreamFsRangeReader = /*#__PURE__*/function (_BaseRangeReader2) {\n _inherits(PDFNodeStreamFsRangeReader, _BaseRangeReader2);\n\n var _super4 = _createSuper(PDFNodeStreamFsRangeReader);\n\n function PDFNodeStreamFsRangeReader(stream, start, end) {\n var _this6;\n\n _classCallCheck(this, PDFNodeStreamFsRangeReader);\n\n _this6 = _super4.call(this, stream);\n var path = decodeURIComponent(_this6._url.path);\n\n if (fileUriRegex.test(_this6._url.href)) {\n path = path.replace(/^\\//, \"\");\n }\n\n _this6._setReadableStream(fs.createReadStream(path, {\n start: start,\n end: end - 1\n }));\n\n return _this6;\n }\n\n return _createClass(PDFNodeStreamFsRangeReader);\n}(BaseRangeReader);\n\n/***/ }),\n/* 179 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.createResponseStatusError = createResponseStatusError;\nexports.extractFilenameFromHeader = extractFilenameFromHeader;\nexports.validateRangeRequestCapabilities = validateRangeRequestCapabilities;\nexports.validateResponseStatus = validateResponseStatus;\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _content_disposition = __w_pdfjs_require__(180);\n\nvar _display_utils = __w_pdfjs_require__(158);\n\nfunction validateRangeRequestCapabilities(_ref) {\n var getResponseHeader = _ref.getResponseHeader,\n isHttp = _ref.isHttp,\n rangeChunkSize = _ref.rangeChunkSize,\n disableRange = _ref.disableRange;\n var returnValues = {\n allowRangeRequests: false,\n suggestedLength: undefined\n };\n var length = parseInt(getResponseHeader(\"Content-Length\"), 10);\n\n if (!Number.isInteger(length)) {\n return returnValues;\n }\n\n returnValues.suggestedLength = length;\n\n if (length <= 2 * rangeChunkSize) {\n return returnValues;\n }\n\n if (disableRange || !isHttp) {\n return returnValues;\n }\n\n if (getResponseHeader(\"Accept-Ranges\") !== \"bytes\") {\n return returnValues;\n }\n\n var contentEncoding = getResponseHeader(\"Content-Encoding\") || \"identity\";\n\n if (contentEncoding !== \"identity\") {\n return returnValues;\n }\n\n returnValues.allowRangeRequests = true;\n return returnValues;\n}\n\nfunction extractFilenameFromHeader(getResponseHeader) {\n var contentDisposition = getResponseHeader(\"Content-Disposition\");\n\n if (contentDisposition) {\n var filename = (0, _content_disposition.getFilenameFromContentDispositionHeader)(contentDisposition);\n\n if (filename.includes(\"%\")) {\n try {\n filename = decodeURIComponent(filename);\n } catch (ex) {}\n }\n\n if ((0, _display_utils.isPdfFile)(filename)) {\n return filename;\n }\n }\n\n return null;\n}\n\nfunction createResponseStatusError(status, url) {\n if (status === 404 || status === 0 && url.startsWith(\"file:\")) {\n return new _util.MissingPDFException('Missing PDF \"' + url + '\".');\n }\n\n return new _util.UnexpectedResponseException(\"Unexpected server response (\".concat(status, \") while retrieving PDF \\\"\").concat(url, \"\\\".\"), status);\n}\n\nfunction validateResponseStatus(status) {\n return status === 200 || status === 206;\n}\n\n/***/ }),\n/* 180 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.getFilenameFromContentDispositionHeader = getFilenameFromContentDispositionHeader;\n\nvar _util = __w_pdfjs_require__(1);\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction getFilenameFromContentDispositionHeader(contentDisposition) {\n var needsEncodingFixup = true;\n var tmp = toParamRegExp(\"filename\\\\*\", \"i\").exec(contentDisposition);\n\n if (tmp) {\n tmp = tmp[1];\n var filename = rfc2616unquote(tmp);\n filename = unescape(filename);\n filename = rfc5987decode(filename);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n\n tmp = rfc2231getparam(contentDisposition);\n\n if (tmp) {\n var _filename = rfc2047decode(tmp);\n\n return fixupEncoding(_filename);\n }\n\n tmp = toParamRegExp(\"filename\", \"i\").exec(contentDisposition);\n\n if (tmp) {\n tmp = tmp[1];\n\n var _filename2 = rfc2616unquote(tmp);\n\n _filename2 = rfc2047decode(_filename2);\n return fixupEncoding(_filename2);\n }\n\n function toParamRegExp(attributePattern, flags) {\n return new RegExp(\"(?:^|;)\\\\s*\" + attributePattern + \"\\\\s*=\\\\s*\" + \"(\" + '[^\";\\\\s][^;\\\\s]*' + \"|\" + '\"(?:[^\"\\\\\\\\]|\\\\\\\\\"?)+\"?' + \")\", flags);\n }\n\n function textdecode(encoding, value) {\n if (encoding) {\n if (!/^[\\x00-\\xFF]+$/.test(value)) {\n return value;\n }\n\n try {\n var decoder = new TextDecoder(encoding, {\n fatal: true\n });\n var buffer = (0, _util.stringToBytes)(value);\n value = decoder.decode(buffer);\n needsEncodingFixup = false;\n } catch (e) {}\n }\n\n return value;\n }\n\n function fixupEncoding(value) {\n if (needsEncodingFixup && /[\\x80-\\xff]/.test(value)) {\n value = textdecode(\"utf-8\", value);\n\n if (needsEncodingFixup) {\n value = textdecode(\"iso-8859-1\", value);\n }\n }\n\n return value;\n }\n\n function rfc2231getparam(contentDispositionStr) {\n var matches = [];\n var match;\n var iter = toParamRegExp(\"filename\\\\*((?!0\\\\d)\\\\d+)(\\\\*?)\", \"ig\");\n\n while ((match = iter.exec(contentDispositionStr)) !== null) {\n var _match = match,\n _match2 = _slicedToArray(_match, 4),\n n = _match2[1],\n quot = _match2[2],\n part = _match2[3];\n\n n = parseInt(n, 10);\n\n if (n in matches) {\n if (n === 0) {\n break;\n }\n\n continue;\n }\n\n matches[n] = [quot, part];\n }\n\n var parts = [];\n\n for (var _n2 = 0; _n2 < matches.length; ++_n2) {\n if (!(_n2 in matches)) {\n break;\n }\n\n var _matches$_n = _slicedToArray(matches[_n2], 2),\n _quot = _matches$_n[0],\n _part = _matches$_n[1];\n\n _part = rfc2616unquote(_part);\n\n if (_quot) {\n _part = unescape(_part);\n\n if (_n2 === 0) {\n _part = rfc5987decode(_part);\n }\n }\n\n parts.push(_part);\n }\n\n return parts.join(\"\");\n }\n\n function rfc2616unquote(value) {\n if (value.startsWith('\"')) {\n var parts = value.slice(1).split('\\\\\"');\n\n for (var i = 0; i < parts.length; ++i) {\n var quotindex = parts[i].indexOf('\"');\n\n if (quotindex !== -1) {\n parts[i] = parts[i].slice(0, quotindex);\n parts.length = i + 1;\n }\n\n parts[i] = parts[i].replace(/\\\\(.)/g, \"$1\");\n }\n\n value = parts.join('\"');\n }\n\n return value;\n }\n\n function rfc5987decode(extvalue) {\n var encodingend = extvalue.indexOf(\"'\");\n\n if (encodingend === -1) {\n return extvalue;\n }\n\n var encoding = extvalue.slice(0, encodingend);\n var langvalue = extvalue.slice(encodingend + 1);\n var value = langvalue.replace(/^[^']*'/, \"\");\n return textdecode(encoding, value);\n }\n\n function rfc2047decode(value) {\n if (!value.startsWith(\"=?\") || /[\\x00-\\x19\\x80-\\xff]/.test(value)) {\n return value;\n }\n\n return value.replace(/=\\?([\\w-]*)\\?([QqBb])\\?((?:[^?]|\\?(?!=))*)\\?=/g, function (matches, charset, encoding, text) {\n if (encoding === \"q\" || encoding === \"Q\") {\n text = text.replace(/_/g, \" \");\n text = text.replace(/=([0-9a-fA-F]{2})/g, function (match, hex) {\n return String.fromCharCode(parseInt(hex, 16));\n });\n return textdecode(charset, text);\n }\n\n try {\n text = atob(text);\n } catch (e) {}\n\n return textdecode(charset, text);\n });\n }\n\n return \"\";\n}\n\n/***/ }),\n/* 181 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PDFNetworkStream = void 0;\n\nvar _regenerator = _interopRequireDefault(__w_pdfjs_require__(156));\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _network_utils = __w_pdfjs_require__(179);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n;\nvar OK_RESPONSE = 200;\nvar PARTIAL_CONTENT_RESPONSE = 206;\n\nfunction getArrayBuffer(xhr) {\n var data = xhr.response;\n\n if (typeof data !== \"string\") {\n return data;\n }\n\n var array = (0, _util.stringToBytes)(data);\n return array.buffer;\n}\n\nvar NetworkManager = /*#__PURE__*/function () {\n function NetworkManager(url) {\n var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, NetworkManager);\n\n this.url = url;\n this.isHttp = /^https?:/i.test(url);\n this.httpHeaders = this.isHttp && args.httpHeaders || Object.create(null);\n this.withCredentials = args.withCredentials || false;\n\n this.getXhr = args.getXhr || function NetworkManager_getXhr() {\n return new XMLHttpRequest();\n };\n\n this.currXhrId = 0;\n this.pendingRequests = Object.create(null);\n }\n\n _createClass(NetworkManager, [{\n key: \"requestRange\",\n value: function requestRange(begin, end, listeners) {\n var args = {\n begin: begin,\n end: end\n };\n\n for (var prop in listeners) {\n args[prop] = listeners[prop];\n }\n\n return this.request(args);\n }\n }, {\n key: \"requestFull\",\n value: function requestFull(listeners) {\n return this.request(listeners);\n }\n }, {\n key: \"request\",\n value: function request(args) {\n var xhr = this.getXhr();\n var xhrId = this.currXhrId++;\n var pendingRequest = this.pendingRequests[xhrId] = {\n xhr: xhr\n };\n xhr.open(\"GET\", this.url);\n xhr.withCredentials = this.withCredentials;\n\n for (var property in this.httpHeaders) {\n var value = this.httpHeaders[property];\n\n if (typeof value === \"undefined\") {\n continue;\n }\n\n xhr.setRequestHeader(property, value);\n }\n\n if (this.isHttp && \"begin\" in args && \"end\" in args) {\n xhr.setRequestHeader(\"Range\", \"bytes=\".concat(args.begin, \"-\").concat(args.end - 1));\n pendingRequest.expectedStatus = PARTIAL_CONTENT_RESPONSE;\n } else {\n pendingRequest.expectedStatus = OK_RESPONSE;\n }\n\n xhr.responseType = \"arraybuffer\";\n\n if (args.onError) {\n xhr.onerror = function (evt) {\n args.onError(xhr.status);\n };\n }\n\n xhr.onreadystatechange = this.onStateChange.bind(this, xhrId);\n xhr.onprogress = this.onProgress.bind(this, xhrId);\n pendingRequest.onHeadersReceived = args.onHeadersReceived;\n pendingRequest.onDone = args.onDone;\n pendingRequest.onError = args.onError;\n pendingRequest.onProgress = args.onProgress;\n xhr.send(null);\n return xhrId;\n }\n }, {\n key: \"onProgress\",\n value: function onProgress(xhrId, evt) {\n var _pendingRequest$onPro;\n\n var pendingRequest = this.pendingRequests[xhrId];\n\n if (!pendingRequest) {\n return;\n }\n\n (_pendingRequest$onPro = pendingRequest.onProgress) === null || _pendingRequest$onPro === void 0 ? void 0 : _pendingRequest$onPro.call(pendingRequest, evt);\n }\n }, {\n key: \"onStateChange\",\n value: function onStateChange(xhrId, evt) {\n var pendingRequest = this.pendingRequests[xhrId];\n\n if (!pendingRequest) {\n return;\n }\n\n var xhr = pendingRequest.xhr;\n\n if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) {\n pendingRequest.onHeadersReceived();\n delete pendingRequest.onHeadersReceived;\n }\n\n if (xhr.readyState !== 4) {\n return;\n }\n\n if (!(xhrId in this.pendingRequests)) {\n return;\n }\n\n delete this.pendingRequests[xhrId];\n\n if (xhr.status === 0 && this.isHttp) {\n var _pendingRequest$onErr;\n\n (_pendingRequest$onErr = pendingRequest.onError) === null || _pendingRequest$onErr === void 0 ? void 0 : _pendingRequest$onErr.call(pendingRequest, xhr.status);\n return;\n }\n\n var xhrStatus = xhr.status || OK_RESPONSE;\n var ok_response_on_range_request = xhrStatus === OK_RESPONSE && pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE;\n\n if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) {\n var _pendingRequest$onErr2;\n\n (_pendingRequest$onErr2 = pendingRequest.onError) === null || _pendingRequest$onErr2 === void 0 ? void 0 : _pendingRequest$onErr2.call(pendingRequest, xhr.status);\n return;\n }\n\n var chunk = getArrayBuffer(xhr);\n\n if (xhrStatus === PARTIAL_CONTENT_RESPONSE) {\n var rangeHeader = xhr.getResponseHeader(\"Content-Range\");\n var matches = /bytes (\\d+)-(\\d+)\\/(\\d+)/.exec(rangeHeader);\n pendingRequest.onDone({\n begin: parseInt(matches[1], 10),\n chunk: chunk\n });\n } else if (chunk) {\n pendingRequest.onDone({\n begin: 0,\n chunk: chunk\n });\n } else {\n var _pendingRequest$onErr3;\n\n (_pendingRequest$onErr3 = pendingRequest.onError) === null || _pendingRequest$onErr3 === void 0 ? void 0 : _pendingRequest$onErr3.call(pendingRequest, xhr.status);\n }\n }\n }, {\n key: \"getRequestXhr\",\n value: function getRequestXhr(xhrId) {\n return this.pendingRequests[xhrId].xhr;\n }\n }, {\n key: \"isPendingRequest\",\n value: function isPendingRequest(xhrId) {\n return xhrId in this.pendingRequests;\n }\n }, {\n key: \"abortRequest\",\n value: function abortRequest(xhrId) {\n var xhr = this.pendingRequests[xhrId].xhr;\n delete this.pendingRequests[xhrId];\n xhr.abort();\n }\n }]);\n\n return NetworkManager;\n}();\n\nvar PDFNetworkStream = /*#__PURE__*/function () {\n function PDFNetworkStream(source) {\n _classCallCheck(this, PDFNetworkStream);\n\n this._source = source;\n this._manager = new NetworkManager(source.url, {\n httpHeaders: source.httpHeaders,\n withCredentials: source.withCredentials\n });\n this._rangeChunkSize = source.rangeChunkSize;\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n\n _createClass(PDFNetworkStream, [{\n key: \"_onRangeRequestReaderClosed\",\n value: function _onRangeRequestReaderClosed(reader) {\n var i = this._rangeRequestReaders.indexOf(reader);\n\n if (i >= 0) {\n this._rangeRequestReaders.splice(i, 1);\n }\n }\n }, {\n key: \"getFullReader\",\n value: function getFullReader() {\n (0, _util.assert)(!this._fullRequestReader, \"PDFNetworkStream.getFullReader can only be called once.\");\n this._fullRequestReader = new PDFNetworkStreamFullRequestReader(this._manager, this._source);\n return this._fullRequestReader;\n }\n }, {\n key: \"getRangeReader\",\n value: function getRangeReader(begin, end) {\n var reader = new PDFNetworkStreamRangeRequestReader(this._manager, begin, end);\n reader.onClosed = this._onRangeRequestReaderClosed.bind(this);\n\n this._rangeRequestReaders.push(reader);\n\n return reader;\n }\n }, {\n key: \"cancelAllRequests\",\n value: function cancelAllRequests(reason) {\n var _this$_fullRequestRea;\n\n (_this$_fullRequestRea = this._fullRequestReader) === null || _this$_fullRequestRea === void 0 ? void 0 : _this$_fullRequestRea.cancel(reason);\n\n var _iterator = _createForOfIteratorHelper(this._rangeRequestReaders.slice(0)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var reader = _step.value;\n reader.cancel(reason);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }]);\n\n return PDFNetworkStream;\n}();\n\nexports.PDFNetworkStream = PDFNetworkStream;\n\nvar PDFNetworkStreamFullRequestReader = /*#__PURE__*/function () {\n function PDFNetworkStreamFullRequestReader(manager, source) {\n _classCallCheck(this, PDFNetworkStreamFullRequestReader);\n\n this._manager = manager;\n var args = {\n onHeadersReceived: this._onHeadersReceived.bind(this),\n onDone: this._onDone.bind(this),\n onError: this._onError.bind(this),\n onProgress: this._onProgress.bind(this)\n };\n this._url = source.url;\n this._fullRequestId = manager.requestFull(args);\n this._headersReceivedCapability = (0, _util.createPromiseCapability)();\n this._disableRange = source.disableRange || false;\n this._contentLength = source.length;\n this._rangeChunkSize = source.rangeChunkSize;\n\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n\n this._isStreamingSupported = false;\n this._isRangeSupported = false;\n this._cachedChunks = [];\n this._requests = [];\n this._done = false;\n this._storedError = undefined;\n this._filename = null;\n this.onProgress = null;\n }\n\n _createClass(PDFNetworkStreamFullRequestReader, [{\n key: \"_onHeadersReceived\",\n value: function _onHeadersReceived() {\n var fullRequestXhrId = this._fullRequestId;\n\n var fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId);\n\n var getResponseHeader = function getResponseHeader(name) {\n return fullRequestXhr.getResponseHeader(name);\n };\n\n var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({\n getResponseHeader: getResponseHeader,\n isHttp: this._manager.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange\n }),\n allowRangeRequests = _validateRangeRequest.allowRangeRequests,\n suggestedLength = _validateRangeRequest.suggestedLength;\n\n if (allowRangeRequests) {\n this._isRangeSupported = true;\n }\n\n this._contentLength = suggestedLength || this._contentLength;\n this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);\n\n if (this._isRangeSupported) {\n this._manager.abortRequest(fullRequestXhrId);\n }\n\n this._headersReceivedCapability.resolve();\n }\n }, {\n key: \"_onDone\",\n value: function _onDone(data) {\n if (data) {\n if (this._requests.length > 0) {\n var requestCapability = this._requests.shift();\n\n requestCapability.resolve({\n value: data.chunk,\n done: false\n });\n } else {\n this._cachedChunks.push(data.chunk);\n }\n }\n\n this._done = true;\n\n if (this._cachedChunks.length > 0) {\n return;\n }\n\n var _iterator2 = _createForOfIteratorHelper(this._requests),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _requestCapability = _step2.value;\n\n _requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n this._requests.length = 0;\n }\n }, {\n key: \"_onError\",\n value: function _onError(status) {\n this._storedError = (0, _network_utils.createResponseStatusError)(status, this._url);\n\n this._headersReceivedCapability.reject(this._storedError);\n\n var _iterator3 = _createForOfIteratorHelper(this._requests),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var requestCapability = _step3.value;\n requestCapability.reject(this._storedError);\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n this._requests.length = 0;\n this._cachedChunks.length = 0;\n }\n }, {\n key: \"_onProgress\",\n value: function _onProgress(evt) {\n var _this$onProgress;\n\n (_this$onProgress = this.onProgress) === null || _this$onProgress === void 0 ? void 0 : _this$onProgress.call(this, {\n loaded: evt.loaded,\n total: evt.lengthComputable ? evt.total : this._contentLength\n });\n }\n }, {\n key: \"filename\",\n get: function get() {\n return this._filename;\n }\n }, {\n key: \"isRangeSupported\",\n get: function get() {\n return this._isRangeSupported;\n }\n }, {\n key: \"isStreamingSupported\",\n get: function get() {\n return this._isStreamingSupported;\n }\n }, {\n key: \"contentLength\",\n get: function get() {\n return this._contentLength;\n }\n }, {\n key: \"headersReady\",\n get: function get() {\n return this._headersReceivedCapability.promise;\n }\n }, {\n key: \"read\",\n value: function () {\n var _read = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee() {\n var chunk, requestCapability;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!this._storedError) {\n _context.next = 2;\n break;\n }\n\n throw this._storedError;\n\n case 2:\n if (!(this._cachedChunks.length > 0)) {\n _context.next = 5;\n break;\n }\n\n chunk = this._cachedChunks.shift();\n return _context.abrupt(\"return\", {\n value: chunk,\n done: false\n });\n\n case 5:\n if (!this._done) {\n _context.next = 7;\n break;\n }\n\n return _context.abrupt(\"return\", {\n value: undefined,\n done: true\n });\n\n case 7:\n requestCapability = (0, _util.createPromiseCapability)();\n\n this._requests.push(requestCapability);\n\n return _context.abrupt(\"return\", requestCapability.promise);\n\n case 10:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function read() {\n return _read.apply(this, arguments);\n }\n\n return read;\n }()\n }, {\n key: \"cancel\",\n value: function cancel(reason) {\n this._done = true;\n\n this._headersReceivedCapability.reject(reason);\n\n var _iterator4 = _createForOfIteratorHelper(this._requests),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var requestCapability = _step4.value;\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n this._requests.length = 0;\n\n if (this._manager.isPendingRequest(this._fullRequestId)) {\n this._manager.abortRequest(this._fullRequestId);\n }\n\n this._fullRequestReader = null;\n }\n }]);\n\n return PDFNetworkStreamFullRequestReader;\n}();\n\nvar PDFNetworkStreamRangeRequestReader = /*#__PURE__*/function () {\n function PDFNetworkStreamRangeRequestReader(manager, begin, end) {\n _classCallCheck(this, PDFNetworkStreamRangeRequestReader);\n\n this._manager = manager;\n var args = {\n onDone: this._onDone.bind(this),\n onError: this._onError.bind(this),\n onProgress: this._onProgress.bind(this)\n };\n this._url = manager.url;\n this._requestId = manager.requestRange(begin, end, args);\n this._requests = [];\n this._queuedChunk = null;\n this._done = false;\n this._storedError = undefined;\n this.onProgress = null;\n this.onClosed = null;\n }\n\n _createClass(PDFNetworkStreamRangeRequestReader, [{\n key: \"_close\",\n value: function _close() {\n var _this$onClosed;\n\n (_this$onClosed = this.onClosed) === null || _this$onClosed === void 0 ? void 0 : _this$onClosed.call(this, this);\n }\n }, {\n key: \"_onDone\",\n value: function _onDone(data) {\n var chunk = data.chunk;\n\n if (this._requests.length > 0) {\n var requestCapability = this._requests.shift();\n\n requestCapability.resolve({\n value: chunk,\n done: false\n });\n } else {\n this._queuedChunk = chunk;\n }\n\n this._done = true;\n\n var _iterator5 = _createForOfIteratorHelper(this._requests),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var _requestCapability2 = _step5.value;\n\n _requestCapability2.resolve({\n value: undefined,\n done: true\n });\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n this._requests.length = 0;\n\n this._close();\n }\n }, {\n key: \"_onError\",\n value: function _onError(status) {\n this._storedError = (0, _network_utils.createResponseStatusError)(status, this._url);\n\n var _iterator6 = _createForOfIteratorHelper(this._requests),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var requestCapability = _step6.value;\n requestCapability.reject(this._storedError);\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n this._requests.length = 0;\n this._queuedChunk = null;\n }\n }, {\n key: \"_onProgress\",\n value: function _onProgress(evt) {\n if (!this.isStreamingSupported) {\n var _this$onProgress2;\n\n (_this$onProgress2 = this.onProgress) === null || _this$onProgress2 === void 0 ? void 0 : _this$onProgress2.call(this, {\n loaded: evt.loaded\n });\n }\n }\n }, {\n key: \"isStreamingSupported\",\n get: function get() {\n return false;\n }\n }, {\n key: \"read\",\n value: function () {\n var _read2 = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2() {\n var chunk, requestCapability;\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!this._storedError) {\n _context2.next = 2;\n break;\n }\n\n throw this._storedError;\n\n case 2:\n if (!(this._queuedChunk !== null)) {\n _context2.next = 6;\n break;\n }\n\n chunk = this._queuedChunk;\n this._queuedChunk = null;\n return _context2.abrupt(\"return\", {\n value: chunk,\n done: false\n });\n\n case 6:\n if (!this._done) {\n _context2.next = 8;\n break;\n }\n\n return _context2.abrupt(\"return\", {\n value: undefined,\n done: true\n });\n\n case 8:\n requestCapability = (0, _util.createPromiseCapability)();\n\n this._requests.push(requestCapability);\n\n return _context2.abrupt(\"return\", requestCapability.promise);\n\n case 11:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function read() {\n return _read2.apply(this, arguments);\n }\n\n return read;\n }()\n }, {\n key: \"cancel\",\n value: function cancel(reason) {\n this._done = true;\n\n var _iterator7 = _createForOfIteratorHelper(this._requests),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var requestCapability = _step7.value;\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n\n this._requests.length = 0;\n\n if (this._manager.isPendingRequest(this._requestId)) {\n this._manager.abortRequest(this._requestId);\n }\n\n this._close();\n }\n }]);\n\n return PDFNetworkStreamRangeRequestReader;\n}();\n\n/***/ }),\n/* 182 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PDFFetchStream = void 0;\n\nvar _regenerator = _interopRequireDefault(__w_pdfjs_require__(156));\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _network_utils = __w_pdfjs_require__(179);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n;\n\nfunction createFetchOptions(headers, withCredentials, abortController) {\n return {\n method: \"GET\",\n headers: headers,\n signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal,\n mode: \"cors\",\n credentials: withCredentials ? \"include\" : \"same-origin\",\n redirect: \"follow\"\n };\n}\n\nfunction createHeaders(httpHeaders) {\n var headers = new Headers();\n\n for (var property in httpHeaders) {\n var value = httpHeaders[property];\n\n if (typeof value === \"undefined\") {\n continue;\n }\n\n headers.append(property, value);\n }\n\n return headers;\n}\n\nvar PDFFetchStream = /*#__PURE__*/function () {\n function PDFFetchStream(source) {\n _classCallCheck(this, PDFFetchStream);\n\n this.source = source;\n this.isHttp = /^https?:/i.test(source.url);\n this.httpHeaders = this.isHttp && source.httpHeaders || {};\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n\n _createClass(PDFFetchStream, [{\n key: \"_progressiveDataLength\",\n get: function get() {\n var _this$_fullRequestRea, _this$_fullRequestRea2;\n\n return (_this$_fullRequestRea = (_this$_fullRequestRea2 = this._fullRequestReader) === null || _this$_fullRequestRea2 === void 0 ? void 0 : _this$_fullRequestRea2._loaded) !== null && _this$_fullRequestRea !== void 0 ? _this$_fullRequestRea : 0;\n }\n }, {\n key: \"getFullReader\",\n value: function getFullReader() {\n (0, _util.assert)(!this._fullRequestReader, \"PDFFetchStream.getFullReader can only be called once.\");\n this._fullRequestReader = new PDFFetchStreamReader(this);\n return this._fullRequestReader;\n }\n }, {\n key: \"getRangeReader\",\n value: function getRangeReader(begin, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n\n var reader = new PDFFetchStreamRangeReader(this, begin, end);\n\n this._rangeRequestReaders.push(reader);\n\n return reader;\n }\n }, {\n key: \"cancelAllRequests\",\n value: function cancelAllRequests(reason) {\n if (this._fullRequestReader) {\n this._fullRequestReader.cancel(reason);\n }\n\n var _iterator = _createForOfIteratorHelper(this._rangeRequestReaders.slice(0)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var reader = _step.value;\n reader.cancel(reason);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }]);\n\n return PDFFetchStream;\n}();\n\nexports.PDFFetchStream = PDFFetchStream;\n\nvar PDFFetchStreamReader = /*#__PURE__*/function () {\n function PDFFetchStreamReader(stream) {\n var _this = this;\n\n _classCallCheck(this, PDFFetchStreamReader);\n\n this._stream = stream;\n this._reader = null;\n this._loaded = 0;\n this._filename = null;\n var source = stream.source;\n this._withCredentials = source.withCredentials || false;\n this._contentLength = source.length;\n this._headersCapability = (0, _util.createPromiseCapability)();\n this._disableRange = source.disableRange || false;\n this._rangeChunkSize = source.rangeChunkSize;\n\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n\n if (typeof AbortController !== \"undefined\") {\n this._abortController = new AbortController();\n }\n\n this._isStreamingSupported = !source.disableStream;\n this._isRangeSupported = !source.disableRange;\n this._headers = createHeaders(this._stream.httpHeaders);\n var url = source.url;\n fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(function (response) {\n if (!(0, _network_utils.validateResponseStatus)(response.status)) {\n throw (0, _network_utils.createResponseStatusError)(response.status, url);\n }\n\n _this._reader = response.body.getReader();\n\n _this._headersCapability.resolve();\n\n var getResponseHeader = function getResponseHeader(name) {\n return response.headers.get(name);\n };\n\n var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({\n getResponseHeader: getResponseHeader,\n isHttp: _this._stream.isHttp,\n rangeChunkSize: _this._rangeChunkSize,\n disableRange: _this._disableRange\n }),\n allowRangeRequests = _validateRangeRequest.allowRangeRequests,\n suggestedLength = _validateRangeRequest.suggestedLength;\n\n _this._isRangeSupported = allowRangeRequests;\n _this._contentLength = suggestedLength || _this._contentLength;\n _this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);\n\n if (!_this._isStreamingSupported && _this._isRangeSupported) {\n _this.cancel(new _util.AbortException(\"Streaming is disabled.\"));\n }\n })[\"catch\"](this._headersCapability.reject);\n this.onProgress = null;\n }\n\n _createClass(PDFFetchStreamReader, [{\n key: \"headersReady\",\n get: function get() {\n return this._headersCapability.promise;\n }\n }, {\n key: \"filename\",\n get: function get() {\n return this._filename;\n }\n }, {\n key: \"contentLength\",\n get: function get() {\n return this._contentLength;\n }\n }, {\n key: \"isRangeSupported\",\n get: function get() {\n return this._isRangeSupported;\n }\n }, {\n key: \"isStreamingSupported\",\n get: function get() {\n return this._isStreamingSupported;\n }\n }, {\n key: \"read\",\n value: function () {\n var _read = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee() {\n var _yield$this$_reader$r, value, done, buffer;\n\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this._headersCapability.promise;\n\n case 2:\n _context.next = 4;\n return this._reader.read();\n\n case 4:\n _yield$this$_reader$r = _context.sent;\n value = _yield$this$_reader$r.value;\n done = _yield$this$_reader$r.done;\n\n if (!done) {\n _context.next = 9;\n break;\n }\n\n return _context.abrupt(\"return\", {\n value: value,\n done: done\n });\n\n case 9:\n this._loaded += value.byteLength;\n\n if (this.onProgress) {\n this.onProgress({\n loaded: this._loaded,\n total: this._contentLength\n });\n }\n\n buffer = new Uint8Array(value).buffer;\n return _context.abrupt(\"return\", {\n value: buffer,\n done: false\n });\n\n case 13:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function read() {\n return _read.apply(this, arguments);\n }\n\n return read;\n }()\n }, {\n key: \"cancel\",\n value: function cancel(reason) {\n if (this._reader) {\n this._reader.cancel(reason);\n }\n\n if (this._abortController) {\n this._abortController.abort();\n }\n }\n }]);\n\n return PDFFetchStreamReader;\n}();\n\nvar PDFFetchStreamRangeReader = /*#__PURE__*/function () {\n function PDFFetchStreamRangeReader(stream, begin, end) {\n var _this2 = this;\n\n _classCallCheck(this, PDFFetchStreamRangeReader);\n\n this._stream = stream;\n this._reader = null;\n this._loaded = 0;\n var source = stream.source;\n this._withCredentials = source.withCredentials || false;\n this._readCapability = (0, _util.createPromiseCapability)();\n this._isStreamingSupported = !source.disableStream;\n\n if (typeof AbortController !== \"undefined\") {\n this._abortController = new AbortController();\n }\n\n this._headers = createHeaders(this._stream.httpHeaders);\n\n this._headers.append(\"Range\", \"bytes=\".concat(begin, \"-\").concat(end - 1));\n\n var url = source.url;\n fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(function (response) {\n if (!(0, _network_utils.validateResponseStatus)(response.status)) {\n throw (0, _network_utils.createResponseStatusError)(response.status, url);\n }\n\n _this2._readCapability.resolve();\n\n _this2._reader = response.body.getReader();\n })[\"catch\"](this._readCapability.reject);\n this.onProgress = null;\n }\n\n _createClass(PDFFetchStreamRangeReader, [{\n key: \"isStreamingSupported\",\n get: function get() {\n return this._isStreamingSupported;\n }\n }, {\n key: \"read\",\n value: function () {\n var _read2 = _asyncToGenerator( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2() {\n var _yield$this$_reader$r2, value, done, buffer;\n\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this._readCapability.promise;\n\n case 2:\n _context2.next = 4;\n return this._reader.read();\n\n case 4:\n _yield$this$_reader$r2 = _context2.sent;\n value = _yield$this$_reader$r2.value;\n done = _yield$this$_reader$r2.done;\n\n if (!done) {\n _context2.next = 9;\n break;\n }\n\n return _context2.abrupt(\"return\", {\n value: value,\n done: done\n });\n\n case 9:\n this._loaded += value.byteLength;\n\n if (this.onProgress) {\n this.onProgress({\n loaded: this._loaded\n });\n }\n\n buffer = new Uint8Array(value).buffer;\n return _context2.abrupt(\"return\", {\n value: buffer,\n done: false\n });\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function read() {\n return _read2.apply(this, arguments);\n }\n\n return read;\n }()\n }, {\n key: \"cancel\",\n value: function cancel(reason) {\n if (this._reader) {\n this._reader.cancel(reason);\n }\n\n if (this._abortController) {\n this._abortController.abort();\n }\n }\n }]);\n\n return PDFFetchStreamRangeReader;\n}();\n\n/***/ })\n/******/ \t]);\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __w_pdfjs_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __w_pdfjs_require__);\n/******/ \t\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/node module decorator */\n/******/ \t(() => {\n/******/ \t\t__w_pdfjs_require__.nmd = (module) => {\n/******/ \t\t\tmodule.paths = [];\n/******/ \t\t\tif (!module.children) module.children = [];\n/******/ \t\t\treturn module;\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/************************************************************************/\nvar __webpack_exports__ = {};\n// This entry need to be wrapped in an IIFE because it need to be in strict mode.\n(() => {\n\"use strict\";\nvar exports = __webpack_exports__;\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"AnnotationLayer\", ({\n enumerable: true,\n get: function get() {\n return _annotation_layer.AnnotationLayer;\n }\n}));\nObject.defineProperty(exports, \"AnnotationMode\", ({\n enumerable: true,\n get: function get() {\n return _util.AnnotationMode;\n }\n}));\nObject.defineProperty(exports, \"CMapCompressionType\", ({\n enumerable: true,\n get: function get() {\n return _util.CMapCompressionType;\n }\n}));\nObject.defineProperty(exports, \"GlobalWorkerOptions\", ({\n enumerable: true,\n get: function get() {\n return _worker_options.GlobalWorkerOptions;\n }\n}));\nObject.defineProperty(exports, \"InvalidPDFException\", ({\n enumerable: true,\n get: function get() {\n return _util.InvalidPDFException;\n }\n}));\nObject.defineProperty(exports, \"LoopbackPort\", ({\n enumerable: true,\n get: function get() {\n return _api.LoopbackPort;\n }\n}));\nObject.defineProperty(exports, \"MissingPDFException\", ({\n enumerable: true,\n get: function get() {\n return _util.MissingPDFException;\n }\n}));\nObject.defineProperty(exports, \"OPS\", ({\n enumerable: true,\n get: function get() {\n return _util.OPS;\n }\n}));\nObject.defineProperty(exports, \"PDFDataRangeTransport\", ({\n enumerable: true,\n get: function get() {\n return _api.PDFDataRangeTransport;\n }\n}));\nObject.defineProperty(exports, \"PDFDateString\", ({\n enumerable: true,\n get: function get() {\n return _display_utils.PDFDateString;\n }\n}));\nObject.defineProperty(exports, \"PDFWorker\", ({\n enumerable: true,\n get: function get() {\n return _api.PDFWorker;\n }\n}));\nObject.defineProperty(exports, \"PasswordResponses\", ({\n enumerable: true,\n get: function get() {\n return _util.PasswordResponses;\n }\n}));\nObject.defineProperty(exports, \"PermissionFlag\", ({\n enumerable: true,\n get: function get() {\n return _util.PermissionFlag;\n }\n}));\nObject.defineProperty(exports, \"PixelsPerInch\", ({\n enumerable: true,\n get: function get() {\n return _display_utils.PixelsPerInch;\n }\n}));\nObject.defineProperty(exports, \"RenderingCancelledException\", ({\n enumerable: true,\n get: function get() {\n return _display_utils.RenderingCancelledException;\n }\n}));\nObject.defineProperty(exports, \"SVGGraphics\", ({\n enumerable: true,\n get: function get() {\n return _svg.SVGGraphics;\n }\n}));\nObject.defineProperty(exports, \"UNSUPPORTED_FEATURES\", ({\n enumerable: true,\n get: function get() {\n return _util.UNSUPPORTED_FEATURES;\n }\n}));\nObject.defineProperty(exports, \"UnexpectedResponseException\", ({\n enumerable: true,\n get: function get() {\n return _util.UnexpectedResponseException;\n }\n}));\nObject.defineProperty(exports, \"Util\", ({\n enumerable: true,\n get: function get() {\n return _util.Util;\n }\n}));\nObject.defineProperty(exports, \"VerbosityLevel\", ({\n enumerable: true,\n get: function get() {\n return _util.VerbosityLevel;\n }\n}));\nObject.defineProperty(exports, \"XfaLayer\", ({\n enumerable: true,\n get: function get() {\n return _xfa_layer.XfaLayer;\n }\n}));\nObject.defineProperty(exports, \"build\", ({\n enumerable: true,\n get: function get() {\n return _api.build;\n }\n}));\nObject.defineProperty(exports, \"createPromiseCapability\", ({\n enumerable: true,\n get: function get() {\n return _util.createPromiseCapability;\n }\n}));\nObject.defineProperty(exports, \"createValidAbsoluteUrl\", ({\n enumerable: true,\n get: function get() {\n return _util.createValidAbsoluteUrl;\n }\n}));\nObject.defineProperty(exports, \"getDocument\", ({\n enumerable: true,\n get: function get() {\n return _api.getDocument;\n }\n}));\nObject.defineProperty(exports, \"getFilenameFromUrl\", ({\n enumerable: true,\n get: function get() {\n return _display_utils.getFilenameFromUrl;\n }\n}));\nObject.defineProperty(exports, \"getPdfFilenameFromUrl\", ({\n enumerable: true,\n get: function get() {\n return _display_utils.getPdfFilenameFromUrl;\n }\n}));\nObject.defineProperty(exports, \"getXfaPageViewport\", ({\n enumerable: true,\n get: function get() {\n return _display_utils.getXfaPageViewport;\n }\n}));\nObject.defineProperty(exports, \"isPdfFile\", ({\n enumerable: true,\n get: function get() {\n return _display_utils.isPdfFile;\n }\n}));\nObject.defineProperty(exports, \"loadScript\", ({\n enumerable: true,\n get: function get() {\n return _display_utils.loadScript;\n }\n}));\nObject.defineProperty(exports, \"renderTextLayer\", ({\n enumerable: true,\n get: function get() {\n return _text_layer.renderTextLayer;\n }\n}));\nObject.defineProperty(exports, \"shadow\", ({\n enumerable: true,\n get: function get() {\n return _util.shadow;\n }\n}));\nObject.defineProperty(exports, \"version\", ({\n enumerable: true,\n get: function get() {\n return _api.version;\n }\n}));\n\nvar _util = __w_pdfjs_require__(1);\n\nvar _api = __w_pdfjs_require__(155);\n\nvar _display_utils = __w_pdfjs_require__(158);\n\nvar _annotation_layer = __w_pdfjs_require__(173);\n\nvar _worker_options = __w_pdfjs_require__(166);\n\nvar _is_node = __w_pdfjs_require__(3);\n\nvar _text_layer = __w_pdfjs_require__(176);\n\nvar _svg = __w_pdfjs_require__(177);\n\nvar _xfa_layer = __w_pdfjs_require__(175);\n\nvar pdfjsVersion = '2.14.305';\nvar pdfjsBuild = 'eaaa8b4ad';\n{\n if (_is_node.isNodeJS) {\n var _require = __w_pdfjs_require__(178),\n PDFNodeStream = _require.PDFNodeStream;\n\n (0, _api.setPDFNetworkStreamFactory)(function (params) {\n return new PDFNodeStream(params);\n });\n } else {\n var _require2 = __w_pdfjs_require__(181),\n PDFNetworkStream = _require2.PDFNetworkStream;\n\n var _require3 = __w_pdfjs_require__(182),\n PDFFetchStream = _require3.PDFFetchStream;\n\n (0, _api.setPDFNetworkStreamFactory)(function (params) {\n if ((0, _display_utils.isValidFetchUrl)(params.url)) {\n return new PDFFetchStream(params);\n }\n\n return new PDFNetworkStream(params);\n });\n }\n}\n})();\n\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});\n//# sourceMappingURL=pdf.js.map","var x=String;\nvar create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};\nmodule.exports=create();\nmodule.exports.createColors = create;\n","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.16.1\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n\nvar timeoutDuration = function () {\n var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}();\n\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\n\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n var window = element.ownerDocument.defaultView;\n var css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n\n/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nfunction getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n var noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n var offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n var nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1;\n\n // Get common ancestor container\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer;\n\n // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n var element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\n\nfunction getWindowSizes(document) {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n var rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n } catch (e) {}\n\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n\n // subtract scrollbar size from sizes\n var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n var width = sizes.width || element.clientWidth || result.width;\n var height = sizes.height || element.clientHeight || result.height;\n\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var isIE10 = isIE(10);\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop);\n var marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n var scrollTop = !excludeScroll ? getScroll(html) : 0;\n var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n var parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n var el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n // NOTE: 1 DOM access here\n\n var boundaries = { top: 0, left: 0 };\n var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n var isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n\n return boundaries;\n}\n\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n var variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n var window = element.ownerDocument.defaultView;\n var styles = window.getComputedStyle(element);\n var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n var popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (var i = 0; i < prefixes.length; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nfunction getRoundedOffsets(data, shouldRound) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var round = Math.round,\n floor = Math.floor;\n\n var noRound = function noRound(v) {\n return v;\n };\n\n var referenceWidth = round(reference.width);\n var popperWidth = round(popper.width);\n\n var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n var isVariation = data.placement.indexOf('-') !== -1;\n var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n var verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right)\n };\n}\n\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper;\n\n // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n var styles = {\n position: popper.position\n };\n\n var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n var prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n var left = void 0,\n top = void 0;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n }\n\n // Attributes\n var attributes = {\n 'x-placement': data.placement\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n\n return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n var _data$offsets$arrow;\n\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n var arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n\n var flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n // flip the variation if required\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n // flips variation if popper content overflows boundaries\n var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);\n\n var flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n });\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var basePlacement = placement.split('-')[0];\n\n var offsets = void 0;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n var transformProp = getSupportedPropertyName('transform');\n var popperStyles = data.instance.popper.style; // assignment to help minification\n var top = popperStyles.top,\n left = popperStyles.left,\n transform = popperStyles[transformProp];\n\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n var order = options.priority;\n var popper = data.offsets.popper;\n\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n return defineProperty({}, mainSide, value);\n }\n };\n\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined\n }\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n };\n\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = _extends({}, Popper.Defaults, options);\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n })\n // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n });\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n var eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n\n }]);\n return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\nexport default Popper;\n//# sourceMappingURL=popper.js.map\n","'use strict'\n\nlet Container = require('./container')\n\nclass AtRule extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'atrule'\n }\n\n append(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.append(...children)\n }\n\n prepend(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.prepend(...children)\n }\n}\n\nmodule.exports = AtRule\nAtRule.default = AtRule\n\nContainer.registerAtRule(AtRule)\n","'use strict'\n\nlet Node = require('./node')\n\nclass Comment extends Node {\n constructor(defaults) {\n super(defaults)\n this.type = 'comment'\n }\n}\n\nmodule.exports = Comment\nComment.default = Comment\n","'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet Declaration = require('./declaration')\nlet Comment = require('./comment')\nlet Node = require('./node')\n\nlet parse, Rule, AtRule, Root\n\nfunction cleanSource(nodes) {\n return nodes.map(i => {\n if (i.nodes) i.nodes = cleanSource(i.nodes)\n delete i.source\n return i\n })\n}\n\nfunction markDirtyUp(node) {\n node[isClean] = false\n if (node.proxyOf.nodes) {\n for (let i of node.proxyOf.nodes) {\n markDirtyUp(i)\n }\n }\n}\n\nclass Container extends Node {\n append(...children) {\n for (let child of children) {\n let nodes = this.normalize(child, this.last)\n for (let node of nodes) this.proxyOf.nodes.push(node)\n }\n\n this.markDirty()\n\n return this\n }\n\n cleanRaws(keepBetween) {\n super.cleanRaws(keepBetween)\n if (this.nodes) {\n for (let node of this.nodes) node.cleanRaws(keepBetween)\n }\n }\n\n each(callback) {\n if (!this.proxyOf.nodes) return undefined\n let iterator = this.getIterator()\n\n let index, result\n while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n index = this.indexes[iterator]\n result = callback(this.proxyOf.nodes[index], index)\n if (result === false) break\n\n this.indexes[iterator] += 1\n }\n\n delete this.indexes[iterator]\n return result\n }\n\n every(condition) {\n return this.nodes.every(condition)\n }\n\n getIterator() {\n if (!this.lastEach) this.lastEach = 0\n if (!this.indexes) this.indexes = {}\n\n this.lastEach += 1\n let iterator = this.lastEach\n this.indexes[iterator] = 0\n\n return iterator\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (!node[prop]) {\n return node[prop]\n } else if (\n prop === 'each' ||\n (typeof prop === 'string' && prop.startsWith('walk'))\n ) {\n return (...args) => {\n return node[prop](\n ...args.map(i => {\n if (typeof i === 'function') {\n return (child, index) => i(child.toProxy(), index)\n } else {\n return i\n }\n })\n )\n }\n } else if (prop === 'every' || prop === 'some') {\n return cb => {\n return node[prop]((child, ...other) =>\n cb(child.toProxy(), ...other)\n )\n }\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else if (prop === 'nodes') {\n return node.nodes.map(i => i.toProxy())\n } else if (prop === 'first' || prop === 'last') {\n return node[prop].toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (prop === 'name' || prop === 'params' || prop === 'selector') {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n index(child) {\n if (typeof child === 'number') return child\n if (child.proxyOf) child = child.proxyOf\n return this.proxyOf.nodes.indexOf(child)\n }\n\n insertAfter(exist, add) {\n let existIndex = this.index(exist)\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex < index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n insertBefore(exist, add) {\n let existIndex = this.index(exist)\n let type = existIndex === 0 ? 'prepend' : false\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex <= index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n normalize(nodes, sample) {\n if (typeof nodes === 'string') {\n nodes = cleanSource(parse(nodes).nodes)\n } else if (typeof nodes === 'undefined') {\n nodes = []\n } else if (Array.isArray(nodes)) {\n nodes = nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type === 'root' && this.type !== 'document') {\n nodes = nodes.nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type) {\n nodes = [nodes]\n } else if (nodes.prop) {\n if (typeof nodes.value === 'undefined') {\n throw new Error('Value field is missed in node creation')\n } else if (typeof nodes.value !== 'string') {\n nodes.value = String(nodes.value)\n }\n nodes = [new Declaration(nodes)]\n } else if (nodes.selector) {\n nodes = [new Rule(nodes)]\n } else if (nodes.name) {\n nodes = [new AtRule(nodes)]\n } else if (nodes.text) {\n nodes = [new Comment(nodes)]\n } else {\n throw new Error('Unknown node type in node creation')\n }\n\n let processed = nodes.map(i => {\n /* c8 ignore next */\n if (!i[my]) Container.rebuild(i)\n i = i.proxyOf\n if (i.parent) i.parent.removeChild(i)\n if (i[isClean]) markDirtyUp(i)\n if (typeof i.raws.before === 'undefined') {\n if (sample && typeof sample.raws.before !== 'undefined') {\n i.raws.before = sample.raws.before.replace(/\\S/g, '')\n }\n }\n i.parent = this.proxyOf\n return i\n })\n\n return processed\n }\n\n prepend(...children) {\n children = children.reverse()\n for (let child of children) {\n let nodes = this.normalize(child, this.first, 'prepend').reverse()\n for (let node of nodes) this.proxyOf.nodes.unshift(node)\n for (let id in this.indexes) {\n this.indexes[id] = this.indexes[id] + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n push(child) {\n child.parent = this\n this.proxyOf.nodes.push(child)\n return this\n }\n\n removeAll() {\n for (let node of this.proxyOf.nodes) node.parent = undefined\n this.proxyOf.nodes = []\n\n this.markDirty()\n\n return this\n }\n\n removeChild(child) {\n child = this.index(child)\n this.proxyOf.nodes[child].parent = undefined\n this.proxyOf.nodes.splice(child, 1)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (index >= child) {\n this.indexes[id] = index - 1\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n replaceValues(pattern, opts, callback) {\n if (!callback) {\n callback = opts\n opts = {}\n }\n\n this.walkDecls(decl => {\n if (opts.props && !opts.props.includes(decl.prop)) return\n if (opts.fast && !decl.value.includes(opts.fast)) return\n\n decl.value = decl.value.replace(pattern, callback)\n })\n\n this.markDirty()\n\n return this\n }\n\n some(condition) {\n return this.nodes.some(condition)\n }\n\n walk(callback) {\n return this.each((child, i) => {\n let result\n try {\n result = callback(child, i)\n } catch (e) {\n throw child.addToError(e)\n }\n if (result !== false && child.walk) {\n result = child.walk(callback)\n }\n\n return result\n })\n }\n\n walkAtRules(name, callback) {\n if (!callback) {\n callback = name\n return this.walk((child, i) => {\n if (child.type === 'atrule') {\n return callback(child, i)\n }\n })\n }\n if (name instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'atrule' && name.test(child.name)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'atrule' && child.name === name) {\n return callback(child, i)\n }\n })\n }\n\n walkComments(callback) {\n return this.walk((child, i) => {\n if (child.type === 'comment') {\n return callback(child, i)\n }\n })\n }\n\n walkDecls(prop, callback) {\n if (!callback) {\n callback = prop\n return this.walk((child, i) => {\n if (child.type === 'decl') {\n return callback(child, i)\n }\n })\n }\n if (prop instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'decl' && prop.test(child.prop)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'decl' && child.prop === prop) {\n return callback(child, i)\n }\n })\n }\n\n walkRules(selector, callback) {\n if (!callback) {\n callback = selector\n\n return this.walk((child, i) => {\n if (child.type === 'rule') {\n return callback(child, i)\n }\n })\n }\n if (selector instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'rule' && selector.test(child.selector)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'rule' && child.selector === selector) {\n return callback(child, i)\n }\n })\n }\n\n get first() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[0]\n }\n\n get last() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]\n }\n}\n\nContainer.registerParse = dependant => {\n parse = dependant\n}\n\nContainer.registerRule = dependant => {\n Rule = dependant\n}\n\nContainer.registerAtRule = dependant => {\n AtRule = dependant\n}\n\nContainer.registerRoot = dependant => {\n Root = dependant\n}\n\nmodule.exports = Container\nContainer.default = Container\n\n/* c8 ignore start */\nContainer.rebuild = node => {\n if (node.type === 'atrule') {\n Object.setPrototypeOf(node, AtRule.prototype)\n } else if (node.type === 'rule') {\n Object.setPrototypeOf(node, Rule.prototype)\n } else if (node.type === 'decl') {\n Object.setPrototypeOf(node, Declaration.prototype)\n } else if (node.type === 'comment') {\n Object.setPrototypeOf(node, Comment.prototype)\n } else if (node.type === 'root') {\n Object.setPrototypeOf(node, Root.prototype)\n }\n\n node[my] = true\n\n if (node.nodes) {\n node.nodes.forEach(child => {\n Container.rebuild(child)\n })\n }\n}\n/* c8 ignore stop */\n","'use strict'\n\nlet pico = require('picocolors')\n\nlet terminalHighlight = require('./terminal-highlight')\n\nclass CssSyntaxError extends Error {\n constructor(message, line, column, source, file, plugin) {\n super(message)\n this.name = 'CssSyntaxError'\n this.reason = message\n\n if (file) {\n this.file = file\n }\n if (source) {\n this.source = source\n }\n if (plugin) {\n this.plugin = plugin\n }\n if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n if (typeof line === 'number') {\n this.line = line\n this.column = column\n } else {\n this.line = line.line\n this.column = line.column\n this.endLine = column.line\n this.endColumn = column.column\n }\n }\n\n this.setMessage()\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, CssSyntaxError)\n }\n }\n\n setMessage() {\n this.message = this.plugin ? this.plugin + ': ' : ''\n this.message += this.file ? this.file : ''\n if (typeof this.line !== 'undefined') {\n this.message += ':' + this.line + ':' + this.column\n }\n this.message += ': ' + this.reason\n }\n\n showSourceCode(color) {\n if (!this.source) return ''\n\n let css = this.source\n if (color == null) color = pico.isColorSupported\n if (terminalHighlight) {\n if (color) css = terminalHighlight(css)\n }\n\n let lines = css.split(/\\r?\\n/)\n let start = Math.max(this.line - 3, 0)\n let end = Math.min(this.line + 2, lines.length)\n\n let maxWidth = String(end).length\n\n let mark, aside\n if (color) {\n let { bold, gray, red } = pico.createColors(true)\n mark = text => bold(red(text))\n aside = text => gray(text)\n } else {\n mark = aside = str => str\n }\n\n return lines\n .slice(start, end)\n .map((line, index) => {\n let number = start + 1 + index\n let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '\n if (number === this.line) {\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line.slice(0, this.column - 1).replace(/[^\\t]/g, ' ')\n return mark('>') + aside(gutter) + line + '\\n ' + spacing + mark('^')\n }\n return ' ' + aside(gutter) + line\n })\n .join('\\n')\n }\n\n toString() {\n let code = this.showSourceCode()\n if (code) {\n code = '\\n\\n' + code + '\\n'\n }\n return this.name + ': ' + this.message + code\n }\n}\n\nmodule.exports = CssSyntaxError\nCssSyntaxError.default = CssSyntaxError\n","'use strict'\n\nlet Node = require('./node')\n\nclass Declaration extends Node {\n constructor(defaults) {\n if (\n defaults &&\n typeof defaults.value !== 'undefined' &&\n typeof defaults.value !== 'string'\n ) {\n defaults = { ...defaults, value: String(defaults.value) }\n }\n super(defaults)\n this.type = 'decl'\n }\n\n get variable() {\n return this.prop.startsWith('--') || this.prop[0] === '$'\n }\n}\n\nmodule.exports = Declaration\nDeclaration.default = Declaration\n","'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Document extends Container {\n constructor(defaults) {\n // type needs to be passed to super, otherwise child roots won't be normalized correctly\n super({ type: 'document', ...defaults })\n\n if (!this.nodes) {\n this.nodes = []\n }\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n\n return lazy.stringify()\n }\n}\n\nDocument.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nDocument.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Document\nDocument.default = Document\n","'use strict'\n\nlet Declaration = require('./declaration')\nlet PreviousMap = require('./previous-map')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Input = require('./input')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nfunction fromJSON(json, inputs) {\n if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n let { inputs: ownInputs, ...defaults } = json\n if (ownInputs) {\n inputs = []\n for (let input of ownInputs) {\n let inputHydrated = { ...input, __proto__: Input.prototype }\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap.prototype\n }\n }\n inputs.push(inputHydrated)\n }\n }\n if (defaults.nodes) {\n defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))\n }\n if (defaults.source) {\n let { inputId, ...source } = defaults.source\n defaults.source = source\n if (inputId != null) {\n defaults.source.input = inputs[inputId]\n }\n }\n if (defaults.type === 'root') {\n return new Root(defaults)\n } else if (defaults.type === 'decl') {\n return new Declaration(defaults)\n } else if (defaults.type === 'rule') {\n return new Rule(defaults)\n } else if (defaults.type === 'comment') {\n return new Comment(defaults)\n } else if (defaults.type === 'atrule') {\n return new AtRule(defaults)\n } else {\n throw new Error('Unknown node type: ' + json.type)\n }\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n","'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { fileURLToPath, pathToFileURL } = require('url')\nlet { isAbsolute, resolve } = require('path')\nlet { nanoid } = require('nanoid/non-secure')\n\nlet terminalHighlight = require('./terminal-highlight')\nlet CssSyntaxError = require('./css-syntax-error')\nlet PreviousMap = require('./previous-map')\n\nlet fromOffsetCache = Symbol('fromOffsetCache')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(resolve && isAbsolute)\n\nclass Input {\n constructor(css, opts = {}) {\n if (\n css === null ||\n typeof css === 'undefined' ||\n (typeof css === 'object' && !css.toString)\n ) {\n throw new Error(`PostCSS received ${css} instead of CSS string`)\n }\n\n this.css = css.toString()\n\n if (this.css[0] === '\\uFEFF' || this.css[0] === '\\uFFFE') {\n this.hasBOM = true\n this.css = this.css.slice(1)\n } else {\n this.hasBOM = false\n }\n\n if (opts.from) {\n if (\n !pathAvailable ||\n /^\\w+:\\/\\//.test(opts.from) ||\n isAbsolute(opts.from)\n ) {\n this.file = opts.from\n } else {\n this.file = resolve(opts.from)\n }\n }\n\n if (pathAvailable && sourceMapAvailable) {\n let map = new PreviousMap(this.css, opts)\n if (map.text) {\n this.map = map\n let file = map.consumer().file\n if (!this.file && file) this.file = this.mapResolve(file)\n }\n }\n\n if (!this.file) {\n this.id = ''\n }\n if (this.map) this.map.file = this.from\n }\n\n error(message, line, column, opts = {}) {\n let result, endLine, endColumn\n\n if (line && typeof line === 'object') {\n let start = line\n let end = column\n if (typeof start.offset === 'number') {\n let pos = this.fromOffset(start.offset)\n line = pos.line\n column = pos.col\n } else {\n line = start.line\n column = start.column\n }\n if (typeof end.offset === 'number') {\n let pos = this.fromOffset(end.offset)\n endLine = pos.line\n endColumn = pos.col\n } else {\n endLine = end.line\n endColumn = end.column\n }\n } else if (!column) {\n let pos = this.fromOffset(line)\n line = pos.line\n column = pos.col\n }\n\n let origin = this.origin(line, column, endLine, endColumn)\n if (origin) {\n result = new CssSyntaxError(\n message,\n origin.endLine === undefined\n ? origin.line\n : { column: origin.column, line: origin.line },\n origin.endLine === undefined\n ? origin.column\n : { column: origin.endColumn, line: origin.endLine },\n origin.source,\n origin.file,\n opts.plugin\n )\n } else {\n result = new CssSyntaxError(\n message,\n endLine === undefined ? line : { column, line },\n endLine === undefined ? column : { column: endColumn, line: endLine },\n this.css,\n this.file,\n opts.plugin\n )\n }\n\n result.input = { column, endColumn, endLine, line, source: this.css }\n if (this.file) {\n if (pathToFileURL) {\n result.input.url = pathToFileURL(this.file).toString()\n }\n result.input.file = this.file\n }\n\n return result\n }\n\n fromOffset(offset) {\n let lastLine, lineToIndex\n if (!this[fromOffsetCache]) {\n let lines = this.css.split('\\n')\n lineToIndex = new Array(lines.length)\n let prevIndex = 0\n\n for (let i = 0, l = lines.length; i < l; i++) {\n lineToIndex[i] = prevIndex\n prevIndex += lines[i].length + 1\n }\n\n this[fromOffsetCache] = lineToIndex\n } else {\n lineToIndex = this[fromOffsetCache]\n }\n lastLine = lineToIndex[lineToIndex.length - 1]\n\n let min = 0\n if (offset >= lastLine) {\n min = lineToIndex.length - 1\n } else {\n let max = lineToIndex.length - 2\n let mid\n while (min < max) {\n mid = min + ((max - min) >> 1)\n if (offset < lineToIndex[mid]) {\n max = mid - 1\n } else if (offset >= lineToIndex[mid + 1]) {\n min = mid + 1\n } else {\n min = mid\n break\n }\n }\n }\n return {\n col: offset - lineToIndex[min] + 1,\n line: min + 1\n }\n }\n\n mapResolve(file) {\n if (/^\\w+:\\/\\//.test(file)) {\n return file\n }\n return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)\n }\n\n origin(line, column, endLine, endColumn) {\n if (!this.map) return false\n let consumer = this.map.consumer()\n\n let from = consumer.originalPositionFor({ column, line })\n if (!from.source) return false\n\n let to\n if (typeof endLine === 'number') {\n to = consumer.originalPositionFor({ column: endColumn, line: endLine })\n }\n\n let fromUrl\n\n if (isAbsolute(from.source)) {\n fromUrl = pathToFileURL(from.source)\n } else {\n fromUrl = new URL(\n from.source,\n this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)\n )\n }\n\n let result = {\n column: from.column,\n endColumn: to && to.column,\n endLine: to && to.line,\n line: from.line,\n url: fromUrl.toString()\n }\n\n if (fromUrl.protocol === 'file:') {\n if (fileURLToPath) {\n result.file = fileURLToPath(fromUrl)\n } else {\n /* c8 ignore next 2 */\n throw new Error(`file: protocol is not available in this PostCSS build`)\n }\n }\n\n let source = consumer.sourceContentFor(from.source)\n if (source) result.source = source\n\n return result\n }\n\n toJSON() {\n let json = {}\n for (let name of ['hasBOM', 'css', 'file', 'id']) {\n if (this[name] != null) {\n json[name] = this[name]\n }\n }\n if (this.map) {\n json.map = { ...this.map }\n if (json.map.consumerCache) {\n json.map.consumerCache = undefined\n }\n }\n return json\n }\n\n get from() {\n return this.file || this.id\n }\n}\n\nmodule.exports = Input\nInput.default = Input\n\nif (terminalHighlight && terminalHighlight.registerInput) {\n terminalHighlight.registerInput(Input)\n}\n","'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet MapGenerator = require('./map-generator')\nlet stringify = require('./stringify')\nlet Container = require('./container')\nlet Document = require('./document')\nlet warnOnce = require('./warn-once')\nlet Result = require('./result')\nlet parse = require('./parse')\nlet Root = require('./root')\n\nconst TYPE_TO_CLASS_NAME = {\n atrule: 'AtRule',\n comment: 'Comment',\n decl: 'Declaration',\n document: 'Document',\n root: 'Root',\n rule: 'Rule'\n}\n\nconst PLUGIN_PROPS = {\n AtRule: true,\n AtRuleExit: true,\n Comment: true,\n CommentExit: true,\n Declaration: true,\n DeclarationExit: true,\n Document: true,\n DocumentExit: true,\n Once: true,\n OnceExit: true,\n postcssPlugin: true,\n prepare: true,\n Root: true,\n RootExit: true,\n Rule: true,\n RuleExit: true\n}\n\nconst NOT_VISITORS = {\n Once: true,\n postcssPlugin: true,\n prepare: true\n}\n\nconst CHILDREN = 0\n\nfunction isPromise(obj) {\n return typeof obj === 'object' && typeof obj.then === 'function'\n}\n\nfunction getEvents(node) {\n let key = false\n let type = TYPE_TO_CLASS_NAME[node.type]\n if (node.type === 'decl') {\n key = node.prop.toLowerCase()\n } else if (node.type === 'atrule') {\n key = node.name.toLowerCase()\n }\n\n if (key && node.append) {\n return [\n type,\n type + '-' + key,\n CHILDREN,\n type + 'Exit',\n type + 'Exit-' + key\n ]\n } else if (key) {\n return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]\n } else if (node.append) {\n return [type, CHILDREN, type + 'Exit']\n } else {\n return [type, type + 'Exit']\n }\n}\n\nfunction toStack(node) {\n let events\n if (node.type === 'document') {\n events = ['Document', CHILDREN, 'DocumentExit']\n } else if (node.type === 'root') {\n events = ['Root', CHILDREN, 'RootExit']\n } else {\n events = getEvents(node)\n }\n\n return {\n eventIndex: 0,\n events,\n iterator: 0,\n node,\n visitorIndex: 0,\n visitors: []\n }\n}\n\nfunction cleanMarks(node) {\n node[isClean] = false\n if (node.nodes) node.nodes.forEach(i => cleanMarks(i))\n return node\n}\n\nlet postcss = {}\n\nclass LazyResult {\n constructor(processor, css, opts) {\n this.stringified = false\n this.processed = false\n\n let root\n if (\n typeof css === 'object' &&\n css !== null &&\n (css.type === 'root' || css.type === 'document')\n ) {\n root = cleanMarks(css)\n } else if (css instanceof LazyResult || css instanceof Result) {\n root = cleanMarks(css.root)\n if (css.map) {\n if (typeof opts.map === 'undefined') opts.map = {}\n if (!opts.map.inline) opts.map.inline = false\n opts.map.prev = css.map\n }\n } else {\n let parser = parse\n if (opts.syntax) parser = opts.syntax.parse\n if (opts.parser) parser = opts.parser\n if (parser.parse) parser = parser.parse\n\n try {\n root = parser(css, opts)\n } catch (error) {\n this.processed = true\n this.error = error\n }\n\n if (root && !root[my]) {\n /* c8 ignore next 2 */\n Container.rebuild(root)\n }\n }\n\n this.result = new Result(processor, root, opts)\n this.helpers = { ...postcss, postcss, result: this.result }\n this.plugins = this.processor.plugins.map(plugin => {\n if (typeof plugin === 'object' && plugin.prepare) {\n return { ...plugin, ...plugin.prepare(this.result) }\n } else {\n return plugin\n }\n })\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n if (this.processed) return Promise.resolve(this.result)\n if (!this.processing) {\n this.processing = this.runAsync()\n }\n return this.processing\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n getAsyncError() {\n throw new Error('Use process(css).then(cb) to work with async plugins')\n }\n\n handleError(error, node) {\n let plugin = this.result.lastPlugin\n try {\n if (node) node.addToError(error)\n this.error = error\n if (error.name === 'CssSyntaxError' && !error.plugin) {\n error.plugin = plugin.postcssPlugin\n error.setMessage()\n } else if (plugin.postcssVersion) {\n if (process.env.NODE_ENV !== 'production') {\n let pluginName = plugin.postcssPlugin\n let pluginVer = plugin.postcssVersion\n let runtimeVer = this.result.processor.version\n let a = pluginVer.split('.')\n let b = runtimeVer.split('.')\n\n if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {\n // eslint-disable-next-line no-console\n console.error(\n 'Unknown error from PostCSS plugin. Your current PostCSS ' +\n 'version is ' +\n runtimeVer +\n ', but ' +\n pluginName +\n ' uses ' +\n pluginVer +\n '. Perhaps this is the source of the error below.'\n )\n }\n }\n }\n } catch (err) {\n /* c8 ignore next 3 */\n // eslint-disable-next-line no-console\n if (console && console.error) console.error(err)\n }\n return error\n }\n\n prepareVisitors() {\n this.listeners = {}\n let add = (plugin, type, cb) => {\n if (!this.listeners[type]) this.listeners[type] = []\n this.listeners[type].push([plugin, cb])\n }\n for (let plugin of this.plugins) {\n if (typeof plugin === 'object') {\n for (let event in plugin) {\n if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {\n throw new Error(\n `Unknown event ${event} in ${plugin.postcssPlugin}. ` +\n `Try to update PostCSS (${this.processor.version} now).`\n )\n }\n if (!NOT_VISITORS[event]) {\n if (typeof plugin[event] === 'object') {\n for (let filter in plugin[event]) {\n if (filter === '*') {\n add(plugin, event, plugin[event][filter])\n } else {\n add(\n plugin,\n event + '-' + filter.toLowerCase(),\n plugin[event][filter]\n )\n }\n }\n } else if (typeof plugin[event] === 'function') {\n add(plugin, event, plugin[event])\n }\n }\n }\n }\n }\n this.hasListener = Object.keys(this.listeners).length > 0\n }\n\n async runAsync() {\n this.plugin = 0\n for (let i = 0; i < this.plugins.length; i++) {\n let plugin = this.plugins[i]\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (error) {\n throw this.handleError(error)\n }\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n let stack = [toStack(root)]\n while (stack.length > 0) {\n let promise = this.visitTick(stack)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (e) {\n let node = stack[stack.length - 1].node\n throw this.handleError(e, node)\n }\n }\n }\n }\n\n if (this.listeners.OnceExit) {\n for (let [plugin, visitor] of this.listeners.OnceExit) {\n this.result.lastPlugin = plugin\n try {\n if (root.type === 'document') {\n let roots = root.nodes.map(subRoot =>\n visitor(subRoot, this.helpers)\n )\n\n await Promise.all(roots)\n } else {\n await visitor(root, this.helpers)\n }\n } catch (e) {\n throw this.handleError(e)\n }\n }\n }\n }\n\n this.processed = true\n return this.stringify()\n }\n\n runOnRoot(plugin) {\n this.result.lastPlugin = plugin\n try {\n if (typeof plugin === 'object' && plugin.Once) {\n if (this.result.root.type === 'document') {\n let roots = this.result.root.nodes.map(root =>\n plugin.Once(root, this.helpers)\n )\n\n if (isPromise(roots[0])) {\n return Promise.all(roots)\n }\n\n return roots\n }\n\n return plugin.Once(this.result.root, this.helpers)\n } else if (typeof plugin === 'function') {\n return plugin(this.result.root, this.result)\n }\n } catch (error) {\n throw this.handleError(error)\n }\n }\n\n stringify() {\n if (this.error) throw this.error\n if (this.stringified) return this.result\n this.stringified = true\n\n this.sync()\n\n let opts = this.result.opts\n let str = stringify\n if (opts.syntax) str = opts.syntax.stringify\n if (opts.stringifier) str = opts.stringifier\n if (str.stringify) str = str.stringify\n\n let map = new MapGenerator(str, this.result.root, this.result.opts)\n let data = map.generate()\n this.result.css = data[0]\n this.result.map = data[1]\n\n return this.result\n }\n\n sync() {\n if (this.error) throw this.error\n if (this.processed) return this.result\n this.processed = true\n\n if (this.processing) {\n throw this.getAsyncError()\n }\n\n for (let plugin of this.plugins) {\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n this.walkSync(root)\n }\n if (this.listeners.OnceExit) {\n if (root.type === 'document') {\n for (let subRoot of root.nodes) {\n this.visitSync(this.listeners.OnceExit, subRoot)\n }\n } else {\n this.visitSync(this.listeners.OnceExit, root)\n }\n }\n }\n\n return this.result\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this.opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n return this.async().then(onFulfilled, onRejected)\n }\n\n toString() {\n return this.css\n }\n\n visitSync(visitors, node) {\n for (let [plugin, visitor] of visitors) {\n this.result.lastPlugin = plugin\n let promise\n try {\n promise = visitor(node, this.helpers)\n } catch (e) {\n throw this.handleError(e, node.proxyOf)\n }\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n return true\n }\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n }\n\n visitTick(stack) {\n let visit = stack[stack.length - 1]\n let { node, visitors } = visit\n\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n stack.pop()\n return\n }\n\n if (visitors.length > 0 && visit.visitorIndex < visitors.length) {\n let [plugin, visitor] = visitors[visit.visitorIndex]\n visit.visitorIndex += 1\n if (visit.visitorIndex === visitors.length) {\n visit.visitors = []\n visit.visitorIndex = 0\n }\n this.result.lastPlugin = plugin\n try {\n return visitor(node.toProxy(), this.helpers)\n } catch (e) {\n throw this.handleError(e, node)\n }\n }\n\n if (visit.iterator !== 0) {\n let iterator = visit.iterator\n let child\n while ((child = node.nodes[node.indexes[iterator]])) {\n node.indexes[iterator] += 1\n if (!child[isClean]) {\n child[isClean] = true\n stack.push(toStack(child))\n return\n }\n }\n visit.iterator = 0\n delete node.indexes[iterator]\n }\n\n let events = visit.events\n while (visit.eventIndex < events.length) {\n let event = events[visit.eventIndex]\n visit.eventIndex += 1\n if (event === CHILDREN) {\n if (node.nodes && node.nodes.length) {\n node[isClean] = true\n visit.iterator = node.getIterator()\n }\n return\n } else if (this.listeners[event]) {\n visit.visitors = this.listeners[event]\n return\n }\n }\n stack.pop()\n }\n\n walkSync(node) {\n node[isClean] = true\n let events = getEvents(node)\n for (let event of events) {\n if (event === CHILDREN) {\n if (node.nodes) {\n node.each(child => {\n if (!child[isClean]) this.walkSync(child)\n })\n }\n } else {\n let visitors = this.listeners[event]\n if (visitors) {\n if (this.visitSync(visitors, node.toProxy())) return\n }\n }\n }\n }\n\n warnings() {\n return this.sync().warnings()\n }\n\n get content() {\n return this.stringify().content\n }\n\n get css() {\n return this.stringify().css\n }\n\n get map() {\n return this.stringify().map\n }\n\n get messages() {\n return this.sync().messages\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n return this.sync().root\n }\n\n get [Symbol.toStringTag]() {\n return 'LazyResult'\n }\n}\n\nLazyResult.registerPostcss = dependant => {\n postcss = dependant\n}\n\nmodule.exports = LazyResult\nLazyResult.default = LazyResult\n\nRoot.registerLazyResult(LazyResult)\nDocument.registerLazyResult(LazyResult)\n","'use strict'\n\nlet list = {\n comma(string) {\n return list.split(string, [','], true)\n },\n\n space(string) {\n let spaces = [' ', '\\n', '\\t']\n return list.split(string, spaces)\n },\n\n split(string, separators, last) {\n let array = []\n let current = ''\n let split = false\n\n let func = 0\n let inQuote = false\n let prevQuote = ''\n let escape = false\n\n for (let letter of string) {\n if (escape) {\n escape = false\n } else if (letter === '\\\\') {\n escape = true\n } else if (inQuote) {\n if (letter === prevQuote) {\n inQuote = false\n }\n } else if (letter === '\"' || letter === \"'\") {\n inQuote = true\n prevQuote = letter\n } else if (letter === '(') {\n func += 1\n } else if (letter === ')') {\n if (func > 0) func -= 1\n } else if (func === 0) {\n if (separators.includes(letter)) split = true\n }\n\n if (split) {\n if (current !== '') array.push(current.trim())\n current = ''\n split = false\n } else {\n current += letter\n }\n }\n\n if (last || current !== '') array.push(current.trim())\n return array\n }\n}\n\nmodule.exports = list\nlist.default = list\n","'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { dirname, relative, resolve, sep } = require('path')\nlet { pathToFileURL } = require('url')\n\nlet Input = require('./input')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(dirname && resolve && relative && sep)\n\nclass MapGenerator {\n constructor(stringify, root, opts, cssString) {\n this.stringify = stringify\n this.mapOpts = opts.map || {}\n this.root = root\n this.opts = opts\n this.css = cssString\n this.originalCSS = cssString\n this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute\n\n this.memoizedFileURLs = new Map()\n this.memoizedPaths = new Map()\n this.memoizedURLs = new Map()\n }\n\n addAnnotation() {\n let content\n\n if (this.isInline()) {\n content =\n 'data:application/json;base64,' + this.toBase64(this.map.toString())\n } else if (typeof this.mapOpts.annotation === 'string') {\n content = this.mapOpts.annotation\n } else if (typeof this.mapOpts.annotation === 'function') {\n content = this.mapOpts.annotation(this.opts.to, this.root)\n } else {\n content = this.outputFile() + '.map'\n }\n let eol = '\\n'\n if (this.css.includes('\\r\\n')) eol = '\\r\\n'\n\n this.css += eol + '/*# sourceMappingURL=' + content + ' */'\n }\n\n applyPrevMaps() {\n for (let prev of this.previous()) {\n let from = this.toUrl(this.path(prev.file))\n let root = prev.root || dirname(prev.file)\n let map\n\n if (this.mapOpts.sourcesContent === false) {\n map = new SourceMapConsumer(prev.text)\n if (map.sourcesContent) {\n map.sourcesContent = null\n }\n } else {\n map = prev.consumer()\n }\n\n this.map.applySourceMap(map, from, this.toUrl(this.path(root)))\n }\n }\n\n clearAnnotation() {\n if (this.mapOpts.annotation === false) return\n\n if (this.root) {\n let node\n for (let i = this.root.nodes.length - 1; i >= 0; i--) {\n node = this.root.nodes[i]\n if (node.type !== 'comment') continue\n if (node.text.indexOf('# sourceMappingURL=') === 0) {\n this.root.removeChild(i)\n }\n }\n } else if (this.css) {\n this.css = this.css.replace(/\\n*?\\/\\*#[\\S\\s]*?\\*\\/$/gm, '')\n }\n }\n\n generate() {\n this.clearAnnotation()\n if (pathAvailable && sourceMapAvailable && this.isMap()) {\n return this.generateMap()\n } else {\n let result = ''\n this.stringify(this.root, i => {\n result += i\n })\n return [result]\n }\n }\n\n generateMap() {\n if (this.root) {\n this.generateString()\n } else if (this.previous().length === 1) {\n let prev = this.previous()[0].consumer()\n prev.file = this.outputFile()\n this.map = SourceMapGenerator.fromSourceMap(prev, {\n ignoreInvalidMapping: true\n })\n } else {\n this.map = new SourceMapGenerator({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n })\n this.map.addMapping({\n generated: { column: 0, line: 1 },\n original: { column: 0, line: 1 },\n source: this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : ''\n })\n }\n\n if (this.isSourcesContent()) this.setSourcesContent()\n if (this.root && this.previous().length > 0) this.applyPrevMaps()\n if (this.isAnnotation()) this.addAnnotation()\n\n if (this.isInline()) {\n return [this.css]\n } else {\n return [this.css, this.map]\n }\n }\n\n generateString() {\n this.css = ''\n this.map = new SourceMapGenerator({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n })\n\n let line = 1\n let column = 1\n\n let noSource = ''\n let mapping = {\n generated: { column: 0, line: 0 },\n original: { column: 0, line: 0 },\n source: ''\n }\n\n let lines, last\n this.stringify(this.root, (str, node, type) => {\n this.css += str\n\n if (node && type !== 'end') {\n mapping.generated.line = line\n mapping.generated.column = column - 1\n if (node.source && node.source.start) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.start.line\n mapping.original.column = node.source.start.column - 1\n this.map.addMapping(mapping)\n } else {\n mapping.source = noSource\n mapping.original.line = 1\n mapping.original.column = 0\n this.map.addMapping(mapping)\n }\n }\n\n lines = str.match(/\\n/g)\n if (lines) {\n line += lines.length\n last = str.lastIndexOf('\\n')\n column = str.length - last\n } else {\n column += str.length\n }\n\n if (node && type !== 'start') {\n let p = node.parent || { raws: {} }\n let childless =\n node.type === 'decl' || (node.type === 'atrule' && !node.nodes)\n if (!childless || node !== p.last || p.raws.semicolon) {\n if (node.source && node.source.end) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.end.line\n mapping.original.column = node.source.end.column - 1\n mapping.generated.line = line\n mapping.generated.column = column - 2\n this.map.addMapping(mapping)\n } else {\n mapping.source = noSource\n mapping.original.line = 1\n mapping.original.column = 0\n mapping.generated.line = line\n mapping.generated.column = column - 1\n this.map.addMapping(mapping)\n }\n }\n }\n })\n }\n\n isAnnotation() {\n if (this.isInline()) {\n return true\n }\n if (typeof this.mapOpts.annotation !== 'undefined') {\n return this.mapOpts.annotation\n }\n if (this.previous().length) {\n return this.previous().some(i => i.annotation)\n }\n return true\n }\n\n isInline() {\n if (typeof this.mapOpts.inline !== 'undefined') {\n return this.mapOpts.inline\n }\n\n let annotation = this.mapOpts.annotation\n if (typeof annotation !== 'undefined' && annotation !== true) {\n return false\n }\n\n if (this.previous().length) {\n return this.previous().some(i => i.inline)\n }\n return true\n }\n\n isMap() {\n if (typeof this.opts.map !== 'undefined') {\n return !!this.opts.map\n }\n return this.previous().length > 0\n }\n\n isSourcesContent() {\n if (typeof this.mapOpts.sourcesContent !== 'undefined') {\n return this.mapOpts.sourcesContent\n }\n if (this.previous().length) {\n return this.previous().some(i => i.withContent())\n }\n return true\n }\n\n outputFile() {\n if (this.opts.to) {\n return this.path(this.opts.to)\n } else if (this.opts.from) {\n return this.path(this.opts.from)\n } else {\n return 'to.css'\n }\n }\n\n path(file) {\n if (this.mapOpts.absolute) return file\n if (file.charCodeAt(0) === 60 /* `<` */) return file\n if (/^\\w+:\\/\\//.test(file)) return file\n let cached = this.memoizedPaths.get(file)\n if (cached) return cached\n\n let from = this.opts.to ? dirname(this.opts.to) : '.'\n\n if (typeof this.mapOpts.annotation === 'string') {\n from = dirname(resolve(from, this.mapOpts.annotation))\n }\n\n let path = relative(from, file)\n this.memoizedPaths.set(file, path)\n\n return path\n }\n\n previous() {\n if (!this.previousMaps) {\n this.previousMaps = []\n if (this.root) {\n this.root.walk(node => {\n if (node.source && node.source.input.map) {\n let map = node.source.input.map\n if (!this.previousMaps.includes(map)) {\n this.previousMaps.push(map)\n }\n }\n })\n } else {\n let input = new Input(this.originalCSS, this.opts)\n if (input.map) this.previousMaps.push(input.map)\n }\n }\n\n return this.previousMaps\n }\n\n setSourcesContent() {\n let already = {}\n if (this.root) {\n this.root.walk(node => {\n if (node.source) {\n let from = node.source.input.from\n if (from && !already[from]) {\n already[from] = true\n let fromUrl = this.usesFileUrls\n ? this.toFileUrl(from)\n : this.toUrl(this.path(from))\n this.map.setSourceContent(fromUrl, node.source.input.css)\n }\n }\n })\n } else if (this.css) {\n let from = this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : ''\n this.map.setSourceContent(from, this.css)\n }\n }\n\n sourcePath(node) {\n if (this.mapOpts.from) {\n return this.toUrl(this.mapOpts.from)\n } else if (this.usesFileUrls) {\n return this.toFileUrl(node.source.input.from)\n } else {\n return this.toUrl(this.path(node.source.input.from))\n }\n }\n\n toBase64(str) {\n if (Buffer) {\n return Buffer.from(str).toString('base64')\n } else {\n return window.btoa(unescape(encodeURIComponent(str)))\n }\n }\n\n toFileUrl(path) {\n let cached = this.memoizedFileURLs.get(path)\n if (cached) return cached\n\n if (pathToFileURL) {\n let fileURL = pathToFileURL(path).toString()\n this.memoizedFileURLs.set(path, fileURL)\n\n return fileURL\n } else {\n throw new Error(\n '`map.absolute` option is not available in this PostCSS build'\n )\n }\n }\n\n toUrl(path) {\n let cached = this.memoizedURLs.get(path)\n if (cached) return cached\n\n if (sep === '\\\\') {\n path = path.replace(/\\\\/g, '/')\n }\n\n let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent)\n this.memoizedURLs.set(path, url)\n\n return url\n }\n}\n\nmodule.exports = MapGenerator\n","'use strict'\n\nlet MapGenerator = require('./map-generator')\nlet stringify = require('./stringify')\nlet warnOnce = require('./warn-once')\nlet parse = require('./parse')\nconst Result = require('./result')\n\nclass NoWorkResult {\n constructor(processor, css, opts) {\n css = css.toString()\n this.stringified = false\n\n this._processor = processor\n this._css = css\n this._opts = opts\n this._map = undefined\n let root\n\n let str = stringify\n this.result = new Result(this._processor, root, this._opts)\n this.result.css = css\n\n let self = this\n Object.defineProperty(this.result, 'root', {\n get() {\n return self.root\n }\n })\n\n let map = new MapGenerator(str, root, this._opts, css)\n if (map.isMap()) {\n let [generatedCSS, generatedMap] = map.generate()\n if (generatedCSS) {\n this.result.css = generatedCSS\n }\n if (generatedMap) {\n this.result.map = generatedMap\n }\n } else {\n map.clearAnnotation()\n this.result.css = map.css\n }\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n return Promise.resolve(this.result)\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n sync() {\n if (this.error) throw this.error\n return this.result\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this._opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n\n return this.async().then(onFulfilled, onRejected)\n }\n\n toString() {\n return this._css\n }\n\n warnings() {\n return []\n }\n\n get content() {\n return this.result.css\n }\n\n get css() {\n return this.result.css\n }\n\n get map() {\n return this.result.map\n }\n\n get messages() {\n return []\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n if (this._root) {\n return this._root\n }\n\n let root\n let parser = parse\n\n try {\n root = parser(this._css, this._opts)\n } catch (error) {\n this.error = error\n }\n\n if (this.error) {\n throw this.error\n } else {\n this._root = root\n return root\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'NoWorkResult'\n }\n}\n\nmodule.exports = NoWorkResult\nNoWorkResult.default = NoWorkResult\n","'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet CssSyntaxError = require('./css-syntax-error')\nlet Stringifier = require('./stringifier')\nlet stringify = require('./stringify')\n\nfunction cloneNode(obj, parent) {\n let cloned = new obj.constructor()\n\n for (let i in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, i)) {\n /* c8 ignore next 2 */\n continue\n }\n if (i === 'proxyCache') continue\n let value = obj[i]\n let type = typeof value\n\n if (i === 'parent' && type === 'object') {\n if (parent) cloned[i] = parent\n } else if (i === 'source') {\n cloned[i] = value\n } else if (Array.isArray(value)) {\n cloned[i] = value.map(j => cloneNode(j, cloned))\n } else {\n if (type === 'object' && value !== null) value = cloneNode(value)\n cloned[i] = value\n }\n }\n\n return cloned\n}\n\nclass Node {\n constructor(defaults = {}) {\n this.raws = {}\n this[isClean] = false\n this[my] = true\n\n for (let name in defaults) {\n if (name === 'nodes') {\n this.nodes = []\n for (let node of defaults[name]) {\n if (typeof node.clone === 'function') {\n this.append(node.clone())\n } else {\n this.append(node)\n }\n }\n } else {\n this[name] = defaults[name]\n }\n }\n }\n\n addToError(error) {\n error.postcssNode = this\n if (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n let s = this.source\n error.stack = error.stack.replace(\n /\\n\\s{4}at /,\n `$&${s.input.from}:${s.start.line}:${s.start.column}$&`\n )\n }\n return error\n }\n\n after(add) {\n this.parent.insertAfter(this, add)\n return this\n }\n\n assign(overrides = {}) {\n for (let name in overrides) {\n this[name] = overrides[name]\n }\n return this\n }\n\n before(add) {\n this.parent.insertBefore(this, add)\n return this\n }\n\n cleanRaws(keepBetween) {\n delete this.raws.before\n delete this.raws.after\n if (!keepBetween) delete this.raws.between\n }\n\n clone(overrides = {}) {\n let cloned = cloneNode(this)\n for (let name in overrides) {\n cloned[name] = overrides[name]\n }\n return cloned\n }\n\n cloneAfter(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertAfter(this, cloned)\n return cloned\n }\n\n cloneBefore(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertBefore(this, cloned)\n return cloned\n }\n\n error(message, opts = {}) {\n if (this.source) {\n let { end, start } = this.rangeBy(opts)\n return this.source.input.error(\n message,\n { column: start.column, line: start.line },\n { column: end.column, line: end.line },\n opts\n )\n }\n return new CssSyntaxError(message)\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (\n prop === 'prop' ||\n prop === 'value' ||\n prop === 'name' ||\n prop === 'params' ||\n prop === 'important' ||\n /* c8 ignore next */\n prop === 'text'\n ) {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n markDirty() {\n if (this[isClean]) {\n this[isClean] = false\n let next = this\n while ((next = next.parent)) {\n next[isClean] = false\n }\n }\n }\n\n next() {\n if (!this.parent) return undefined\n let index = this.parent.index(this)\n return this.parent.nodes[index + 1]\n }\n\n positionBy(opts, stringRepresentation) {\n let pos = this.source.start\n if (opts.index) {\n pos = this.positionInside(opts.index, stringRepresentation)\n } else if (opts.word) {\n stringRepresentation = this.toString()\n let index = stringRepresentation.indexOf(opts.word)\n if (index !== -1) pos = this.positionInside(index, stringRepresentation)\n }\n return pos\n }\n\n positionInside(index, stringRepresentation) {\n let string = stringRepresentation || this.toString()\n let column = this.source.start.column\n let line = this.source.start.line\n\n for (let i = 0; i < index; i++) {\n if (string[i] === '\\n') {\n column = 1\n line += 1\n } else {\n column += 1\n }\n }\n\n return { column, line }\n }\n\n prev() {\n if (!this.parent) return undefined\n let index = this.parent.index(this)\n return this.parent.nodes[index - 1]\n }\n\n rangeBy(opts) {\n let start = {\n column: this.source.start.column,\n line: this.source.start.line\n }\n let end = this.source.end\n ? {\n column: this.source.end.column + 1,\n line: this.source.end.line\n }\n : {\n column: start.column + 1,\n line: start.line\n }\n\n if (opts.word) {\n let stringRepresentation = this.toString()\n let index = stringRepresentation.indexOf(opts.word)\n if (index !== -1) {\n start = this.positionInside(index, stringRepresentation)\n end = this.positionInside(index + opts.word.length, stringRepresentation)\n }\n } else {\n if (opts.start) {\n start = {\n column: opts.start.column,\n line: opts.start.line\n }\n } else if (opts.index) {\n start = this.positionInside(opts.index)\n }\n\n if (opts.end) {\n end = {\n column: opts.end.column,\n line: opts.end.line\n }\n } else if (typeof opts.endIndex === 'number') {\n end = this.positionInside(opts.endIndex)\n } else if (opts.index) {\n end = this.positionInside(opts.index + 1)\n }\n }\n\n if (\n end.line < start.line ||\n (end.line === start.line && end.column <= start.column)\n ) {\n end = { column: start.column + 1, line: start.line }\n }\n\n return { end, start }\n }\n\n raw(prop, defaultType) {\n let str = new Stringifier()\n return str.raw(this, prop, defaultType)\n }\n\n remove() {\n if (this.parent) {\n this.parent.removeChild(this)\n }\n this.parent = undefined\n return this\n }\n\n replaceWith(...nodes) {\n if (this.parent) {\n let bookmark = this\n let foundSelf = false\n for (let node of nodes) {\n if (node === this) {\n foundSelf = true\n } else if (foundSelf) {\n this.parent.insertAfter(bookmark, node)\n bookmark = node\n } else {\n this.parent.insertBefore(bookmark, node)\n }\n }\n\n if (!foundSelf) {\n this.remove()\n }\n }\n\n return this\n }\n\n root() {\n let result = this\n while (result.parent && result.parent.type !== 'document') {\n result = result.parent\n }\n return result\n }\n\n toJSON(_, inputs) {\n let fixed = {}\n let emitInputs = inputs == null\n inputs = inputs || new Map()\n let inputsNextIndex = 0\n\n for (let name in this) {\n if (!Object.prototype.hasOwnProperty.call(this, name)) {\n /* c8 ignore next 2 */\n continue\n }\n if (name === 'parent' || name === 'proxyCache') continue\n let value = this[name]\n\n if (Array.isArray(value)) {\n fixed[name] = value.map(i => {\n if (typeof i === 'object' && i.toJSON) {\n return i.toJSON(null, inputs)\n } else {\n return i\n }\n })\n } else if (typeof value === 'object' && value.toJSON) {\n fixed[name] = value.toJSON(null, inputs)\n } else if (name === 'source') {\n let inputId = inputs.get(value.input)\n if (inputId == null) {\n inputId = inputsNextIndex\n inputs.set(value.input, inputsNextIndex)\n inputsNextIndex++\n }\n fixed[name] = {\n end: value.end,\n inputId,\n start: value.start\n }\n } else {\n fixed[name] = value\n }\n }\n\n if (emitInputs) {\n fixed.inputs = [...inputs.keys()].map(input => input.toJSON())\n }\n\n return fixed\n }\n\n toProxy() {\n if (!this.proxyCache) {\n this.proxyCache = new Proxy(this, this.getProxyProcessor())\n }\n return this.proxyCache\n }\n\n toString(stringifier = stringify) {\n if (stringifier.stringify) stringifier = stringifier.stringify\n let result = ''\n stringifier(this, i => {\n result += i\n })\n return result\n }\n\n warn(result, text, opts) {\n let data = { node: this }\n for (let i in opts) data[i] = opts[i]\n return result.warn(text, data)\n }\n\n get proxyOf() {\n return this\n }\n}\n\nmodule.exports = Node\nNode.default = Node\n","'use strict'\n\nlet Container = require('./container')\nlet Parser = require('./parser')\nlet Input = require('./input')\n\nfunction parse(css, opts) {\n let input = new Input(css, opts)\n let parser = new Parser(input)\n try {\n parser.parse()\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n if (e.name === 'CssSyntaxError' && opts && opts.from) {\n if (/\\.scss$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse SCSS with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-scss parser'\n } else if (/\\.sass/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Sass with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-sass parser'\n } else if (/\\.less$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Less with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-less parser'\n }\n }\n }\n throw e\n }\n\n return parser.root\n}\n\nmodule.exports = parse\nparse.default = parse\n\nContainer.registerParse(parse)\n","'use strict'\n\nlet Declaration = require('./declaration')\nlet tokenizer = require('./tokenize')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nconst SAFE_COMMENT_NEIGHBOR = {\n empty: true,\n space: true\n}\n\nfunction findLastWithPosition(tokens) {\n for (let i = tokens.length - 1; i >= 0; i--) {\n let token = tokens[i]\n let pos = token[3] || token[2]\n if (pos) return pos\n }\n}\n\nclass Parser {\n constructor(input) {\n this.input = input\n\n this.root = new Root()\n this.current = this.root\n this.spaces = ''\n this.semicolon = false\n\n this.createTokenizer()\n this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }\n }\n\n atrule(token) {\n let node = new AtRule()\n node.name = token[1].slice(1)\n if (node.name === '') {\n this.unnamedAtrule(node, token)\n }\n this.init(node, token[2])\n\n let type\n let prev\n let shift\n let last = false\n let open = false\n let params = []\n let brackets = []\n\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n type = token[0]\n\n if (type === '(' || type === '[') {\n brackets.push(type === '(' ? ')' : ']')\n } else if (type === '{' && brackets.length > 0) {\n brackets.push('}')\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n }\n\n if (brackets.length === 0) {\n if (type === ';') {\n node.source.end = this.getPosition(token[2])\n node.source.end.offset++\n this.semicolon = true\n break\n } else if (type === '{') {\n open = true\n break\n } else if (type === '}') {\n if (params.length > 0) {\n shift = params.length - 1\n prev = params[shift]\n while (prev && prev[0] === 'space') {\n prev = params[--shift]\n }\n if (prev) {\n node.source.end = this.getPosition(prev[3] || prev[2])\n node.source.end.offset++\n }\n }\n this.end(token)\n break\n } else {\n params.push(token)\n }\n } else {\n params.push(token)\n }\n\n if (this.tokenizer.endOfFile()) {\n last = true\n break\n }\n }\n\n node.raws.between = this.spacesAndCommentsFromEnd(params)\n if (params.length) {\n node.raws.afterName = this.spacesAndCommentsFromStart(params)\n this.raw(node, 'params', params)\n if (last) {\n token = params[params.length - 1]\n node.source.end = this.getPosition(token[3] || token[2])\n node.source.end.offset++\n this.spaces = node.raws.between\n node.raws.between = ''\n }\n } else {\n node.raws.afterName = ''\n node.params = ''\n }\n\n if (open) {\n node.nodes = []\n this.current = node\n }\n }\n\n checkMissedSemicolon(tokens) {\n let colon = this.colon(tokens)\n if (colon === false) return\n\n let founded = 0\n let token\n for (let j = colon - 1; j >= 0; j--) {\n token = tokens[j]\n if (token[0] !== 'space') {\n founded += 1\n if (founded === 2) break\n }\n }\n // If the token is a word, e.g. `!important`, `red` or any other valid property's value.\n // Then we need to return the colon after that word token. [3] is the \"end\" colon of that word.\n // And because we need it after that one we do +1 to get the next one.\n throw this.input.error(\n 'Missed semicolon',\n token[0] === 'word' ? token[3] + 1 : token[2]\n )\n }\n\n colon(tokens) {\n let brackets = 0\n let token, type, prev\n for (let [i, element] of tokens.entries()) {\n token = element\n type = token[0]\n\n if (type === '(') {\n brackets += 1\n }\n if (type === ')') {\n brackets -= 1\n }\n if (brackets === 0 && type === ':') {\n if (!prev) {\n this.doubleColon(token)\n } else if (prev[0] === 'word' && prev[1] === 'progid') {\n continue\n } else {\n return i\n }\n }\n\n prev = token\n }\n return false\n }\n\n comment(token) {\n let node = new Comment()\n this.init(node, token[2])\n node.source.end = this.getPosition(token[3] || token[2])\n node.source.end.offset++\n\n let text = token[1].slice(2, -2)\n if (/^\\s*$/.test(text)) {\n node.text = ''\n node.raws.left = text\n node.raws.right = ''\n } else {\n let match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/)\n node.text = match[2]\n node.raws.left = match[1]\n node.raws.right = match[3]\n }\n }\n\n createTokenizer() {\n this.tokenizer = tokenizer(this.input)\n }\n\n decl(tokens, customProperty) {\n let node = new Declaration()\n this.init(node, tokens[0][2])\n\n let last = tokens[tokens.length - 1]\n if (last[0] === ';') {\n this.semicolon = true\n tokens.pop()\n }\n\n node.source.end = this.getPosition(\n last[3] || last[2] || findLastWithPosition(tokens)\n )\n node.source.end.offset++\n\n while (tokens[0][0] !== 'word') {\n if (tokens.length === 1) this.unknownWord(tokens)\n node.raws.before += tokens.shift()[1]\n }\n node.source.start = this.getPosition(tokens[0][2])\n\n node.prop = ''\n while (tokens.length) {\n let type = tokens[0][0]\n if (type === ':' || type === 'space' || type === 'comment') {\n break\n }\n node.prop += tokens.shift()[1]\n }\n\n node.raws.between = ''\n\n let token\n while (tokens.length) {\n token = tokens.shift()\n\n if (token[0] === ':') {\n node.raws.between += token[1]\n break\n } else {\n if (token[0] === 'word' && /\\w/.test(token[1])) {\n this.unknownWord([token])\n }\n node.raws.between += token[1]\n }\n }\n\n if (node.prop[0] === '_' || node.prop[0] === '*') {\n node.raws.before += node.prop[0]\n node.prop = node.prop.slice(1)\n }\n\n let firstSpaces = []\n let next\n while (tokens.length) {\n next = tokens[0][0]\n if (next !== 'space' && next !== 'comment') break\n firstSpaces.push(tokens.shift())\n }\n\n this.precheckMissedSemicolon(tokens)\n\n for (let i = tokens.length - 1; i >= 0; i--) {\n token = tokens[i]\n if (token[1].toLowerCase() === '!important') {\n node.important = true\n let string = this.stringFrom(tokens, i)\n string = this.spacesFromEnd(tokens) + string\n if (string !== ' !important') node.raws.important = string\n break\n } else if (token[1].toLowerCase() === 'important') {\n let cache = tokens.slice(0)\n let str = ''\n for (let j = i; j > 0; j--) {\n let type = cache[j][0]\n if (str.trim().indexOf('!') === 0 && type !== 'space') {\n break\n }\n str = cache.pop()[1] + str\n }\n if (str.trim().indexOf('!') === 0) {\n node.important = true\n node.raws.important = str\n tokens = cache\n }\n }\n\n if (token[0] !== 'space' && token[0] !== 'comment') {\n break\n }\n }\n\n let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')\n\n if (hasWord) {\n node.raws.between += firstSpaces.map(i => i[1]).join('')\n firstSpaces = []\n }\n this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)\n\n if (node.value.includes(':') && !customProperty) {\n this.checkMissedSemicolon(tokens)\n }\n }\n\n doubleColon(token) {\n throw this.input.error(\n 'Double colon',\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n )\n }\n\n emptyRule(token) {\n let node = new Rule()\n this.init(node, token[2])\n node.selector = ''\n node.raws.between = ''\n this.current = node\n }\n\n end(token) {\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon\n }\n this.semicolon = false\n\n this.current.raws.after = (this.current.raws.after || '') + this.spaces\n this.spaces = ''\n\n if (this.current.parent) {\n this.current.source.end = this.getPosition(token[2])\n this.current.source.end.offset++\n this.current = this.current.parent\n } else {\n this.unexpectedClose(token)\n }\n }\n\n endFile() {\n if (this.current.parent) this.unclosedBlock()\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon\n }\n this.current.raws.after = (this.current.raws.after || '') + this.spaces\n this.root.source.end = this.getPosition(this.tokenizer.position())\n }\n\n freeSemicolon(token) {\n this.spaces += token[1]\n if (this.current.nodes) {\n let prev = this.current.nodes[this.current.nodes.length - 1]\n if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {\n prev.raws.ownSemicolon = this.spaces\n this.spaces = ''\n }\n }\n }\n\n // Helpers\n\n getPosition(offset) {\n let pos = this.input.fromOffset(offset)\n return {\n column: pos.col,\n line: pos.line,\n offset\n }\n }\n\n init(node, offset) {\n this.current.push(node)\n node.source = {\n input: this.input,\n start: this.getPosition(offset)\n }\n node.raws.before = this.spaces\n this.spaces = ''\n if (node.type !== 'comment') this.semicolon = false\n }\n\n other(start) {\n let end = false\n let type = null\n let colon = false\n let bracket = null\n let brackets = []\n let customProperty = start[1].startsWith('--')\n\n let tokens = []\n let token = start\n while (token) {\n type = token[0]\n tokens.push(token)\n\n if (type === '(' || type === '[') {\n if (!bracket) bracket = token\n brackets.push(type === '(' ? ')' : ']')\n } else if (customProperty && colon && type === '{') {\n if (!bracket) bracket = token\n brackets.push('}')\n } else if (brackets.length === 0) {\n if (type === ';') {\n if (colon) {\n this.decl(tokens, customProperty)\n return\n } else {\n break\n }\n } else if (type === '{') {\n this.rule(tokens)\n return\n } else if (type === '}') {\n this.tokenizer.back(tokens.pop())\n end = true\n break\n } else if (type === ':') {\n colon = true\n }\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n if (brackets.length === 0) bracket = null\n }\n\n token = this.tokenizer.nextToken()\n }\n\n if (this.tokenizer.endOfFile()) end = true\n if (brackets.length > 0) this.unclosedBracket(bracket)\n\n if (end && colon) {\n if (!customProperty) {\n while (tokens.length) {\n token = tokens[tokens.length - 1][0]\n if (token !== 'space' && token !== 'comment') break\n this.tokenizer.back(tokens.pop())\n }\n }\n this.decl(tokens, customProperty)\n } else {\n this.unknownWord(tokens)\n }\n }\n\n parse() {\n let token\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n\n switch (token[0]) {\n case 'space':\n this.spaces += token[1]\n break\n\n case ';':\n this.freeSemicolon(token)\n break\n\n case '}':\n this.end(token)\n break\n\n case 'comment':\n this.comment(token)\n break\n\n case 'at-word':\n this.atrule(token)\n break\n\n case '{':\n this.emptyRule(token)\n break\n\n default:\n this.other(token)\n break\n }\n }\n this.endFile()\n }\n\n precheckMissedSemicolon(/* tokens */) {\n // Hook for Safe Parser\n }\n\n raw(node, prop, tokens, customProperty) {\n let token, type\n let length = tokens.length\n let value = ''\n let clean = true\n let next, prev\n\n for (let i = 0; i < length; i += 1) {\n token = tokens[i]\n type = token[0]\n if (type === 'space' && i === length - 1 && !customProperty) {\n clean = false\n } else if (type === 'comment') {\n prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'\n next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'\n if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {\n if (value.slice(-1) === ',') {\n clean = false\n } else {\n value += token[1]\n }\n } else {\n clean = false\n }\n } else {\n value += token[1]\n }\n }\n if (!clean) {\n let raw = tokens.reduce((all, i) => all + i[1], '')\n node.raws[prop] = { raw, value }\n }\n node[prop] = value\n }\n\n rule(tokens) {\n tokens.pop()\n\n let node = new Rule()\n this.init(node, tokens[0][2])\n\n node.raws.between = this.spacesAndCommentsFromEnd(tokens)\n this.raw(node, 'selector', tokens)\n this.current = node\n }\n\n spacesAndCommentsFromEnd(tokens) {\n let lastTokenType\n let spaces = ''\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0]\n if (lastTokenType !== 'space' && lastTokenType !== 'comment') break\n spaces = tokens.pop()[1] + spaces\n }\n return spaces\n }\n\n // Errors\n\n spacesAndCommentsFromStart(tokens) {\n let next\n let spaces = ''\n while (tokens.length) {\n next = tokens[0][0]\n if (next !== 'space' && next !== 'comment') break\n spaces += tokens.shift()[1]\n }\n return spaces\n }\n\n spacesFromEnd(tokens) {\n let lastTokenType\n let spaces = ''\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0]\n if (lastTokenType !== 'space') break\n spaces = tokens.pop()[1] + spaces\n }\n return spaces\n }\n\n stringFrom(tokens, from) {\n let result = ''\n for (let i = from; i < tokens.length; i++) {\n result += tokens[i][1]\n }\n tokens.splice(from, tokens.length - from)\n return result\n }\n\n unclosedBlock() {\n let pos = this.current.source.start\n throw this.input.error('Unclosed block', pos.line, pos.column)\n }\n\n unclosedBracket(bracket) {\n throw this.input.error(\n 'Unclosed bracket',\n { offset: bracket[2] },\n { offset: bracket[2] + 1 }\n )\n }\n\n unexpectedClose(token) {\n throw this.input.error(\n 'Unexpected }',\n { offset: token[2] },\n { offset: token[2] + 1 }\n )\n }\n\n unknownWord(tokens) {\n throw this.input.error(\n 'Unknown word',\n { offset: tokens[0][2] },\n { offset: tokens[0][2] + tokens[0][1].length }\n )\n }\n\n unnamedAtrule(node, token) {\n throw this.input.error(\n 'At-rule without name',\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n )\n }\n}\n\nmodule.exports = Parser\n","'use strict'\n\nlet CssSyntaxError = require('./css-syntax-error')\nlet Declaration = require('./declaration')\nlet LazyResult = require('./lazy-result')\nlet Container = require('./container')\nlet Processor = require('./processor')\nlet stringify = require('./stringify')\nlet fromJSON = require('./fromJSON')\nlet Document = require('./document')\nlet Warning = require('./warning')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Result = require('./result.js')\nlet Input = require('./input')\nlet parse = require('./parse')\nlet list = require('./list')\nlet Rule = require('./rule')\nlet Root = require('./root')\nlet Node = require('./node')\n\nfunction postcss(...plugins) {\n if (plugins.length === 1 && Array.isArray(plugins[0])) {\n plugins = plugins[0]\n }\n return new Processor(plugins)\n}\n\npostcss.plugin = function plugin(name, initializer) {\n let warningPrinted = false\n function creator(...args) {\n // eslint-disable-next-line no-console\n if (console && console.warn && !warningPrinted) {\n warningPrinted = true\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': postcss.plugin was deprecated. Migration guide:\\n' +\n 'https://evilmartians.com/chronicles/postcss-8-plugin-migration'\n )\n if (process.env.LANG && process.env.LANG.startsWith('cn')) {\n /* c8 ignore next 7 */\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': 里面 postcss.plugin 被弃用. 迁移指南:\\n' +\n 'https://www.w3ctech.com/topic/2226'\n )\n }\n }\n let transformer = initializer(...args)\n transformer.postcssPlugin = name\n transformer.postcssVersion = new Processor().version\n return transformer\n }\n\n let cache\n Object.defineProperty(creator, 'postcss', {\n get() {\n if (!cache) cache = creator()\n return cache\n }\n })\n\n creator.process = function (css, processOpts, pluginOpts) {\n return postcss([creator(pluginOpts)]).process(css, processOpts)\n }\n\n return creator\n}\n\npostcss.stringify = stringify\npostcss.parse = parse\npostcss.fromJSON = fromJSON\npostcss.list = list\n\npostcss.comment = defaults => new Comment(defaults)\npostcss.atRule = defaults => new AtRule(defaults)\npostcss.decl = defaults => new Declaration(defaults)\npostcss.rule = defaults => new Rule(defaults)\npostcss.root = defaults => new Root(defaults)\npostcss.document = defaults => new Document(defaults)\n\npostcss.CssSyntaxError = CssSyntaxError\npostcss.Declaration = Declaration\npostcss.Container = Container\npostcss.Processor = Processor\npostcss.Document = Document\npostcss.Comment = Comment\npostcss.Warning = Warning\npostcss.AtRule = AtRule\npostcss.Result = Result\npostcss.Input = Input\npostcss.Rule = Rule\npostcss.Root = Root\npostcss.Node = Node\n\nLazyResult.registerPostcss(postcss)\n\nmodule.exports = postcss\npostcss.default = postcss\n","'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { existsSync, readFileSync } = require('fs')\nlet { dirname, join } = require('path')\n\nfunction fromBase64(str) {\n if (Buffer) {\n return Buffer.from(str, 'base64').toString()\n } else {\n /* c8 ignore next 2 */\n return window.atob(str)\n }\n}\n\nclass PreviousMap {\n constructor(css, opts) {\n if (opts.map === false) return\n this.loadAnnotation(css)\n this.inline = this.startWith(this.annotation, 'data:')\n\n let prev = opts.map ? opts.map.prev : undefined\n let text = this.loadMap(opts.from, prev)\n if (!this.mapFile && opts.from) {\n this.mapFile = opts.from\n }\n if (this.mapFile) this.root = dirname(this.mapFile)\n if (text) this.text = text\n }\n\n consumer() {\n if (!this.consumerCache) {\n this.consumerCache = new SourceMapConsumer(this.text)\n }\n return this.consumerCache\n }\n\n decodeInline(text) {\n let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/\n let baseUri = /^data:application\\/json;base64,/\n let charsetUri = /^data:application\\/json;charset=utf-?8,/\n let uri = /^data:application\\/json,/\n\n if (charsetUri.test(text) || uri.test(text)) {\n return decodeURIComponent(text.substr(RegExp.lastMatch.length))\n }\n\n if (baseCharsetUri.test(text) || baseUri.test(text)) {\n return fromBase64(text.substr(RegExp.lastMatch.length))\n }\n\n let encoding = text.match(/data:application\\/json;([^,]+),/)[1]\n throw new Error('Unsupported source map encoding ' + encoding)\n }\n\n getAnnotationURL(sourceMapString) {\n return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, '').trim()\n }\n\n isMap(map) {\n if (typeof map !== 'object') return false\n return (\n typeof map.mappings === 'string' ||\n typeof map._mappings === 'string' ||\n Array.isArray(map.sections)\n )\n }\n\n loadAnnotation(css) {\n let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/gm)\n if (!comments) return\n\n // sourceMappingURLs from comments, strings, etc.\n let start = css.lastIndexOf(comments.pop())\n let end = css.indexOf('*/', start)\n\n if (start > -1 && end > -1) {\n // Locate the last sourceMappingURL to avoid pickin\n this.annotation = this.getAnnotationURL(css.substring(start, end))\n }\n }\n\n loadFile(path) {\n this.root = dirname(path)\n if (existsSync(path)) {\n this.mapFile = path\n return readFileSync(path, 'utf-8').toString().trim()\n }\n }\n\n loadMap(file, prev) {\n if (prev === false) return false\n\n if (prev) {\n if (typeof prev === 'string') {\n return prev\n } else if (typeof prev === 'function') {\n let prevPath = prev(file)\n if (prevPath) {\n let map = this.loadFile(prevPath)\n if (!map) {\n throw new Error(\n 'Unable to load previous source map: ' + prevPath.toString()\n )\n }\n return map\n }\n } else if (prev instanceof SourceMapConsumer) {\n return SourceMapGenerator.fromSourceMap(prev).toString()\n } else if (prev instanceof SourceMapGenerator) {\n return prev.toString()\n } else if (this.isMap(prev)) {\n return JSON.stringify(prev)\n } else {\n throw new Error(\n 'Unsupported previous source map format: ' + prev.toString()\n )\n }\n } else if (this.inline) {\n return this.decodeInline(this.annotation)\n } else if (this.annotation) {\n let map = this.annotation\n if (file) map = join(dirname(file), map)\n return this.loadFile(map)\n }\n }\n\n startWith(string, start) {\n if (!string) return false\n return string.substr(0, start.length) === start\n }\n\n withContent() {\n return !!(\n this.consumer().sourcesContent &&\n this.consumer().sourcesContent.length > 0\n )\n }\n}\n\nmodule.exports = PreviousMap\nPreviousMap.default = PreviousMap\n","'use strict'\n\nlet NoWorkResult = require('./no-work-result')\nlet LazyResult = require('./lazy-result')\nlet Document = require('./document')\nlet Root = require('./root')\n\nclass Processor {\n constructor(plugins = []) {\n this.version = '8.4.38'\n this.plugins = this.normalize(plugins)\n }\n\n normalize(plugins) {\n let normalized = []\n for (let i of plugins) {\n if (i.postcss === true) {\n i = i()\n } else if (i.postcss) {\n i = i.postcss\n }\n\n if (typeof i === 'object' && Array.isArray(i.plugins)) {\n normalized = normalized.concat(i.plugins)\n } else if (typeof i === 'object' && i.postcssPlugin) {\n normalized.push(i)\n } else if (typeof i === 'function') {\n normalized.push(i)\n } else if (typeof i === 'object' && (i.parse || i.stringify)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +\n 'one of the syntax/parser/stringifier options as outlined ' +\n 'in your PostCSS runner documentation.'\n )\n }\n } else {\n throw new Error(i + ' is not a PostCSS plugin')\n }\n }\n return normalized\n }\n\n process(css, opts = {}) {\n if (\n !this.plugins.length &&\n !opts.parser &&\n !opts.stringifier &&\n !opts.syntax\n ) {\n return new NoWorkResult(this, css, opts)\n } else {\n return new LazyResult(this, css, opts)\n }\n }\n\n use(plugin) {\n this.plugins = this.plugins.concat(this.normalize([plugin]))\n return this\n }\n}\n\nmodule.exports = Processor\nProcessor.default = Processor\n\nRoot.registerProcessor(Processor)\nDocument.registerProcessor(Processor)\n","'use strict'\n\nlet Warning = require('./warning')\n\nclass Result {\n constructor(processor, root, opts) {\n this.processor = processor\n this.messages = []\n this.root = root\n this.opts = opts\n this.css = undefined\n this.map = undefined\n }\n\n toString() {\n return this.css\n }\n\n warn(text, opts = {}) {\n if (!opts.plugin) {\n if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n opts.plugin = this.lastPlugin.postcssPlugin\n }\n }\n\n let warning = new Warning(text, opts)\n this.messages.push(warning)\n\n return warning\n }\n\n warnings() {\n return this.messages.filter(i => i.type === 'warning')\n }\n\n get content() {\n return this.css\n }\n}\n\nmodule.exports = Result\nResult.default = Result\n","'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Root extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'root'\n if (!this.nodes) this.nodes = []\n }\n\n normalize(child, sample, type) {\n let nodes = super.normalize(child)\n\n if (sample) {\n if (type === 'prepend') {\n if (this.nodes.length > 1) {\n sample.raws.before = this.nodes[1].raws.before\n } else {\n delete sample.raws.before\n }\n } else if (this.first !== sample) {\n for (let node of nodes) {\n node.raws.before = sample.raws.before\n }\n }\n }\n\n return nodes\n }\n\n removeChild(child, ignore) {\n let index = this.index(child)\n\n if (!ignore && index === 0 && this.nodes.length > 1) {\n this.nodes[1].raws.before = this.nodes[index].raws.before\n }\n\n return super.removeChild(child)\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n return lazy.stringify()\n }\n}\n\nRoot.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nRoot.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Root\nRoot.default = Root\n\nContainer.registerRoot(Root)\n","'use strict'\n\nlet Container = require('./container')\nlet list = require('./list')\n\nclass Rule extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'rule'\n if (!this.nodes) this.nodes = []\n }\n\n get selectors() {\n return list.comma(this.selector)\n }\n\n set selectors(values) {\n let match = this.selector ? this.selector.match(/,\\s*/) : null\n let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')\n this.selector = values.join(sep)\n }\n}\n\nmodule.exports = Rule\nRule.default = Rule\n\nContainer.registerRule(Rule)\n","'use strict'\n\nconst DEFAULT_RAW = {\n after: '\\n',\n beforeClose: '\\n',\n beforeComment: '\\n',\n beforeDecl: '\\n',\n beforeOpen: ' ',\n beforeRule: '\\n',\n colon: ': ',\n commentLeft: ' ',\n commentRight: ' ',\n emptyBody: '',\n indent: ' ',\n semicolon: false\n}\n\nfunction capitalize(str) {\n return str[0].toUpperCase() + str.slice(1)\n}\n\nclass Stringifier {\n constructor(builder) {\n this.builder = builder\n }\n\n atrule(node, semicolon) {\n let name = '@' + node.name\n let params = node.params ? this.rawValue(node, 'params') : ''\n\n if (typeof node.raws.afterName !== 'undefined') {\n name += node.raws.afterName\n } else if (params) {\n name += ' '\n }\n\n if (node.nodes) {\n this.block(node, name + params)\n } else {\n let end = (node.raws.between || '') + (semicolon ? ';' : '')\n this.builder(name + params + end, node)\n }\n }\n\n beforeAfter(node, detect) {\n let value\n if (node.type === 'decl') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (node.type === 'comment') {\n value = this.raw(node, null, 'beforeComment')\n } else if (detect === 'before') {\n value = this.raw(node, null, 'beforeRule')\n } else {\n value = this.raw(node, null, 'beforeClose')\n }\n\n let buf = node.parent\n let depth = 0\n while (buf && buf.type !== 'root') {\n depth += 1\n buf = buf.parent\n }\n\n if (value.includes('\\n')) {\n let indent = this.raw(node, null, 'indent')\n if (indent.length) {\n for (let step = 0; step < depth; step++) value += indent\n }\n }\n\n return value\n }\n\n block(node, start) {\n let between = this.raw(node, 'between', 'beforeOpen')\n this.builder(start + between + '{', node, 'start')\n\n let after\n if (node.nodes && node.nodes.length) {\n this.body(node)\n after = this.raw(node, 'after')\n } else {\n after = this.raw(node, 'after', 'emptyBody')\n }\n\n if (after) this.builder(after)\n this.builder('}', node, 'end')\n }\n\n body(node) {\n let last = node.nodes.length - 1\n while (last > 0) {\n if (node.nodes[last].type !== 'comment') break\n last -= 1\n }\n\n let semicolon = this.raw(node, 'semicolon')\n for (let i = 0; i < node.nodes.length; i++) {\n let child = node.nodes[i]\n let before = this.raw(child, 'before')\n if (before) this.builder(before)\n this.stringify(child, last !== i || semicolon)\n }\n }\n\n comment(node) {\n let left = this.raw(node, 'left', 'commentLeft')\n let right = this.raw(node, 'right', 'commentRight')\n this.builder('/*' + left + node.text + right + '*/', node)\n }\n\n decl(node, semicolon) {\n let between = this.raw(node, 'between', 'colon')\n let string = node.prop + between + this.rawValue(node, 'value')\n\n if (node.important) {\n string += node.raws.important || ' !important'\n }\n\n if (semicolon) string += ';'\n this.builder(string, node)\n }\n\n document(node) {\n this.body(node)\n }\n\n raw(node, own, detect) {\n let value\n if (!detect) detect = own\n\n // Already had\n if (own) {\n value = node.raws[own]\n if (typeof value !== 'undefined') return value\n }\n\n let parent = node.parent\n\n if (detect === 'before') {\n // Hack for first rule in CSS\n if (!parent || (parent.type === 'root' && parent.first === node)) {\n return ''\n }\n\n // `root` nodes in `document` should use only their own raws\n if (parent && parent.type === 'document') {\n return ''\n }\n }\n\n // Floating child without parent\n if (!parent) return DEFAULT_RAW[detect]\n\n // Detect style by other nodes\n let root = node.root()\n if (!root.rawCache) root.rawCache = {}\n if (typeof root.rawCache[detect] !== 'undefined') {\n return root.rawCache[detect]\n }\n\n if (detect === 'before' || detect === 'after') {\n return this.beforeAfter(node, detect)\n } else {\n let method = 'raw' + capitalize(detect)\n if (this[method]) {\n value = this[method](root, node)\n } else {\n root.walk(i => {\n value = i.raws[own]\n if (typeof value !== 'undefined') return false\n })\n }\n }\n\n if (typeof value === 'undefined') value = DEFAULT_RAW[detect]\n\n root.rawCache[detect] = value\n return value\n }\n\n rawBeforeClose(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length > 0) {\n if (typeof i.raws.after !== 'undefined') {\n value = i.raws.after\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawBeforeComment(root, node) {\n let value\n root.walkComments(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeDecl(root, node) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeRule')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeOpen(root) {\n let value\n root.walk(i => {\n if (i.type !== 'decl') {\n value = i.raws.between\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawBeforeRule(root) {\n let value\n root.walk(i => {\n if (i.nodes && (i.parent !== root || root.first !== i)) {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawColon(root) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.between !== 'undefined') {\n value = i.raws.between.replace(/[^\\s:]/g, '')\n return false\n }\n })\n return value\n }\n\n rawEmptyBody(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length === 0) {\n value = i.raws.after\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawIndent(root) {\n if (root.raws.indent) return root.raws.indent\n let value\n root.walk(i => {\n let p = i.parent\n if (p && p !== root && p.parent && p.parent === root) {\n if (typeof i.raws.before !== 'undefined') {\n let parts = i.raws.before.split('\\n')\n value = parts[parts.length - 1]\n value = value.replace(/\\S/g, '')\n return false\n }\n }\n })\n return value\n }\n\n rawSemicolon(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length && i.last.type === 'decl') {\n value = i.raws.semicolon\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawValue(node, prop) {\n let value = node[prop]\n let raw = node.raws[prop]\n if (raw && raw.value === value) {\n return raw.raw\n }\n\n return value\n }\n\n root(node) {\n this.body(node)\n if (node.raws.after) this.builder(node.raws.after)\n }\n\n rule(node) {\n this.block(node, this.rawValue(node, 'selector'))\n if (node.raws.ownSemicolon) {\n this.builder(node.raws.ownSemicolon, node, 'end')\n }\n }\n\n stringify(node, semicolon) {\n /* c8 ignore start */\n if (!this[node.type]) {\n throw new Error(\n 'Unknown AST node type ' +\n node.type +\n '. ' +\n 'Maybe you need to change PostCSS stringifier.'\n )\n }\n /* c8 ignore stop */\n this[node.type](node, semicolon)\n }\n}\n\nmodule.exports = Stringifier\nStringifier.default = Stringifier\n","'use strict'\n\nlet Stringifier = require('./stringifier')\n\nfunction stringify(node, builder) {\n let str = new Stringifier(builder)\n str.stringify(node)\n}\n\nmodule.exports = stringify\nstringify.default = stringify\n","'use strict'\n\nmodule.exports.isClean = Symbol('isClean')\n\nmodule.exports.my = Symbol('my')\n","'use strict'\n\nconst SINGLE_QUOTE = \"'\".charCodeAt(0)\nconst DOUBLE_QUOTE = '\"'.charCodeAt(0)\nconst BACKSLASH = '\\\\'.charCodeAt(0)\nconst SLASH = '/'.charCodeAt(0)\nconst NEWLINE = '\\n'.charCodeAt(0)\nconst SPACE = ' '.charCodeAt(0)\nconst FEED = '\\f'.charCodeAt(0)\nconst TAB = '\\t'.charCodeAt(0)\nconst CR = '\\r'.charCodeAt(0)\nconst OPEN_SQUARE = '['.charCodeAt(0)\nconst CLOSE_SQUARE = ']'.charCodeAt(0)\nconst OPEN_PARENTHESES = '('.charCodeAt(0)\nconst CLOSE_PARENTHESES = ')'.charCodeAt(0)\nconst OPEN_CURLY = '{'.charCodeAt(0)\nconst CLOSE_CURLY = '}'.charCodeAt(0)\nconst SEMICOLON = ';'.charCodeAt(0)\nconst ASTERISK = '*'.charCodeAt(0)\nconst COLON = ':'.charCodeAt(0)\nconst AT = '@'.charCodeAt(0)\n\nconst RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g\nconst RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g\nconst RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/\nconst RE_HEX_ESCAPE = /[\\da-f]/i\n\nmodule.exports = function tokenizer(input, options = {}) {\n let css = input.css.valueOf()\n let ignore = options.ignoreErrors\n\n let code, next, quote, content, escape\n let escaped, escapePos, prev, n, currentToken\n\n let length = css.length\n let pos = 0\n let buffer = []\n let returned = []\n\n function position() {\n return pos\n }\n\n function unclosed(what) {\n throw input.error('Unclosed ' + what, pos)\n }\n\n function endOfFile() {\n return returned.length === 0 && pos >= length\n }\n\n function nextToken(opts) {\n if (returned.length) return returned.pop()\n if (pos >= length) return\n\n let ignoreUnclosed = opts ? opts.ignoreUnclosed : false\n\n code = css.charCodeAt(pos)\n\n switch (code) {\n case NEWLINE:\n case SPACE:\n case TAB:\n case CR:\n case FEED: {\n next = pos\n do {\n next += 1\n code = css.charCodeAt(next)\n } while (\n code === SPACE ||\n code === NEWLINE ||\n code === TAB ||\n code === CR ||\n code === FEED\n )\n\n currentToken = ['space', css.slice(pos, next)]\n pos = next - 1\n break\n }\n\n case OPEN_SQUARE:\n case CLOSE_SQUARE:\n case OPEN_CURLY:\n case CLOSE_CURLY:\n case COLON:\n case SEMICOLON:\n case CLOSE_PARENTHESES: {\n let controlChar = String.fromCharCode(code)\n currentToken = [controlChar, controlChar, pos]\n break\n }\n\n case OPEN_PARENTHESES: {\n prev = buffer.length ? buffer.pop()[1] : ''\n n = css.charCodeAt(pos + 1)\n if (\n prev === 'url' &&\n n !== SINGLE_QUOTE &&\n n !== DOUBLE_QUOTE &&\n n !== SPACE &&\n n !== NEWLINE &&\n n !== TAB &&\n n !== FEED &&\n n !== CR\n ) {\n next = pos\n do {\n escaped = false\n next = css.indexOf(')', next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos\n break\n } else {\n unclosed('bracket')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['brackets', css.slice(pos, next + 1), pos, next]\n\n pos = next\n } else {\n next = css.indexOf(')', pos + 1)\n content = css.slice(pos, next + 1)\n\n if (next === -1 || RE_BAD_BRACKET.test(content)) {\n currentToken = ['(', '(', pos]\n } else {\n currentToken = ['brackets', content, pos, next]\n pos = next\n }\n }\n\n break\n }\n\n case SINGLE_QUOTE:\n case DOUBLE_QUOTE: {\n quote = code === SINGLE_QUOTE ? \"'\" : '\"'\n next = pos\n do {\n escaped = false\n next = css.indexOf(quote, next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos + 1\n break\n } else {\n unclosed('string')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['string', css.slice(pos, next + 1), pos, next]\n pos = next\n break\n }\n\n case AT: {\n RE_AT_END.lastIndex = pos + 1\n RE_AT_END.test(css)\n if (RE_AT_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_AT_END.lastIndex - 2\n }\n\n currentToken = ['at-word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n case BACKSLASH: {\n next = pos\n escape = true\n while (css.charCodeAt(next + 1) === BACKSLASH) {\n next += 1\n escape = !escape\n }\n code = css.charCodeAt(next + 1)\n if (\n escape &&\n code !== SLASH &&\n code !== SPACE &&\n code !== NEWLINE &&\n code !== TAB &&\n code !== CR &&\n code !== FEED\n ) {\n next += 1\n if (RE_HEX_ESCAPE.test(css.charAt(next))) {\n while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {\n next += 1\n }\n if (css.charCodeAt(next + 1) === SPACE) {\n next += 1\n }\n }\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n default: {\n if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n next = css.indexOf('*/', pos + 2) + 1\n if (next === 0) {\n if (ignore || ignoreUnclosed) {\n next = css.length\n } else {\n unclosed('comment')\n }\n }\n\n currentToken = ['comment', css.slice(pos, next + 1), pos, next]\n pos = next\n } else {\n RE_WORD_END.lastIndex = pos + 1\n RE_WORD_END.test(css)\n if (RE_WORD_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_WORD_END.lastIndex - 2\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n buffer.push(currentToken)\n pos = next\n }\n\n break\n }\n }\n\n pos++\n return currentToken\n }\n\n function back(token) {\n returned.push(token)\n }\n\n return {\n back,\n endOfFile,\n nextToken,\n position\n }\n}\n","/* eslint-disable no-console */\n'use strict'\n\nlet printed = {}\n\nmodule.exports = function warnOnce(message) {\n if (printed[message]) return\n printed[message] = true\n\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message)\n }\n}\n","'use strict'\n\nclass Warning {\n constructor(text, opts = {}) {\n this.type = 'warning'\n this.text = text\n\n if (opts.node && opts.node.source) {\n let range = opts.node.rangeBy(opts)\n this.line = range.start.line\n this.column = range.start.column\n this.endLine = range.end.line\n this.endColumn = range.end.column\n }\n\n for (let opt in opts) this[opt] = opts[opt]\n }\n\n toString() {\n if (this.node) {\n return this.node.error(this.text, {\n index: this.index,\n plugin: this.plugin,\n word: this.word\n }).message\n }\n\n if (this.plugin) {\n return this.plugin + ': ' + this.text\n }\n\n return this.text\n }\n}\n\nmodule.exports = Warning\nWarning.default = Warning\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = { __proto__: null };\n\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(\n parseArrayValue(part.slice(pos + 1), options),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n if (has.call(obj, key)) {\n obj[key] = utils.combine(obj[key], val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (!options.parseArrays && cleanRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== cleanRoot\n && String(index) === cleanRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else if (cleanRoot !== '__proto__') {\n obj[cleanRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n return {\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n if (options.allowSparse === true) {\n return obj;\n }\n\n return utils.compact(obj);\n};\n","'use strict';\n\nvar getSideChannel = require('side-channel');\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n charset: 'utf-8',\n charsetSentinel: false,\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar sentinel = {};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n sideChannel\n) {\n var obj = object;\n\n var tmpSc = sideChannel;\n var step = 0;\n var findFlag = false;\n while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {\n // Where object last appeared in the ref tree\n var pos = tmpSc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n } else {\n findFlag = true; // Break while\n }\n }\n if (typeof tmpSc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n obj = utils.maybeMap(obj, encoder);\n }\n objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;\n\n for (var j = 0; j < objKeys.length; ++j) {\n var key = objKeys[j];\n var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix\n : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');\n\n sideChannel.set(object, step);\n var valueSideChannel = getSideChannel();\n valueSideChannel.set(sentinel, sideChannel);\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n valueSideChannel\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (opts && opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if (opts && 'indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n var sideChannel = getSideChannel();\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (options.skipNulls && obj[key] === null) {\n continue;\n }\n pushToArray(keys, stringify(\n obj[key],\n key,\n generateArrayPrefix,\n commaRoundTrip,\n options.strictNullHandling,\n options.skipNulls,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.format,\n options.formatter,\n options.encodeValuesOnly,\n options.charset,\n sideChannel\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar formats = require('./formats');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, decoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n /* eslint operator-linebreak: [2, \"before\"] */\n out += hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Quill\"] = factory();\n\telse\n\t\troot[\"Quill\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 109);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar container_1 = __webpack_require__(17);\nvar format_1 = __webpack_require__(18);\nvar leaf_1 = __webpack_require__(19);\nvar scroll_1 = __webpack_require__(45);\nvar inline_1 = __webpack_require__(46);\nvar block_1 = __webpack_require__(47);\nvar embed_1 = __webpack_require__(48);\nvar text_1 = __webpack_require__(49);\nvar attributor_1 = __webpack_require__(12);\nvar class_1 = __webpack_require__(32);\nvar style_1 = __webpack_require__(33);\nvar store_1 = __webpack_require__(31);\nvar Registry = __webpack_require__(1);\nvar Parchment = {\n Scope: Registry.Scope,\n create: Registry.create,\n find: Registry.find,\n query: Registry.query,\n register: Registry.register,\n Container: container_1.default,\n Format: format_1.default,\n Leaf: leaf_1.default,\n Embed: embed_1.default,\n Scroll: scroll_1.default,\n Block: block_1.default,\n Inline: inline_1.default,\n Text: text_1.default,\n Attributor: {\n Attribute: attributor_1.default,\n Class: class_1.default,\n Style: style_1.default,\n Store: store_1.default,\n },\n};\nexports.default = Parchment;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ParchmentError = /** @class */ (function (_super) {\n __extends(ParchmentError, _super);\n function ParchmentError(message) {\n var _this = this;\n message = '[Parchment] ' + message;\n _this = _super.call(this, message) || this;\n _this.message = message;\n _this.name = _this.constructor.name;\n return _this;\n }\n return ParchmentError;\n}(Error));\nexports.ParchmentError = ParchmentError;\nvar attributes = {};\nvar classes = {};\nvar tags = {};\nvar types = {};\nexports.DATA_KEY = '__blot';\nvar Scope;\n(function (Scope) {\n Scope[Scope[\"TYPE\"] = 3] = \"TYPE\";\n Scope[Scope[\"LEVEL\"] = 12] = \"LEVEL\";\n Scope[Scope[\"ATTRIBUTE\"] = 13] = \"ATTRIBUTE\";\n Scope[Scope[\"BLOT\"] = 14] = \"BLOT\";\n Scope[Scope[\"INLINE\"] = 7] = \"INLINE\";\n Scope[Scope[\"BLOCK\"] = 11] = \"BLOCK\";\n Scope[Scope[\"BLOCK_BLOT\"] = 10] = \"BLOCK_BLOT\";\n Scope[Scope[\"INLINE_BLOT\"] = 6] = \"INLINE_BLOT\";\n Scope[Scope[\"BLOCK_ATTRIBUTE\"] = 9] = \"BLOCK_ATTRIBUTE\";\n Scope[Scope[\"INLINE_ATTRIBUTE\"] = 5] = \"INLINE_ATTRIBUTE\";\n Scope[Scope[\"ANY\"] = 15] = \"ANY\";\n})(Scope = exports.Scope || (exports.Scope = {}));\nfunction create(input, value) {\n var match = query(input);\n if (match == null) {\n throw new ParchmentError(\"Unable to create \" + input + \" blot\");\n }\n var BlotClass = match;\n var node = \n // @ts-ignore\n input instanceof Node || input['nodeType'] === Node.TEXT_NODE ? input : BlotClass.create(value);\n return new BlotClass(node, value);\n}\nexports.create = create;\nfunction find(node, bubble) {\n if (bubble === void 0) { bubble = false; }\n if (node == null)\n return null;\n // @ts-ignore\n if (node[exports.DATA_KEY] != null)\n return node[exports.DATA_KEY].blot;\n if (bubble)\n return find(node.parentNode, bubble);\n return null;\n}\nexports.find = find;\nfunction query(query, scope) {\n if (scope === void 0) { scope = Scope.ANY; }\n var match;\n if (typeof query === 'string') {\n match = types[query] || attributes[query];\n // @ts-ignore\n }\n else if (query instanceof Text || query['nodeType'] === Node.TEXT_NODE) {\n match = types['text'];\n }\n else if (typeof query === 'number') {\n if (query & Scope.LEVEL & Scope.BLOCK) {\n match = types['block'];\n }\n else if (query & Scope.LEVEL & Scope.INLINE) {\n match = types['inline'];\n }\n }\n else if (query instanceof HTMLElement) {\n var names = (query.getAttribute('class') || '').split(/\\s+/);\n for (var i in names) {\n match = classes[names[i]];\n if (match)\n break;\n }\n match = match || tags[query.tagName];\n }\n if (match == null)\n return null;\n // @ts-ignore\n if (scope & Scope.LEVEL & match.scope && scope & Scope.TYPE & match.scope)\n return match;\n return null;\n}\nexports.query = query;\nfunction register() {\n var Definitions = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n Definitions[_i] = arguments[_i];\n }\n if (Definitions.length > 1) {\n return Definitions.map(function (d) {\n return register(d);\n });\n }\n var Definition = Definitions[0];\n if (typeof Definition.blotName !== 'string' && typeof Definition.attrName !== 'string') {\n throw new ParchmentError('Invalid definition');\n }\n else if (Definition.blotName === 'abstract') {\n throw new ParchmentError('Cannot register abstract class');\n }\n types[Definition.blotName || Definition.attrName] = Definition;\n if (typeof Definition.keyName === 'string') {\n attributes[Definition.keyName] = Definition;\n }\n else {\n if (Definition.className != null) {\n classes[Definition.className] = Definition;\n }\n if (Definition.tagName != null) {\n if (Array.isArray(Definition.tagName)) {\n Definition.tagName = Definition.tagName.map(function (tagName) {\n return tagName.toUpperCase();\n });\n }\n else {\n Definition.tagName = Definition.tagName.toUpperCase();\n }\n var tagNames = Array.isArray(Definition.tagName) ? Definition.tagName : [Definition.tagName];\n tagNames.forEach(function (tag) {\n if (tags[tag] == null || Definition.className == null) {\n tags[tag] = Definition;\n }\n });\n }\n }\n return Definition;\n}\nexports.register = register;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar diff = __webpack_require__(51);\nvar equal = __webpack_require__(11);\nvar extend = __webpack_require__(3);\nvar op = __webpack_require__(20);\n\n\nvar NULL_CHARACTER = String.fromCharCode(0); // Placeholder char for embed in diff()\n\n\nvar Delta = function (ops) {\n // Assume we are given a well formed ops\n if (Array.isArray(ops)) {\n this.ops = ops;\n } else if (ops != null && Array.isArray(ops.ops)) {\n this.ops = ops.ops;\n } else {\n this.ops = [];\n }\n};\n\n\nDelta.prototype.insert = function (text, attributes) {\n var newOp = {};\n if (text.length === 0) return this;\n newOp.insert = text;\n if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {\n newOp.attributes = attributes;\n }\n return this.push(newOp);\n};\n\nDelta.prototype['delete'] = function (length) {\n if (length <= 0) return this;\n return this.push({ 'delete': length });\n};\n\nDelta.prototype.retain = function (length, attributes) {\n if (length <= 0) return this;\n var newOp = { retain: length };\n if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {\n newOp.attributes = attributes;\n }\n return this.push(newOp);\n};\n\nDelta.prototype.push = function (newOp) {\n var index = this.ops.length;\n var lastOp = this.ops[index - 1];\n newOp = extend(true, {}, newOp);\n if (typeof lastOp === 'object') {\n if (typeof newOp['delete'] === 'number' && typeof lastOp['delete'] === 'number') {\n this.ops[index - 1] = { 'delete': lastOp['delete'] + newOp['delete'] };\n return this;\n }\n // Since it does not matter if we insert before or after deleting at the same index,\n // always prefer to insert first\n if (typeof lastOp['delete'] === 'number' && newOp.insert != null) {\n index -= 1;\n lastOp = this.ops[index - 1];\n if (typeof lastOp !== 'object') {\n this.ops.unshift(newOp);\n return this;\n }\n }\n if (equal(newOp.attributes, lastOp.attributes)) {\n if (typeof newOp.insert === 'string' && typeof lastOp.insert === 'string') {\n this.ops[index - 1] = { insert: lastOp.insert + newOp.insert };\n if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes\n return this;\n } else if (typeof newOp.retain === 'number' && typeof lastOp.retain === 'number') {\n this.ops[index - 1] = { retain: lastOp.retain + newOp.retain };\n if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes\n return this;\n }\n }\n }\n if (index === this.ops.length) {\n this.ops.push(newOp);\n } else {\n this.ops.splice(index, 0, newOp);\n }\n return this;\n};\n\nDelta.prototype.chop = function () {\n var lastOp = this.ops[this.ops.length - 1];\n if (lastOp && lastOp.retain && !lastOp.attributes) {\n this.ops.pop();\n }\n return this;\n};\n\nDelta.prototype.filter = function (predicate) {\n return this.ops.filter(predicate);\n};\n\nDelta.prototype.forEach = function (predicate) {\n this.ops.forEach(predicate);\n};\n\nDelta.prototype.map = function (predicate) {\n return this.ops.map(predicate);\n};\n\nDelta.prototype.partition = function (predicate) {\n var passed = [], failed = [];\n this.forEach(function(op) {\n var target = predicate(op) ? passed : failed;\n target.push(op);\n });\n return [passed, failed];\n};\n\nDelta.prototype.reduce = function (predicate, initial) {\n return this.ops.reduce(predicate, initial);\n};\n\nDelta.prototype.changeLength = function () {\n return this.reduce(function (length, elem) {\n if (elem.insert) {\n return length + op.length(elem);\n } else if (elem.delete) {\n return length - elem.delete;\n }\n return length;\n }, 0);\n};\n\nDelta.prototype.length = function () {\n return this.reduce(function (length, elem) {\n return length + op.length(elem);\n }, 0);\n};\n\nDelta.prototype.slice = function (start, end) {\n start = start || 0;\n if (typeof end !== 'number') end = Infinity;\n var ops = [];\n var iter = op.iterator(this.ops);\n var index = 0;\n while (index < end && iter.hasNext()) {\n var nextOp;\n if (index < start) {\n nextOp = iter.next(start - index);\n } else {\n nextOp = iter.next(end - index);\n ops.push(nextOp);\n }\n index += op.length(nextOp);\n }\n return new Delta(ops);\n};\n\n\nDelta.prototype.compose = function (other) {\n var thisIter = op.iterator(this.ops);\n var otherIter = op.iterator(other.ops);\n var ops = [];\n var firstOther = otherIter.peek();\n if (firstOther != null && typeof firstOther.retain === 'number' && firstOther.attributes == null) {\n var firstLeft = firstOther.retain;\n while (thisIter.peekType() === 'insert' && thisIter.peekLength() <= firstLeft) {\n firstLeft -= thisIter.peekLength();\n ops.push(thisIter.next());\n }\n if (firstOther.retain - firstLeft > 0) {\n otherIter.next(firstOther.retain - firstLeft);\n }\n }\n var delta = new Delta(ops);\n while (thisIter.hasNext() || otherIter.hasNext()) {\n if (otherIter.peekType() === 'insert') {\n delta.push(otherIter.next());\n } else if (thisIter.peekType() === 'delete') {\n delta.push(thisIter.next());\n } else {\n var length = Math.min(thisIter.peekLength(), otherIter.peekLength());\n var thisOp = thisIter.next(length);\n var otherOp = otherIter.next(length);\n if (typeof otherOp.retain === 'number') {\n var newOp = {};\n if (typeof thisOp.retain === 'number') {\n newOp.retain = length;\n } else {\n newOp.insert = thisOp.insert;\n }\n // Preserve null when composing with a retain, otherwise remove it for inserts\n var attributes = op.attributes.compose(thisOp.attributes, otherOp.attributes, typeof thisOp.retain === 'number');\n if (attributes) newOp.attributes = attributes;\n delta.push(newOp);\n\n // Optimization if rest of other is just retain\n if (!otherIter.hasNext() && equal(delta.ops[delta.ops.length - 1], newOp)) {\n var rest = new Delta(thisIter.rest());\n return delta.concat(rest).chop();\n }\n\n // Other op should be delete, we could be an insert or retain\n // Insert + delete cancels out\n } else if (typeof otherOp['delete'] === 'number' && typeof thisOp.retain === 'number') {\n delta.push(otherOp);\n }\n }\n }\n return delta.chop();\n};\n\nDelta.prototype.concat = function (other) {\n var delta = new Delta(this.ops.slice());\n if (other.ops.length > 0) {\n delta.push(other.ops[0]);\n delta.ops = delta.ops.concat(other.ops.slice(1));\n }\n return delta;\n};\n\nDelta.prototype.diff = function (other, index) {\n if (this.ops === other.ops) {\n return new Delta();\n }\n var strings = [this, other].map(function (delta) {\n return delta.map(function (op) {\n if (op.insert != null) {\n return typeof op.insert === 'string' ? op.insert : NULL_CHARACTER;\n }\n var prep = (delta === other) ? 'on' : 'with';\n throw new Error('diff() called ' + prep + ' non-document');\n }).join('');\n });\n var delta = new Delta();\n var diffResult = diff(strings[0], strings[1], index);\n var thisIter = op.iterator(this.ops);\n var otherIter = op.iterator(other.ops);\n diffResult.forEach(function (component) {\n var length = component[1].length;\n while (length > 0) {\n var opLength = 0;\n switch (component[0]) {\n case diff.INSERT:\n opLength = Math.min(otherIter.peekLength(), length);\n delta.push(otherIter.next(opLength));\n break;\n case diff.DELETE:\n opLength = Math.min(length, thisIter.peekLength());\n thisIter.next(opLength);\n delta['delete'](opLength);\n break;\n case diff.EQUAL:\n opLength = Math.min(thisIter.peekLength(), otherIter.peekLength(), length);\n var thisOp = thisIter.next(opLength);\n var otherOp = otherIter.next(opLength);\n if (equal(thisOp.insert, otherOp.insert)) {\n delta.retain(opLength, op.attributes.diff(thisOp.attributes, otherOp.attributes));\n } else {\n delta.push(otherOp)['delete'](opLength);\n }\n break;\n }\n length -= opLength;\n }\n });\n return delta.chop();\n};\n\nDelta.prototype.eachLine = function (predicate, newline) {\n newline = newline || '\\n';\n var iter = op.iterator(this.ops);\n var line = new Delta();\n var i = 0;\n while (iter.hasNext()) {\n if (iter.peekType() !== 'insert') return;\n var thisOp = iter.peek();\n var start = op.length(thisOp) - iter.peekLength();\n var index = typeof thisOp.insert === 'string' ?\n thisOp.insert.indexOf(newline, start) - start : -1;\n if (index < 0) {\n line.push(iter.next());\n } else if (index > 0) {\n line.push(iter.next(index));\n } else {\n if (predicate(line, iter.next(1).attributes || {}, i) === false) {\n return;\n }\n i += 1;\n line = new Delta();\n }\n }\n if (line.length() > 0) {\n predicate(line, {}, i);\n }\n};\n\nDelta.prototype.transform = function (other, priority) {\n priority = !!priority;\n if (typeof other === 'number') {\n return this.transformPosition(other, priority);\n }\n var thisIter = op.iterator(this.ops);\n var otherIter = op.iterator(other.ops);\n var delta = new Delta();\n while (thisIter.hasNext() || otherIter.hasNext()) {\n if (thisIter.peekType() === 'insert' && (priority || otherIter.peekType() !== 'insert')) {\n delta.retain(op.length(thisIter.next()));\n } else if (otherIter.peekType() === 'insert') {\n delta.push(otherIter.next());\n } else {\n var length = Math.min(thisIter.peekLength(), otherIter.peekLength());\n var thisOp = thisIter.next(length);\n var otherOp = otherIter.next(length);\n if (thisOp['delete']) {\n // Our delete either makes their delete redundant or removes their retain\n continue;\n } else if (otherOp['delete']) {\n delta.push(otherOp);\n } else {\n // We retain either their retain or insert\n delta.retain(length, op.attributes.transform(thisOp.attributes, otherOp.attributes, priority));\n }\n }\n }\n return delta.chop();\n};\n\nDelta.prototype.transformPosition = function (index, priority) {\n priority = !!priority;\n var thisIter = op.iterator(this.ops);\n var offset = 0;\n while (thisIter.hasNext() && offset <= index) {\n var length = thisIter.peekLength();\n var nextType = thisIter.peekType();\n thisIter.next();\n if (nextType === 'delete') {\n index -= Math.min(length, index - offset);\n continue;\n } else if (nextType === 'insert' && (offset < index || !priority)) {\n index += length;\n }\n offset += length;\n }\n return index;\n};\n\n\nmodule.exports = Delta;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar defineProperty = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\n// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target\nvar setProperty = function setProperty(target, options) {\n\tif (defineProperty && options.name === '__proto__') {\n\t\tdefineProperty(target, options.name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tvalue: options.newValue,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\ttarget[options.name] = options.newValue;\n\t}\n};\n\n// Return undefined instead of __proto__ if '__proto__' is not an own property\nvar getProperty = function getProperty(obj, name) {\n\tif (name === '__proto__') {\n\t\tif (!hasOwn.call(obj, name)) {\n\t\t\treturn void 0;\n\t\t} else if (gOPD) {\n\t\t\t// In early versions of node, obj['__proto__'] is buggy when obj has\n\t\t\t// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.\n\t\t\treturn gOPD(obj, name).value;\n\t\t}\n\t}\n\n\treturn obj[name];\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = getProperty(target, name);\n\t\t\t\tcopy = getProperty(options, name);\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: extend(deep, clone, copy) });\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: copy });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.BlockEmbed = exports.bubbleFormats = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar NEWLINE_LENGTH = 1;\n\nvar BlockEmbed = function (_Parchment$Embed) {\n _inherits(BlockEmbed, _Parchment$Embed);\n\n function BlockEmbed() {\n _classCallCheck(this, BlockEmbed);\n\n return _possibleConstructorReturn(this, (BlockEmbed.__proto__ || Object.getPrototypeOf(BlockEmbed)).apply(this, arguments));\n }\n\n _createClass(BlockEmbed, [{\n key: 'attach',\n value: function attach() {\n _get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'attach', this).call(this);\n this.attributes = new _parchment2.default.Attributor.Store(this.domNode);\n }\n }, {\n key: 'delta',\n value: function delta() {\n return new _quillDelta2.default().insert(this.value(), (0, _extend2.default)(this.formats(), this.attributes.values()));\n }\n }, {\n key: 'format',\n value: function format(name, value) {\n var attribute = _parchment2.default.query(name, _parchment2.default.Scope.BLOCK_ATTRIBUTE);\n if (attribute != null) {\n this.attributes.attribute(attribute, value);\n }\n }\n }, {\n key: 'formatAt',\n value: function formatAt(index, length, name, value) {\n this.format(name, value);\n }\n }, {\n key: 'insertAt',\n value: function insertAt(index, value, def) {\n if (typeof value === 'string' && value.endsWith('\\n')) {\n var block = _parchment2.default.create(Block.blotName);\n this.parent.insertBefore(block, index === 0 ? this : this.next);\n block.insertAt(0, value.slice(0, -1));\n } else {\n _get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'insertAt', this).call(this, index, value, def);\n }\n }\n }]);\n\n return BlockEmbed;\n}(_parchment2.default.Embed);\n\nBlockEmbed.scope = _parchment2.default.Scope.BLOCK_BLOT;\n// It is important for cursor behavior BlockEmbeds use tags that are block level elements\n\n\nvar Block = function (_Parchment$Block) {\n _inherits(Block, _Parchment$Block);\n\n function Block(domNode) {\n _classCallCheck(this, Block);\n\n var _this2 = _possibleConstructorReturn(this, (Block.__proto__ || Object.getPrototypeOf(Block)).call(this, domNode));\n\n _this2.cache = {};\n return _this2;\n }\n\n _createClass(Block, [{\n key: 'delta',\n value: function delta() {\n if (this.cache.delta == null) {\n this.cache.delta = this.descendants(_parchment2.default.Leaf).reduce(function (delta, leaf) {\n if (leaf.length() === 0) {\n return delta;\n } else {\n return delta.insert(leaf.value(), bubbleFormats(leaf));\n }\n }, new _quillDelta2.default()).insert('\\n', bubbleFormats(this));\n }\n return this.cache.delta;\n }\n }, {\n key: 'deleteAt',\n value: function deleteAt(index, length) {\n _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'deleteAt', this).call(this, index, length);\n this.cache = {};\n }\n }, {\n key: 'formatAt',\n value: function formatAt(index, length, name, value) {\n if (length <= 0) return;\n if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {\n if (index + length === this.length()) {\n this.format(name, value);\n }\n } else {\n _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'formatAt', this).call(this, index, Math.min(length, this.length() - index - 1), name, value);\n }\n this.cache = {};\n }\n }, {\n key: 'insertAt',\n value: function insertAt(index, value, def) {\n if (def != null) return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, index, value, def);\n if (value.length === 0) return;\n var lines = value.split('\\n');\n var text = lines.shift();\n if (text.length > 0) {\n if (index < this.length() - 1 || this.children.tail == null) {\n _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, Math.min(index, this.length() - 1), text);\n } else {\n this.children.tail.insertAt(this.children.tail.length(), text);\n }\n this.cache = {};\n }\n var block = this;\n lines.reduce(function (index, line) {\n block = block.split(index, true);\n block.insertAt(0, line);\n return line.length;\n }, index + text.length);\n }\n }, {\n key: 'insertBefore',\n value: function insertBefore(blot, ref) {\n var head = this.children.head;\n _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertBefore', this).call(this, blot, ref);\n if (head instanceof _break2.default) {\n head.remove();\n }\n this.cache = {};\n }\n }, {\n key: 'length',\n value: function length() {\n if (this.cache.length == null) {\n this.cache.length = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'length', this).call(this) + NEWLINE_LENGTH;\n }\n return this.cache.length;\n }\n }, {\n key: 'moveChildren',\n value: function moveChildren(target, ref) {\n _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'moveChildren', this).call(this, target, ref);\n this.cache = {};\n }\n }, {\n key: 'optimize',\n value: function optimize(context) {\n _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'optimize', this).call(this, context);\n this.cache = {};\n }\n }, {\n key: 'path',\n value: function path(index) {\n return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'path', this).call(this, index, true);\n }\n }, {\n key: 'removeChild',\n value: function removeChild(child) {\n _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'removeChild', this).call(this, child);\n this.cache = {};\n }\n }, {\n key: 'split',\n value: function split(index) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) {\n var clone = this.clone();\n if (index === 0) {\n this.parent.insertBefore(clone, this);\n return this;\n } else {\n this.parent.insertBefore(clone, this.next);\n return clone;\n }\n } else {\n var next = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'split', this).call(this, index, force);\n this.cache = {};\n return next;\n }\n }\n }]);\n\n return Block;\n}(_parchment2.default.Block);\n\nBlock.blotName = 'block';\nBlock.tagName = 'P';\nBlock.defaultChild = 'break';\nBlock.allowedChildren = [_inline2.default, _parchment2.default.Embed, _text2.default];\n\nfunction bubbleFormats(blot) {\n var formats = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (blot == null) return formats;\n if (typeof blot.formats === 'function') {\n formats = (0, _extend2.default)(formats, blot.formats());\n }\n if (blot.parent == null || blot.parent.blotName == 'scroll' || blot.parent.statics.scope !== blot.statics.scope) {\n return formats;\n }\n return bubbleFormats(blot.parent, formats);\n}\n\nexports.bubbleFormats = bubbleFormats;\nexports.BlockEmbed = BlockEmbed;\nexports.default = Block;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.overload = exports.expandConfig = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n__webpack_require__(50);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _editor = __webpack_require__(14);\n\nvar _editor2 = _interopRequireDefault(_editor);\n\nvar _emitter3 = __webpack_require__(8);\n\nvar _emitter4 = _interopRequireDefault(_emitter3);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _selection = __webpack_require__(15);\n\nvar _selection2 = _interopRequireDefault(_selection);\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _theme = __webpack_require__(34);\n\nvar _theme2 = _interopRequireDefault(_theme);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar debug = (0, _logger2.default)('quill');\n\nvar Quill = function () {\n _createClass(Quill, null, [{\n key: 'debug',\n value: function debug(limit) {\n if (limit === true) {\n limit = 'log';\n }\n _logger2.default.level(limit);\n }\n }, {\n key: 'find',\n value: function find(node) {\n return node.__quill || _parchment2.default.find(node);\n }\n }, {\n key: 'import',\n value: function _import(name) {\n if (this.imports[name] == null) {\n debug.error('Cannot import ' + name + '. Are you sure it was registered?');\n }\n return this.imports[name];\n }\n }, {\n key: 'register',\n value: function register(path, target) {\n var _this = this;\n\n var overwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n if (typeof path !== 'string') {\n var name = path.attrName || path.blotName;\n if (typeof name === 'string') {\n // register(Blot | Attributor, overwrite)\n this.register('formats/' + name, path, target);\n } else {\n Object.keys(path).forEach(function (key) {\n _this.register(key, path[key], target);\n });\n }\n } else {\n if (this.imports[path] != null && !overwrite) {\n debug.warn('Overwriting ' + path + ' with', target);\n }\n this.imports[path] = target;\n if ((path.startsWith('blots/') || path.startsWith('formats/')) && target.blotName !== 'abstract') {\n _parchment2.default.register(target);\n } else if (path.startsWith('modules') && typeof target.register === 'function') {\n target.register();\n }\n }\n }\n }]);\n\n function Quill(container) {\n var _this2 = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Quill);\n\n this.options = expandConfig(container, options);\n this.container = this.options.container;\n if (this.container == null) {\n return debug.error('Invalid Quill container', container);\n }\n if (this.options.debug) {\n Quill.debug(this.options.debug);\n }\n var html = this.container.innerHTML.trim();\n this.container.classList.add('ql-container');\n this.container.innerHTML = '';\n this.container.__quill = this;\n this.root = this.addContainer('ql-editor');\n this.root.classList.add('ql-blank');\n this.root.setAttribute('data-gramm', false);\n this.scrollingContainer = this.options.scrollingContainer || this.root;\n this.emitter = new _emitter4.default();\n this.scroll = _parchment2.default.create(this.root, {\n emitter: this.emitter,\n whitelist: this.options.formats\n });\n this.editor = new _editor2.default(this.scroll);\n this.selection = new _selection2.default(this.scroll, this.emitter);\n this.theme = new this.options.theme(this, this.options);\n this.keyboard = this.theme.addModule('keyboard');\n this.clipboard = this.theme.addModule('clipboard');\n this.history = this.theme.addModule('history');\n this.theme.init();\n this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type) {\n if (type === _emitter4.default.events.TEXT_CHANGE) {\n _this2.root.classList.toggle('ql-blank', _this2.editor.isBlank());\n }\n });\n this.emitter.on(_emitter4.default.events.SCROLL_UPDATE, function (source, mutations) {\n var range = _this2.selection.lastRange;\n var index = range && range.length === 0 ? range.index : undefined;\n modify.call(_this2, function () {\n return _this2.editor.update(null, mutations, index);\n }, source);\n });\n var contents = this.clipboard.convert('
' + html + '


');\n this.setContents(contents);\n this.history.clear();\n if (this.options.placeholder) {\n this.root.setAttribute('data-placeholder', this.options.placeholder);\n }\n if (this.options.readOnly) {\n this.disable();\n }\n }\n\n _createClass(Quill, [{\n key: 'addContainer',\n value: function addContainer(container) {\n var refNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if (typeof container === 'string') {\n var className = container;\n container = document.createElement('div');\n container.classList.add(className);\n }\n this.container.insertBefore(container, refNode);\n return container;\n }\n }, {\n key: 'blur',\n value: function blur() {\n this.selection.setRange(null);\n }\n }, {\n key: 'deleteText',\n value: function deleteText(index, length, source) {\n var _this3 = this;\n\n var _overload = overload(index, length, source);\n\n var _overload2 = _slicedToArray(_overload, 4);\n\n index = _overload2[0];\n length = _overload2[1];\n source = _overload2[3];\n\n return modify.call(this, function () {\n return _this3.editor.deleteText(index, length);\n }, source, index, -1 * length);\n }\n }, {\n key: 'disable',\n value: function disable() {\n this.enable(false);\n }\n }, {\n key: 'enable',\n value: function enable() {\n var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n this.scroll.enable(enabled);\n this.container.classList.toggle('ql-disabled', !enabled);\n }\n }, {\n key: 'focus',\n value: function focus() {\n var scrollTop = this.scrollingContainer.scrollTop;\n this.selection.focus();\n this.scrollingContainer.scrollTop = scrollTop;\n this.scrollIntoView();\n }\n }, {\n key: 'format',\n value: function format(name, value) {\n var _this4 = this;\n\n var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;\n\n return modify.call(this, function () {\n var range = _this4.getSelection(true);\n var change = new _quillDelta2.default();\n if (range == null) {\n return change;\n } else if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {\n change = _this4.editor.formatLine(range.index, range.length, _defineProperty({}, name, value));\n } else if (range.length === 0) {\n _this4.selection.format(name, value);\n return change;\n } else {\n change = _this4.editor.formatText(range.index, range.length, _defineProperty({}, name, value));\n }\n _this4.setSelection(range, _emitter4.default.sources.SILENT);\n return change;\n }, source);\n }\n }, {\n key: 'formatLine',\n value: function formatLine(index, length, name, value, source) {\n var _this5 = this;\n\n var formats = void 0;\n\n var _overload3 = overload(index, length, name, value, source);\n\n var _overload4 = _slicedToArray(_overload3, 4);\n\n index = _overload4[0];\n length = _overload4[1];\n formats = _overload4[2];\n source = _overload4[3];\n\n return modify.call(this, function () {\n return _this5.editor.formatLine(index, length, formats);\n }, source, index, 0);\n }\n }, {\n key: 'formatText',\n value: function formatText(index, length, name, value, source) {\n var _this6 = this;\n\n var formats = void 0;\n\n var _overload5 = overload(index, length, name, value, source);\n\n var _overload6 = _slicedToArray(_overload5, 4);\n\n index = _overload6[0];\n length = _overload6[1];\n formats = _overload6[2];\n source = _overload6[3];\n\n return modify.call(this, function () {\n return _this6.editor.formatText(index, length, formats);\n }, source, index, 0);\n }\n }, {\n key: 'getBounds',\n value: function getBounds(index) {\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n var bounds = void 0;\n if (typeof index === 'number') {\n bounds = this.selection.getBounds(index, length);\n } else {\n bounds = this.selection.getBounds(index.index, index.length);\n }\n var containerBounds = this.container.getBoundingClientRect();\n return {\n bottom: bounds.bottom - containerBounds.top,\n height: bounds.height,\n left: bounds.left - containerBounds.left,\n right: bounds.right - containerBounds.left,\n top: bounds.top - containerBounds.top,\n width: bounds.width\n };\n }\n }, {\n key: 'getContents',\n value: function getContents() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;\n\n var _overload7 = overload(index, length);\n\n var _overload8 = _slicedToArray(_overload7, 2);\n\n index = _overload8[0];\n length = _overload8[1];\n\n return this.editor.getContents(index, length);\n }\n }, {\n key: 'getFormat',\n value: function getFormat() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getSelection(true);\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n if (typeof index === 'number') {\n return this.editor.getFormat(index, length);\n } else {\n return this.editor.getFormat(index.index, index.length);\n }\n }\n }, {\n key: 'getIndex',\n value: function getIndex(blot) {\n return blot.offset(this.scroll);\n }\n }, {\n key: 'getLength',\n value: function getLength() {\n return this.scroll.length();\n }\n }, {\n key: 'getLeaf',\n value: function getLeaf(index) {\n return this.scroll.leaf(index);\n }\n }, {\n key: 'getLine',\n value: function getLine(index) {\n return this.scroll.line(index);\n }\n }, {\n key: 'getLines',\n value: function getLines() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;\n\n if (typeof index !== 'number') {\n return this.scroll.lines(index.index, index.length);\n } else {\n return this.scroll.lines(index, length);\n }\n }\n }, {\n key: 'getModule',\n value: function getModule(name) {\n return this.theme.modules[name];\n }\n }, {\n key: 'getSelection',\n value: function getSelection() {\n var focus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (focus) this.focus();\n this.update(); // Make sure we access getRange with editor in consistent state\n return this.selection.getRange()[0];\n }\n }, {\n key: 'getText',\n value: function getText() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;\n\n var _overload9 = overload(index, length);\n\n var _overload10 = _slicedToArray(_overload9, 2);\n\n index = _overload10[0];\n length = _overload10[1];\n\n return this.editor.getText(index, length);\n }\n }, {\n key: 'hasFocus',\n value: function hasFocus() {\n return this.selection.hasFocus();\n }\n }, {\n key: 'insertEmbed',\n value: function insertEmbed(index, embed, value) {\n var _this7 = this;\n\n var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Quill.sources.API;\n\n return modify.call(this, function () {\n return _this7.editor.insertEmbed(index, embed, value);\n }, source, index);\n }\n }, {\n key: 'insertText',\n value: function insertText(index, text, name, value, source) {\n var _this8 = this;\n\n var formats = void 0;\n\n var _overload11 = overload(index, 0, name, value, source);\n\n var _overload12 = _slicedToArray(_overload11, 4);\n\n index = _overload12[0];\n formats = _overload12[2];\n source = _overload12[3];\n\n return modify.call(this, function () {\n return _this8.editor.insertText(index, text, formats);\n }, source, index, text.length);\n }\n }, {\n key: 'isEnabled',\n value: function isEnabled() {\n return !this.container.classList.contains('ql-disabled');\n }\n }, {\n key: 'off',\n value: function off() {\n return this.emitter.off.apply(this.emitter, arguments);\n }\n }, {\n key: 'on',\n value: function on() {\n return this.emitter.on.apply(this.emitter, arguments);\n }\n }, {\n key: 'once',\n value: function once() {\n return this.emitter.once.apply(this.emitter, arguments);\n }\n }, {\n key: 'pasteHTML',\n value: function pasteHTML(index, html, source) {\n this.clipboard.dangerouslyPasteHTML(index, html, source);\n }\n }, {\n key: 'removeFormat',\n value: function removeFormat(index, length, source) {\n var _this9 = this;\n\n var _overload13 = overload(index, length, source);\n\n var _overload14 = _slicedToArray(_overload13, 4);\n\n index = _overload14[0];\n length = _overload14[1];\n source = _overload14[3];\n\n return modify.call(this, function () {\n return _this9.editor.removeFormat(index, length);\n }, source, index);\n }\n }, {\n key: 'scrollIntoView',\n value: function scrollIntoView() {\n this.selection.scrollIntoView(this.scrollingContainer);\n }\n }, {\n key: 'setContents',\n value: function setContents(delta) {\n var _this10 = this;\n\n var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;\n\n return modify.call(this, function () {\n delta = new _quillDelta2.default(delta);\n var length = _this10.getLength();\n var deleted = _this10.editor.deleteText(0, length);\n var applied = _this10.editor.applyDelta(delta);\n var lastOp = applied.ops[applied.ops.length - 1];\n if (lastOp != null && typeof lastOp.insert === 'string' && lastOp.insert[lastOp.insert.length - 1] === '\\n') {\n _this10.editor.deleteText(_this10.getLength() - 1, 1);\n applied.delete(1);\n }\n var ret = deleted.compose(applied);\n return ret;\n }, source);\n }\n }, {\n key: 'setSelection',\n value: function setSelection(index, length, source) {\n if (index == null) {\n this.selection.setRange(null, length || Quill.sources.API);\n } else {\n var _overload15 = overload(index, length, source);\n\n var _overload16 = _slicedToArray(_overload15, 4);\n\n index = _overload16[0];\n length = _overload16[1];\n source = _overload16[3];\n\n this.selection.setRange(new _selection.Range(index, length), source);\n if (source !== _emitter4.default.sources.SILENT) {\n this.selection.scrollIntoView(this.scrollingContainer);\n }\n }\n }\n }, {\n key: 'setText',\n value: function setText(text) {\n var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;\n\n var delta = new _quillDelta2.default().insert(text);\n return this.setContents(delta, source);\n }\n }, {\n key: 'update',\n value: function update() {\n var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;\n\n var change = this.scroll.update(source); // Will update selection before selection.update() does if text changes\n this.selection.update(source);\n return change;\n }\n }, {\n key: 'updateContents',\n value: function updateContents(delta) {\n var _this11 = this;\n\n var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;\n\n return modify.call(this, function () {\n delta = new _quillDelta2.default(delta);\n return _this11.editor.applyDelta(delta, source);\n }, source, true);\n }\n }]);\n\n return Quill;\n}();\n\nQuill.DEFAULTS = {\n bounds: null,\n formats: null,\n modules: {},\n placeholder: '',\n readOnly: false,\n scrollingContainer: null,\n strict: true,\n theme: 'default'\n};\nQuill.events = _emitter4.default.events;\nQuill.sources = _emitter4.default.sources;\n// eslint-disable-next-line no-undef\nQuill.version = false ? 'dev' : \"1.3.7\";\n\nQuill.imports = {\n 'delta': _quillDelta2.default,\n 'parchment': _parchment2.default,\n 'core/module': _module2.default,\n 'core/theme': _theme2.default\n};\n\nfunction expandConfig(container, userConfig) {\n userConfig = (0, _extend2.default)(true, {\n container: container,\n modules: {\n clipboard: true,\n keyboard: true,\n history: true\n }\n }, userConfig);\n if (!userConfig.theme || userConfig.theme === Quill.DEFAULTS.theme) {\n userConfig.theme = _theme2.default;\n } else {\n userConfig.theme = Quill.import('themes/' + userConfig.theme);\n if (userConfig.theme == null) {\n throw new Error('Invalid theme ' + userConfig.theme + '. Did you register it?');\n }\n }\n var themeConfig = (0, _extend2.default)(true, {}, userConfig.theme.DEFAULTS);\n [themeConfig, userConfig].forEach(function (config) {\n config.modules = config.modules || {};\n Object.keys(config.modules).forEach(function (module) {\n if (config.modules[module] === true) {\n config.modules[module] = {};\n }\n });\n });\n var moduleNames = Object.keys(themeConfig.modules).concat(Object.keys(userConfig.modules));\n var moduleConfig = moduleNames.reduce(function (config, name) {\n var moduleClass = Quill.import('modules/' + name);\n if (moduleClass == null) {\n debug.error('Cannot load ' + name + ' module. Are you sure you registered it?');\n } else {\n config[name] = moduleClass.DEFAULTS || {};\n }\n return config;\n }, {});\n // Special case toolbar shorthand\n if (userConfig.modules != null && userConfig.modules.toolbar && userConfig.modules.toolbar.constructor !== Object) {\n userConfig.modules.toolbar = {\n container: userConfig.modules.toolbar\n };\n }\n userConfig = (0, _extend2.default)(true, {}, Quill.DEFAULTS, { modules: moduleConfig }, themeConfig, userConfig);\n ['bounds', 'container', 'scrollingContainer'].forEach(function (key) {\n if (typeof userConfig[key] === 'string') {\n userConfig[key] = document.querySelector(userConfig[key]);\n }\n });\n userConfig.modules = Object.keys(userConfig.modules).reduce(function (config, name) {\n if (userConfig.modules[name]) {\n config[name] = userConfig.modules[name];\n }\n return config;\n }, {});\n return userConfig;\n}\n\n// Handle selection preservation and TEXT_CHANGE emission\n// common to modification APIs\nfunction modify(modifier, source, index, shift) {\n if (this.options.strict && !this.isEnabled() && source === _emitter4.default.sources.USER) {\n return new _quillDelta2.default();\n }\n var range = index == null ? null : this.getSelection();\n var oldDelta = this.editor.delta;\n var change = modifier();\n if (range != null) {\n if (index === true) index = range.index;\n if (shift == null) {\n range = shiftRange(range, change, source);\n } else if (shift !== 0) {\n range = shiftRange(range, index, shift, source);\n }\n this.setSelection(range, _emitter4.default.sources.SILENT);\n }\n if (change.length() > 0) {\n var _emitter;\n\n var args = [_emitter4.default.events.TEXT_CHANGE, change, oldDelta, source];\n (_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));\n if (source !== _emitter4.default.sources.SILENT) {\n var _emitter2;\n\n (_emitter2 = this.emitter).emit.apply(_emitter2, args);\n }\n }\n return change;\n}\n\nfunction overload(index, length, name, value, source) {\n var formats = {};\n if (typeof index.index === 'number' && typeof index.length === 'number') {\n // Allow for throwaway end (used by insertText/insertEmbed)\n if (typeof length !== 'number') {\n source = value, value = name, name = length, length = index.length, index = index.index;\n } else {\n length = index.length, index = index.index;\n }\n } else if (typeof length !== 'number') {\n source = value, value = name, name = length, length = 0;\n }\n // Handle format being object, two format name/value strings or excluded\n if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n formats = name;\n source = value;\n } else if (typeof name === 'string') {\n if (value != null) {\n formats[name] = value;\n } else {\n source = name;\n }\n }\n // Handle optional source\n source = source || _emitter4.default.sources.API;\n return [index, length, formats, source];\n}\n\nfunction shiftRange(range, index, length, source) {\n if (range == null) return null;\n var start = void 0,\n end = void 0;\n if (index instanceof _quillDelta2.default) {\n var _map = [range.index, range.index + range.length].map(function (pos) {\n return index.transformPosition(pos, source !== _emitter4.default.sources.USER);\n });\n\n var _map2 = _slicedToArray(_map, 2);\n\n start = _map2[0];\n end = _map2[1];\n } else {\n var _map3 = [range.index, range.index + range.length].map(function (pos) {\n if (pos < index || pos === index && source === _emitter4.default.sources.USER) return pos;\n if (length >= 0) {\n return pos + length;\n } else {\n return Math.max(index, pos + length);\n }\n });\n\n var _map4 = _slicedToArray(_map3, 2);\n\n start = _map4[0];\n end = _map4[1];\n }\n return new _selection.Range(start, end - start);\n}\n\nexports.expandConfig = expandConfig;\nexports.overload = overload;\nexports.default = Quill;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Inline = function (_Parchment$Inline) {\n _inherits(Inline, _Parchment$Inline);\n\n function Inline() {\n _classCallCheck(this, Inline);\n\n return _possibleConstructorReturn(this, (Inline.__proto__ || Object.getPrototypeOf(Inline)).apply(this, arguments));\n }\n\n _createClass(Inline, [{\n key: 'formatAt',\n value: function formatAt(index, length, name, value) {\n if (Inline.compare(this.statics.blotName, name) < 0 && _parchment2.default.query(name, _parchment2.default.Scope.BLOT)) {\n var blot = this.isolate(index, length);\n if (value) {\n blot.wrap(name, value);\n }\n } else {\n _get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'formatAt', this).call(this, index, length, name, value);\n }\n }\n }, {\n key: 'optimize',\n value: function optimize(context) {\n _get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'optimize', this).call(this, context);\n if (this.parent instanceof Inline && Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) {\n var parent = this.parent.isolate(this.offset(), this.length());\n this.moveChildren(parent);\n parent.wrap(this);\n }\n }\n }], [{\n key: 'compare',\n value: function compare(self, other) {\n var selfIndex = Inline.order.indexOf(self);\n var otherIndex = Inline.order.indexOf(other);\n if (selfIndex >= 0 || otherIndex >= 0) {\n return selfIndex - otherIndex;\n } else if (self === other) {\n return 0;\n } else if (self < other) {\n return -1;\n } else {\n return 1;\n }\n }\n }]);\n\n return Inline;\n}(_parchment2.default.Inline);\n\nInline.allowedChildren = [Inline, _parchment2.default.Embed, _text2.default];\n// Lower index means deeper in the DOM tree, since not found (-1) is for embeds\nInline.order = ['cursor', 'inline', // Must be lower\n'underline', 'strike', 'italic', 'bold', 'script', 'link', 'code' // Must be higher\n];\n\nexports.default = Inline;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TextBlot = function (_Parchment$Text) {\n _inherits(TextBlot, _Parchment$Text);\n\n function TextBlot() {\n _classCallCheck(this, TextBlot);\n\n return _possibleConstructorReturn(this, (TextBlot.__proto__ || Object.getPrototypeOf(TextBlot)).apply(this, arguments));\n }\n\n return TextBlot;\n}(_parchment2.default.Text);\n\nexports.default = TextBlot;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _eventemitter = __webpack_require__(54);\n\nvar _eventemitter2 = _interopRequireDefault(_eventemitter);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:events');\n\nvar EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click'];\n\nEVENTS.forEach(function (eventName) {\n document.addEventListener(eventName, function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n [].slice.call(document.querySelectorAll('.ql-container')).forEach(function (node) {\n // TODO use WeakMap\n if (node.__quill && node.__quill.emitter) {\n var _node$__quill$emitter;\n\n (_node$__quill$emitter = node.__quill.emitter).handleDOM.apply(_node$__quill$emitter, args);\n }\n });\n });\n});\n\nvar Emitter = function (_EventEmitter) {\n _inherits(Emitter, _EventEmitter);\n\n function Emitter() {\n _classCallCheck(this, Emitter);\n\n var _this = _possibleConstructorReturn(this, (Emitter.__proto__ || Object.getPrototypeOf(Emitter)).call(this));\n\n _this.listeners = {};\n _this.on('error', debug.error);\n return _this;\n }\n\n _createClass(Emitter, [{\n key: 'emit',\n value: function emit() {\n debug.log.apply(debug, arguments);\n _get(Emitter.prototype.__proto__ || Object.getPrototypeOf(Emitter.prototype), 'emit', this).apply(this, arguments);\n }\n }, {\n key: 'handleDOM',\n value: function handleDOM(event) {\n for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n (this.listeners[event.type] || []).forEach(function (_ref) {\n var node = _ref.node,\n handler = _ref.handler;\n\n if (event.target === node || node.contains(event.target)) {\n handler.apply(undefined, [event].concat(args));\n }\n });\n }\n }, {\n key: 'listenDOM',\n value: function listenDOM(eventName, node, handler) {\n if (!this.listeners[eventName]) {\n this.listeners[eventName] = [];\n }\n this.listeners[eventName].push({ node: node, handler: handler });\n }\n }]);\n\n return Emitter;\n}(_eventemitter2.default);\n\nEmitter.events = {\n EDITOR_CHANGE: 'editor-change',\n SCROLL_BEFORE_UPDATE: 'scroll-before-update',\n SCROLL_OPTIMIZE: 'scroll-optimize',\n SCROLL_UPDATE: 'scroll-update',\n SELECTION_CHANGE: 'selection-change',\n TEXT_CHANGE: 'text-change'\n};\nEmitter.sources = {\n API: 'api',\n SILENT: 'silent',\n USER: 'user'\n};\n\nexports.default = Emitter;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Module = function Module(quill) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Module);\n\n this.quill = quill;\n this.options = options;\n};\n\nModule.DEFAULTS = {};\n\nexports.default = Module;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar levels = ['error', 'warn', 'log', 'info'];\nvar level = 'warn';\n\nfunction debug(method) {\n if (levels.indexOf(method) <= levels.indexOf(level)) {\n var _console;\n\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n (_console = console)[method].apply(_console, args); // eslint-disable-line no-console\n }\n}\n\nfunction namespace(ns) {\n return levels.reduce(function (logger, method) {\n logger[method] = debug.bind(console, method, ns);\n return logger;\n }, {});\n}\n\ndebug.level = namespace.level = function (newLevel) {\n level = newLevel;\n};\n\nexports.default = namespace;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar pSlice = Array.prototype.slice;\nvar objectKeys = __webpack_require__(52);\nvar isArguments = __webpack_require__(53);\n\nvar deepEqual = module.exports = function (actual, expected, opts) {\n if (!opts) opts = {};\n // 7.1. All identical values are equivalent, as determined by ===.\n if (actual === expected) {\n return true;\n\n } else if (actual instanceof Date && expected instanceof Date) {\n return actual.getTime() === expected.getTime();\n\n // 7.3. Other pairs that do not both pass typeof value == 'object',\n // equivalence is determined by ==.\n } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {\n return opts.strict ? actual === expected : actual == expected;\n\n // 7.4. For all other Object pairs, including Array objects, equivalence is\n // determined by having the same number of owned properties (as verified\n // with Object.prototype.hasOwnProperty.call), the same set of keys\n // (although not necessarily the same order), equivalent values for every\n // corresponding key, and an identical 'prototype' property. Note: this\n // accounts for both named and indexed properties on Arrays.\n } else {\n return objEquiv(actual, expected, opts);\n }\n}\n\nfunction isUndefinedOrNull(value) {\n return value === null || value === undefined;\n}\n\nfunction isBuffer (x) {\n if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;\n if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {\n return false;\n }\n if (x.length > 0 && typeof x[0] !== 'number') return false;\n return true;\n}\n\nfunction objEquiv(a, b, opts) {\n var i, key;\n if (isUndefinedOrNull(a) || isUndefinedOrNull(b))\n return false;\n // an identical 'prototype' property.\n if (a.prototype !== b.prototype) return false;\n //~~~I've managed to break Object.keys through screwy arguments passing.\n // Converting to array solves the problem.\n if (isArguments(a)) {\n if (!isArguments(b)) {\n return false;\n }\n a = pSlice.call(a);\n b = pSlice.call(b);\n return deepEqual(a, b, opts);\n }\n if (isBuffer(a)) {\n if (!isBuffer(b)) {\n return false;\n }\n if (a.length !== b.length) return false;\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false;\n }\n return true;\n }\n try {\n var ka = objectKeys(a),\n kb = objectKeys(b);\n } catch (e) {//happens when one is a string literal and the other isn't\n return false;\n }\n // having the same number of owned properties (keys incorporates\n // hasOwnProperty)\n if (ka.length != kb.length)\n return false;\n //the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n //~~~cheap key test\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] != kb[i])\n return false;\n }\n //equivalent values for every corresponding key, and\n //~~~possibly expensive deep test\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], opts)) return false;\n }\n return typeof a === typeof b;\n}\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Registry = __webpack_require__(1);\nvar Attributor = /** @class */ (function () {\n function Attributor(attrName, keyName, options) {\n if (options === void 0) { options = {}; }\n this.attrName = attrName;\n this.keyName = keyName;\n var attributeBit = Registry.Scope.TYPE & Registry.Scope.ATTRIBUTE;\n if (options.scope != null) {\n // Ignore type bits, force attribute bit\n this.scope = (options.scope & Registry.Scope.LEVEL) | attributeBit;\n }\n else {\n this.scope = Registry.Scope.ATTRIBUTE;\n }\n if (options.whitelist != null)\n this.whitelist = options.whitelist;\n }\n Attributor.keys = function (node) {\n return [].map.call(node.attributes, function (item) {\n return item.name;\n });\n };\n Attributor.prototype.add = function (node, value) {\n if (!this.canAdd(node, value))\n return false;\n node.setAttribute(this.keyName, value);\n return true;\n };\n Attributor.prototype.canAdd = function (node, value) {\n var match = Registry.query(node, Registry.Scope.BLOT & (this.scope | Registry.Scope.TYPE));\n if (match == null)\n return false;\n if (this.whitelist == null)\n return true;\n if (typeof value === 'string') {\n return this.whitelist.indexOf(value.replace(/[\"']/g, '')) > -1;\n }\n else {\n return this.whitelist.indexOf(value) > -1;\n }\n };\n Attributor.prototype.remove = function (node) {\n node.removeAttribute(this.keyName);\n };\n Attributor.prototype.value = function (node) {\n var value = node.getAttribute(this.keyName);\n if (this.canAdd(node, value) && value) {\n return value;\n }\n return '';\n };\n return Attributor;\n}());\nexports.default = Attributor;\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.Code = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Code = function (_Inline) {\n _inherits(Code, _Inline);\n\n function Code() {\n _classCallCheck(this, Code);\n\n return _possibleConstructorReturn(this, (Code.__proto__ || Object.getPrototypeOf(Code)).apply(this, arguments));\n }\n\n return Code;\n}(_inline2.default);\n\nCode.blotName = 'code';\nCode.tagName = 'CODE';\n\nvar CodeBlock = function (_Block) {\n _inherits(CodeBlock, _Block);\n\n function CodeBlock() {\n _classCallCheck(this, CodeBlock);\n\n return _possibleConstructorReturn(this, (CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock)).apply(this, arguments));\n }\n\n _createClass(CodeBlock, [{\n key: 'delta',\n value: function delta() {\n var _this3 = this;\n\n var text = this.domNode.textContent;\n if (text.endsWith('\\n')) {\n // Should always be true\n text = text.slice(0, -1);\n }\n return text.split('\\n').reduce(function (delta, frag) {\n return delta.insert(frag).insert('\\n', _this3.formats());\n }, new _quillDelta2.default());\n }\n }, {\n key: 'format',\n value: function format(name, value) {\n if (name === this.statics.blotName && value) return;\n\n var _descendant = this.descendant(_text2.default, this.length() - 1),\n _descendant2 = _slicedToArray(_descendant, 1),\n text = _descendant2[0];\n\n if (text != null) {\n text.deleteAt(text.length() - 1, 1);\n }\n _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'format', this).call(this, name, value);\n }\n }, {\n key: 'formatAt',\n value: function formatAt(index, length, name, value) {\n if (length === 0) return;\n if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK) == null || name === this.statics.blotName && value === this.statics.formats(this.domNode)) {\n return;\n }\n var nextNewline = this.newlineIndex(index);\n if (nextNewline < 0 || nextNewline >= index + length) return;\n var prevNewline = this.newlineIndex(index, true) + 1;\n var isolateLength = nextNewline - prevNewline + 1;\n var blot = this.isolate(prevNewline, isolateLength);\n var next = blot.next;\n blot.format(name, value);\n if (next instanceof CodeBlock) {\n next.formatAt(0, index - prevNewline + length - isolateLength, name, value);\n }\n }\n }, {\n key: 'insertAt',\n value: function insertAt(index, value, def) {\n if (def != null) return;\n\n var _descendant3 = this.descendant(_text2.default, index),\n _descendant4 = _slicedToArray(_descendant3, 2),\n text = _descendant4[0],\n offset = _descendant4[1];\n\n text.insertAt(offset, value);\n }\n }, {\n key: 'length',\n value: function length() {\n var length = this.domNode.textContent.length;\n if (!this.domNode.textContent.endsWith('\\n')) {\n return length + 1;\n }\n return length;\n }\n }, {\n key: 'newlineIndex',\n value: function newlineIndex(searchIndex) {\n var reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!reverse) {\n var offset = this.domNode.textContent.slice(searchIndex).indexOf('\\n');\n return offset > -1 ? searchIndex + offset : -1;\n } else {\n return this.domNode.textContent.slice(0, searchIndex).lastIndexOf('\\n');\n }\n }\n }, {\n key: 'optimize',\n value: function optimize(context) {\n if (!this.domNode.textContent.endsWith('\\n')) {\n this.appendChild(_parchment2.default.create('text', '\\n'));\n }\n _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'optimize', this).call(this, context);\n var next = this.next;\n if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && this.statics.formats(this.domNode) === next.statics.formats(next.domNode)) {\n next.optimize(context);\n next.moveChildren(this);\n next.remove();\n }\n }\n }, {\n key: 'replace',\n value: function replace(target) {\n _get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'replace', this).call(this, target);\n [].slice.call(this.domNode.querySelectorAll('*')).forEach(function (node) {\n var blot = _parchment2.default.find(node);\n if (blot == null) {\n node.parentNode.removeChild(node);\n } else if (blot instanceof _parchment2.default.Embed) {\n blot.remove();\n } else {\n blot.unwrap();\n }\n });\n }\n }], [{\n key: 'create',\n value: function create(value) {\n var domNode = _get(CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock), 'create', this).call(this, value);\n domNode.setAttribute('spellcheck', false);\n return domNode;\n }\n }, {\n key: 'formats',\n value: function formats() {\n return true;\n }\n }]);\n\n return CodeBlock;\n}(_block2.default);\n\nCodeBlock.blotName = 'code-block';\nCodeBlock.tagName = 'PRE';\nCodeBlock.TAB = ' ';\n\nexports.Code = Code;\nexports.default = CodeBlock;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _op = __webpack_require__(20);\n\nvar _op2 = _interopRequireDefault(_op);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _cursor = __webpack_require__(24);\n\nvar _cursor2 = _interopRequireDefault(_cursor);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _clone = __webpack_require__(21);\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nvar _deepEqual = __webpack_require__(11);\n\nvar _deepEqual2 = _interopRequireDefault(_deepEqual);\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ASCII = /^[ -~]*$/;\n\nvar Editor = function () {\n function Editor(scroll) {\n _classCallCheck(this, Editor);\n\n this.scroll = scroll;\n this.delta = this.getDelta();\n }\n\n _createClass(Editor, [{\n key: 'applyDelta',\n value: function applyDelta(delta) {\n var _this = this;\n\n var consumeNextNewline = false;\n this.scroll.update();\n var scrollLength = this.scroll.length();\n this.scroll.batchStart();\n delta = normalizeDelta(delta);\n delta.reduce(function (index, op) {\n var length = op.retain || op.delete || op.insert.length || 1;\n var attributes = op.attributes || {};\n if (op.insert != null) {\n if (typeof op.insert === 'string') {\n var text = op.insert;\n if (text.endsWith('\\n') && consumeNextNewline) {\n consumeNextNewline = false;\n text = text.slice(0, -1);\n }\n if (index >= scrollLength && !text.endsWith('\\n')) {\n consumeNextNewline = true;\n }\n _this.scroll.insertAt(index, text);\n\n var _scroll$line = _this.scroll.line(index),\n _scroll$line2 = _slicedToArray(_scroll$line, 2),\n line = _scroll$line2[0],\n offset = _scroll$line2[1];\n\n var formats = (0, _extend2.default)({}, (0, _block.bubbleFormats)(line));\n if (line instanceof _block2.default) {\n var _line$descendant = line.descendant(_parchment2.default.Leaf, offset),\n _line$descendant2 = _slicedToArray(_line$descendant, 1),\n leaf = _line$descendant2[0];\n\n formats = (0, _extend2.default)(formats, (0, _block.bubbleFormats)(leaf));\n }\n attributes = _op2.default.attributes.diff(formats, attributes) || {};\n } else if (_typeof(op.insert) === 'object') {\n var key = Object.keys(op.insert)[0]; // There should only be one key\n if (key == null) return index;\n _this.scroll.insertAt(index, key, op.insert[key]);\n }\n scrollLength += length;\n }\n Object.keys(attributes).forEach(function (name) {\n _this.scroll.formatAt(index, length, name, attributes[name]);\n });\n return index + length;\n }, 0);\n delta.reduce(function (index, op) {\n if (typeof op.delete === 'number') {\n _this.scroll.deleteAt(index, op.delete);\n return index;\n }\n return index + (op.retain || op.insert.length || 1);\n }, 0);\n this.scroll.batchEnd();\n return this.update(delta);\n }\n }, {\n key: 'deleteText',\n value: function deleteText(index, length) {\n this.scroll.deleteAt(index, length);\n return this.update(new _quillDelta2.default().retain(index).delete(length));\n }\n }, {\n key: 'formatLine',\n value: function formatLine(index, length) {\n var _this2 = this;\n\n var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n this.scroll.update();\n Object.keys(formats).forEach(function (format) {\n if (_this2.scroll.whitelist != null && !_this2.scroll.whitelist[format]) return;\n var lines = _this2.scroll.lines(index, Math.max(length, 1));\n var lengthRemaining = length;\n lines.forEach(function (line) {\n var lineLength = line.length();\n if (!(line instanceof _code2.default)) {\n line.format(format, formats[format]);\n } else {\n var codeIndex = index - line.offset(_this2.scroll);\n var codeLength = line.newlineIndex(codeIndex + lengthRemaining) - codeIndex + 1;\n line.formatAt(codeIndex, codeLength, format, formats[format]);\n }\n lengthRemaining -= lineLength;\n });\n });\n this.scroll.optimize();\n return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));\n }\n }, {\n key: 'formatText',\n value: function formatText(index, length) {\n var _this3 = this;\n\n var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n Object.keys(formats).forEach(function (format) {\n _this3.scroll.formatAt(index, length, format, formats[format]);\n });\n return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));\n }\n }, {\n key: 'getContents',\n value: function getContents(index, length) {\n return this.delta.slice(index, index + length);\n }\n }, {\n key: 'getDelta',\n value: function getDelta() {\n return this.scroll.lines().reduce(function (delta, line) {\n return delta.concat(line.delta());\n }, new _quillDelta2.default());\n }\n }, {\n key: 'getFormat',\n value: function getFormat(index) {\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n var lines = [],\n leaves = [];\n if (length === 0) {\n this.scroll.path(index).forEach(function (path) {\n var _path = _slicedToArray(path, 1),\n blot = _path[0];\n\n if (blot instanceof _block2.default) {\n lines.push(blot);\n } else if (blot instanceof _parchment2.default.Leaf) {\n leaves.push(blot);\n }\n });\n } else {\n lines = this.scroll.lines(index, length);\n leaves = this.scroll.descendants(_parchment2.default.Leaf, index, length);\n }\n var formatsArr = [lines, leaves].map(function (blots) {\n if (blots.length === 0) return {};\n var formats = (0, _block.bubbleFormats)(blots.shift());\n while (Object.keys(formats).length > 0) {\n var blot = blots.shift();\n if (blot == null) return formats;\n formats = combineFormats((0, _block.bubbleFormats)(blot), formats);\n }\n return formats;\n });\n return _extend2.default.apply(_extend2.default, formatsArr);\n }\n }, {\n key: 'getText',\n value: function getText(index, length) {\n return this.getContents(index, length).filter(function (op) {\n return typeof op.insert === 'string';\n }).map(function (op) {\n return op.insert;\n }).join('');\n }\n }, {\n key: 'insertEmbed',\n value: function insertEmbed(index, embed, value) {\n this.scroll.insertAt(index, embed, value);\n return this.update(new _quillDelta2.default().retain(index).insert(_defineProperty({}, embed, value)));\n }\n }, {\n key: 'insertText',\n value: function insertText(index, text) {\n var _this4 = this;\n\n var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n text = text.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n this.scroll.insertAt(index, text);\n Object.keys(formats).forEach(function (format) {\n _this4.scroll.formatAt(index, text.length, format, formats[format]);\n });\n return this.update(new _quillDelta2.default().retain(index).insert(text, (0, _clone2.default)(formats)));\n }\n }, {\n key: 'isBlank',\n value: function isBlank() {\n if (this.scroll.children.length == 0) return true;\n if (this.scroll.children.length > 1) return false;\n var block = this.scroll.children.head;\n if (block.statics.blotName !== _block2.default.blotName) return false;\n if (block.children.length > 1) return false;\n return block.children.head instanceof _break2.default;\n }\n }, {\n key: 'removeFormat',\n value: function removeFormat(index, length) {\n var text = this.getText(index, length);\n\n var _scroll$line3 = this.scroll.line(index + length),\n _scroll$line4 = _slicedToArray(_scroll$line3, 2),\n line = _scroll$line4[0],\n offset = _scroll$line4[1];\n\n var suffixLength = 0,\n suffix = new _quillDelta2.default();\n if (line != null) {\n if (!(line instanceof _code2.default)) {\n suffixLength = line.length() - offset;\n } else {\n suffixLength = line.newlineIndex(offset) - offset + 1;\n }\n suffix = line.delta().slice(offset, offset + suffixLength - 1).insert('\\n');\n }\n var contents = this.getContents(index, length + suffixLength);\n var diff = contents.diff(new _quillDelta2.default().insert(text).concat(suffix));\n var delta = new _quillDelta2.default().retain(index).concat(diff);\n return this.applyDelta(delta);\n }\n }, {\n key: 'update',\n value: function update(change) {\n var mutations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var cursorIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n\n var oldDelta = this.delta;\n if (mutations.length === 1 && mutations[0].type === 'characterData' && mutations[0].target.data.match(ASCII) && _parchment2.default.find(mutations[0].target)) {\n // Optimization for character changes\n var textBlot = _parchment2.default.find(mutations[0].target);\n var formats = (0, _block.bubbleFormats)(textBlot);\n var index = textBlot.offset(this.scroll);\n var oldValue = mutations[0].oldValue.replace(_cursor2.default.CONTENTS, '');\n var oldText = new _quillDelta2.default().insert(oldValue);\n var newText = new _quillDelta2.default().insert(textBlot.value());\n var diffDelta = new _quillDelta2.default().retain(index).concat(oldText.diff(newText, cursorIndex));\n change = diffDelta.reduce(function (delta, op) {\n if (op.insert) {\n return delta.insert(op.insert, formats);\n } else {\n return delta.push(op);\n }\n }, new _quillDelta2.default());\n this.delta = oldDelta.compose(change);\n } else {\n this.delta = this.getDelta();\n if (!change || !(0, _deepEqual2.default)(oldDelta.compose(change), this.delta)) {\n change = oldDelta.diff(this.delta, cursorIndex);\n }\n }\n return change;\n }\n }]);\n\n return Editor;\n}();\n\nfunction combineFormats(formats, combined) {\n return Object.keys(combined).reduce(function (merged, name) {\n if (formats[name] == null) return merged;\n if (combined[name] === formats[name]) {\n merged[name] = combined[name];\n } else if (Array.isArray(combined[name])) {\n if (combined[name].indexOf(formats[name]) < 0) {\n merged[name] = combined[name].concat([formats[name]]);\n }\n } else {\n merged[name] = [combined[name], formats[name]];\n }\n return merged;\n }, {});\n}\n\nfunction normalizeDelta(delta) {\n return delta.reduce(function (delta, op) {\n if (op.insert === 1) {\n var attributes = (0, _clone2.default)(op.attributes);\n delete attributes['image'];\n return delta.insert({ image: op.attributes.image }, attributes);\n }\n if (op.attributes != null && (op.attributes.list === true || op.attributes.bullet === true)) {\n op = (0, _clone2.default)(op);\n if (op.attributes.list) {\n op.attributes.list = 'ordered';\n } else {\n op.attributes.list = 'bullet';\n delete op.attributes.bullet;\n }\n }\n if (typeof op.insert === 'string') {\n var text = op.insert.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n return delta.insert(text, op.attributes);\n }\n return delta.push(op);\n }, new _quillDelta2.default());\n}\n\nexports.default = Editor;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.Range = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _clone = __webpack_require__(21);\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nvar _deepEqual = __webpack_require__(11);\n\nvar _deepEqual2 = _interopRequireDefault(_deepEqual);\n\nvar _emitter3 = __webpack_require__(8);\n\nvar _emitter4 = _interopRequireDefault(_emitter3);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar debug = (0, _logger2.default)('quill:selection');\n\nvar Range = function Range(index) {\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n _classCallCheck(this, Range);\n\n this.index = index;\n this.length = length;\n};\n\nvar Selection = function () {\n function Selection(scroll, emitter) {\n var _this = this;\n\n _classCallCheck(this, Selection);\n\n this.emitter = emitter;\n this.scroll = scroll;\n this.composing = false;\n this.mouseDown = false;\n this.root = this.scroll.domNode;\n this.cursor = _parchment2.default.create('cursor', this);\n // savedRange is last non-null range\n this.lastRange = this.savedRange = new Range(0, 0);\n this.handleComposition();\n this.handleDragging();\n this.emitter.listenDOM('selectionchange', document, function () {\n if (!_this.mouseDown) {\n setTimeout(_this.update.bind(_this, _emitter4.default.sources.USER), 1);\n }\n });\n this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type, delta) {\n if (type === _emitter4.default.events.TEXT_CHANGE && delta.length() > 0) {\n _this.update(_emitter4.default.sources.SILENT);\n }\n });\n this.emitter.on(_emitter4.default.events.SCROLL_BEFORE_UPDATE, function () {\n if (!_this.hasFocus()) return;\n var native = _this.getNativeRange();\n if (native == null) return;\n if (native.start.node === _this.cursor.textNode) return; // cursor.restore() will handle\n // TODO unclear if this has negative side effects\n _this.emitter.once(_emitter4.default.events.SCROLL_UPDATE, function () {\n try {\n _this.setNativeRange(native.start.node, native.start.offset, native.end.node, native.end.offset);\n } catch (ignored) {}\n });\n });\n this.emitter.on(_emitter4.default.events.SCROLL_OPTIMIZE, function (mutations, context) {\n if (context.range) {\n var _context$range = context.range,\n startNode = _context$range.startNode,\n startOffset = _context$range.startOffset,\n endNode = _context$range.endNode,\n endOffset = _context$range.endOffset;\n\n _this.setNativeRange(startNode, startOffset, endNode, endOffset);\n }\n });\n this.update(_emitter4.default.sources.SILENT);\n }\n\n _createClass(Selection, [{\n key: 'handleComposition',\n value: function handleComposition() {\n var _this2 = this;\n\n this.root.addEventListener('compositionstart', function () {\n _this2.composing = true;\n });\n this.root.addEventListener('compositionend', function () {\n _this2.composing = false;\n if (_this2.cursor.parent) {\n var range = _this2.cursor.restore();\n if (!range) return;\n setTimeout(function () {\n _this2.setNativeRange(range.startNode, range.startOffset, range.endNode, range.endOffset);\n }, 1);\n }\n });\n }\n }, {\n key: 'handleDragging',\n value: function handleDragging() {\n var _this3 = this;\n\n this.emitter.listenDOM('mousedown', document.body, function () {\n _this3.mouseDown = true;\n });\n this.emitter.listenDOM('mouseup', document.body, function () {\n _this3.mouseDown = false;\n _this3.update(_emitter4.default.sources.USER);\n });\n }\n }, {\n key: 'focus',\n value: function focus() {\n if (this.hasFocus()) return;\n this.root.focus();\n this.setRange(this.savedRange);\n }\n }, {\n key: 'format',\n value: function format(_format, value) {\n if (this.scroll.whitelist != null && !this.scroll.whitelist[_format]) return;\n this.scroll.update();\n var nativeRange = this.getNativeRange();\n if (nativeRange == null || !nativeRange.native.collapsed || _parchment2.default.query(_format, _parchment2.default.Scope.BLOCK)) return;\n if (nativeRange.start.node !== this.cursor.textNode) {\n var blot = _parchment2.default.find(nativeRange.start.node, false);\n if (blot == null) return;\n // TODO Give blot ability to not split\n if (blot instanceof _parchment2.default.Leaf) {\n var after = blot.split(nativeRange.start.offset);\n blot.parent.insertBefore(this.cursor, after);\n } else {\n blot.insertBefore(this.cursor, nativeRange.start.node); // Should never happen\n }\n this.cursor.attach();\n }\n this.cursor.format(_format, value);\n this.scroll.optimize();\n this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length);\n this.update();\n }\n }, {\n key: 'getBounds',\n value: function getBounds(index) {\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n var scrollLength = this.scroll.length();\n index = Math.min(index, scrollLength - 1);\n length = Math.min(index + length, scrollLength - 1) - index;\n var node = void 0,\n _scroll$leaf = this.scroll.leaf(index),\n _scroll$leaf2 = _slicedToArray(_scroll$leaf, 2),\n leaf = _scroll$leaf2[0],\n offset = _scroll$leaf2[1];\n if (leaf == null) return null;\n\n var _leaf$position = leaf.position(offset, true);\n\n var _leaf$position2 = _slicedToArray(_leaf$position, 2);\n\n node = _leaf$position2[0];\n offset = _leaf$position2[1];\n\n var range = document.createRange();\n if (length > 0) {\n range.setStart(node, offset);\n\n var _scroll$leaf3 = this.scroll.leaf(index + length);\n\n var _scroll$leaf4 = _slicedToArray(_scroll$leaf3, 2);\n\n leaf = _scroll$leaf4[0];\n offset = _scroll$leaf4[1];\n\n if (leaf == null) return null;\n\n var _leaf$position3 = leaf.position(offset, true);\n\n var _leaf$position4 = _slicedToArray(_leaf$position3, 2);\n\n node = _leaf$position4[0];\n offset = _leaf$position4[1];\n\n range.setEnd(node, offset);\n return range.getBoundingClientRect();\n } else {\n var side = 'left';\n var rect = void 0;\n if (node instanceof Text) {\n if (offset < node.data.length) {\n range.setStart(node, offset);\n range.setEnd(node, offset + 1);\n } else {\n range.setStart(node, offset - 1);\n range.setEnd(node, offset);\n side = 'right';\n }\n rect = range.getBoundingClientRect();\n } else {\n rect = leaf.domNode.getBoundingClientRect();\n if (offset > 0) side = 'right';\n }\n return {\n bottom: rect.top + rect.height,\n height: rect.height,\n left: rect[side],\n right: rect[side],\n top: rect.top,\n width: 0\n };\n }\n }\n }, {\n key: 'getNativeRange',\n value: function getNativeRange() {\n var selection = document.getSelection();\n if (selection == null || selection.rangeCount <= 0) return null;\n var nativeRange = selection.getRangeAt(0);\n if (nativeRange == null) return null;\n var range = this.normalizeNative(nativeRange);\n debug.info('getNativeRange', range);\n return range;\n }\n }, {\n key: 'getRange',\n value: function getRange() {\n var normalized = this.getNativeRange();\n if (normalized == null) return [null, null];\n var range = this.normalizedToRange(normalized);\n return [range, normalized];\n }\n }, {\n key: 'hasFocus',\n value: function hasFocus() {\n return document.activeElement === this.root;\n }\n }, {\n key: 'normalizedToRange',\n value: function normalizedToRange(range) {\n var _this4 = this;\n\n var positions = [[range.start.node, range.start.offset]];\n if (!range.native.collapsed) {\n positions.push([range.end.node, range.end.offset]);\n }\n var indexes = positions.map(function (position) {\n var _position = _slicedToArray(position, 2),\n node = _position[0],\n offset = _position[1];\n\n var blot = _parchment2.default.find(node, true);\n var index = blot.offset(_this4.scroll);\n if (offset === 0) {\n return index;\n } else if (blot instanceof _parchment2.default.Container) {\n return index + blot.length();\n } else {\n return index + blot.index(node, offset);\n }\n });\n var end = Math.min(Math.max.apply(Math, _toConsumableArray(indexes)), this.scroll.length() - 1);\n var start = Math.min.apply(Math, [end].concat(_toConsumableArray(indexes)));\n return new Range(start, end - start);\n }\n }, {\n key: 'normalizeNative',\n value: function normalizeNative(nativeRange) {\n if (!contains(this.root, nativeRange.startContainer) || !nativeRange.collapsed && !contains(this.root, nativeRange.endContainer)) {\n return null;\n }\n var range = {\n start: { node: nativeRange.startContainer, offset: nativeRange.startOffset },\n end: { node: nativeRange.endContainer, offset: nativeRange.endOffset },\n native: nativeRange\n };\n [range.start, range.end].forEach(function (position) {\n var node = position.node,\n offset = position.offset;\n while (!(node instanceof Text) && node.childNodes.length > 0) {\n if (node.childNodes.length > offset) {\n node = node.childNodes[offset];\n offset = 0;\n } else if (node.childNodes.length === offset) {\n node = node.lastChild;\n offset = node instanceof Text ? node.data.length : node.childNodes.length + 1;\n } else {\n break;\n }\n }\n position.node = node, position.offset = offset;\n });\n return range;\n }\n }, {\n key: 'rangeToNative',\n value: function rangeToNative(range) {\n var _this5 = this;\n\n var indexes = range.collapsed ? [range.index] : [range.index, range.index + range.length];\n var args = [];\n var scrollLength = this.scroll.length();\n indexes.forEach(function (index, i) {\n index = Math.min(scrollLength - 1, index);\n var node = void 0,\n _scroll$leaf5 = _this5.scroll.leaf(index),\n _scroll$leaf6 = _slicedToArray(_scroll$leaf5, 2),\n leaf = _scroll$leaf6[0],\n offset = _scroll$leaf6[1];\n var _leaf$position5 = leaf.position(offset, i !== 0);\n\n var _leaf$position6 = _slicedToArray(_leaf$position5, 2);\n\n node = _leaf$position6[0];\n offset = _leaf$position6[1];\n\n args.push(node, offset);\n });\n if (args.length < 2) {\n args = args.concat(args);\n }\n return args;\n }\n }, {\n key: 'scrollIntoView',\n value: function scrollIntoView(scrollingContainer) {\n var range = this.lastRange;\n if (range == null) return;\n var bounds = this.getBounds(range.index, range.length);\n if (bounds == null) return;\n var limit = this.scroll.length() - 1;\n\n var _scroll$line = this.scroll.line(Math.min(range.index, limit)),\n _scroll$line2 = _slicedToArray(_scroll$line, 1),\n first = _scroll$line2[0];\n\n var last = first;\n if (range.length > 0) {\n var _scroll$line3 = this.scroll.line(Math.min(range.index + range.length, limit));\n\n var _scroll$line4 = _slicedToArray(_scroll$line3, 1);\n\n last = _scroll$line4[0];\n }\n if (first == null || last == null) return;\n var scrollBounds = scrollingContainer.getBoundingClientRect();\n if (bounds.top < scrollBounds.top) {\n scrollingContainer.scrollTop -= scrollBounds.top - bounds.top;\n } else if (bounds.bottom > scrollBounds.bottom) {\n scrollingContainer.scrollTop += bounds.bottom - scrollBounds.bottom;\n }\n }\n }, {\n key: 'setNativeRange',\n value: function setNativeRange(startNode, startOffset) {\n var endNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : startNode;\n var endOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : startOffset;\n var force = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n debug.info('setNativeRange', startNode, startOffset, endNode, endOffset);\n if (startNode != null && (this.root.parentNode == null || startNode.parentNode == null || endNode.parentNode == null)) {\n return;\n }\n var selection = document.getSelection();\n if (selection == null) return;\n if (startNode != null) {\n if (!this.hasFocus()) this.root.focus();\n var native = (this.getNativeRange() || {}).native;\n if (native == null || force || startNode !== native.startContainer || startOffset !== native.startOffset || endNode !== native.endContainer || endOffset !== native.endOffset) {\n\n if (startNode.tagName == \"BR\") {\n startOffset = [].indexOf.call(startNode.parentNode.childNodes, startNode);\n startNode = startNode.parentNode;\n }\n if (endNode.tagName == \"BR\") {\n endOffset = [].indexOf.call(endNode.parentNode.childNodes, endNode);\n endNode = endNode.parentNode;\n }\n var range = document.createRange();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n selection.removeAllRanges();\n selection.addRange(range);\n }\n } else {\n selection.removeAllRanges();\n this.root.blur();\n document.body.focus(); // root.blur() not enough on IE11+Travis+SauceLabs (but not local VMs)\n }\n }\n }, {\n key: 'setRange',\n value: function setRange(range) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;\n\n if (typeof force === 'string') {\n source = force;\n force = false;\n }\n debug.info('setRange', range);\n if (range != null) {\n var args = this.rangeToNative(range);\n this.setNativeRange.apply(this, _toConsumableArray(args).concat([force]));\n } else {\n this.setNativeRange(null);\n }\n this.update(source);\n }\n }, {\n key: 'update',\n value: function update() {\n var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;\n\n var oldRange = this.lastRange;\n\n var _getRange = this.getRange(),\n _getRange2 = _slicedToArray(_getRange, 2),\n lastRange = _getRange2[0],\n nativeRange = _getRange2[1];\n\n this.lastRange = lastRange;\n if (this.lastRange != null) {\n this.savedRange = this.lastRange;\n }\n if (!(0, _deepEqual2.default)(oldRange, this.lastRange)) {\n var _emitter;\n\n if (!this.composing && nativeRange != null && nativeRange.native.collapsed && nativeRange.start.node !== this.cursor.textNode) {\n this.cursor.restore();\n }\n var args = [_emitter4.default.events.SELECTION_CHANGE, (0, _clone2.default)(this.lastRange), (0, _clone2.default)(oldRange), source];\n (_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));\n if (source !== _emitter4.default.sources.SILENT) {\n var _emitter2;\n\n (_emitter2 = this.emitter).emit.apply(_emitter2, args);\n }\n }\n }\n }]);\n\n return Selection;\n}();\n\nfunction contains(parent, descendant) {\n try {\n // Firefox inserts inaccessible nodes around video elements\n descendant.parentNode;\n } catch (e) {\n return false;\n }\n // IE11 has bug with Text nodes\n // https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect\n if (descendant instanceof Text) {\n descendant = descendant.parentNode;\n }\n return parent.contains(descendant);\n}\n\nexports.Range = Range;\nexports.default = Selection;\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Break = function (_Parchment$Embed) {\n _inherits(Break, _Parchment$Embed);\n\n function Break() {\n _classCallCheck(this, Break);\n\n return _possibleConstructorReturn(this, (Break.__proto__ || Object.getPrototypeOf(Break)).apply(this, arguments));\n }\n\n _createClass(Break, [{\n key: 'insertInto',\n value: function insertInto(parent, ref) {\n if (parent.children.length === 0) {\n _get(Break.prototype.__proto__ || Object.getPrototypeOf(Break.prototype), 'insertInto', this).call(this, parent, ref);\n } else {\n this.remove();\n }\n }\n }, {\n key: 'length',\n value: function length() {\n return 0;\n }\n }, {\n key: 'value',\n value: function value() {\n return '';\n }\n }], [{\n key: 'value',\n value: function value() {\n return undefined;\n }\n }]);\n\n return Break;\n}(_parchment2.default.Embed);\n\nBreak.blotName = 'break';\nBreak.tagName = 'BR';\n\nexports.default = Break;\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar linked_list_1 = __webpack_require__(44);\nvar shadow_1 = __webpack_require__(30);\nvar Registry = __webpack_require__(1);\nvar ContainerBlot = /** @class */ (function (_super) {\n __extends(ContainerBlot, _super);\n function ContainerBlot(domNode) {\n var _this = _super.call(this, domNode) || this;\n _this.build();\n return _this;\n }\n ContainerBlot.prototype.appendChild = function (other) {\n this.insertBefore(other);\n };\n ContainerBlot.prototype.attach = function () {\n _super.prototype.attach.call(this);\n this.children.forEach(function (child) {\n child.attach();\n });\n };\n ContainerBlot.prototype.build = function () {\n var _this = this;\n this.children = new linked_list_1.default();\n // Need to be reversed for if DOM nodes already in order\n [].slice\n .call(this.domNode.childNodes)\n .reverse()\n .forEach(function (node) {\n try {\n var child = makeBlot(node);\n _this.insertBefore(child, _this.children.head || undefined);\n }\n catch (err) {\n if (err instanceof Registry.ParchmentError)\n return;\n else\n throw err;\n }\n });\n };\n ContainerBlot.prototype.deleteAt = function (index, length) {\n if (index === 0 && length === this.length()) {\n return this.remove();\n }\n this.children.forEachAt(index, length, function (child, offset, length) {\n child.deleteAt(offset, length);\n });\n };\n ContainerBlot.prototype.descendant = function (criteria, index) {\n var _a = this.children.find(index), child = _a[0], offset = _a[1];\n if ((criteria.blotName == null && criteria(child)) ||\n (criteria.blotName != null && child instanceof criteria)) {\n return [child, offset];\n }\n else if (child instanceof ContainerBlot) {\n return child.descendant(criteria, offset);\n }\n else {\n return [null, -1];\n }\n };\n ContainerBlot.prototype.descendants = function (criteria, index, length) {\n if (index === void 0) { index = 0; }\n if (length === void 0) { length = Number.MAX_VALUE; }\n var descendants = [];\n var lengthLeft = length;\n this.children.forEachAt(index, length, function (child, index, length) {\n if ((criteria.blotName == null && criteria(child)) ||\n (criteria.blotName != null && child instanceof criteria)) {\n descendants.push(child);\n }\n if (child instanceof ContainerBlot) {\n descendants = descendants.concat(child.descendants(criteria, index, lengthLeft));\n }\n lengthLeft -= length;\n });\n return descendants;\n };\n ContainerBlot.prototype.detach = function () {\n this.children.forEach(function (child) {\n child.detach();\n });\n _super.prototype.detach.call(this);\n };\n ContainerBlot.prototype.formatAt = function (index, length, name, value) {\n this.children.forEachAt(index, length, function (child, offset, length) {\n child.formatAt(offset, length, name, value);\n });\n };\n ContainerBlot.prototype.insertAt = function (index, value, def) {\n var _a = this.children.find(index), child = _a[0], offset = _a[1];\n if (child) {\n child.insertAt(offset, value, def);\n }\n else {\n var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);\n this.appendChild(blot);\n }\n };\n ContainerBlot.prototype.insertBefore = function (childBlot, refBlot) {\n if (this.statics.allowedChildren != null &&\n !this.statics.allowedChildren.some(function (child) {\n return childBlot instanceof child;\n })) {\n throw new Registry.ParchmentError(\"Cannot insert \" + childBlot.statics.blotName + \" into \" + this.statics.blotName);\n }\n childBlot.insertInto(this, refBlot);\n };\n ContainerBlot.prototype.length = function () {\n return this.children.reduce(function (memo, child) {\n return memo + child.length();\n }, 0);\n };\n ContainerBlot.prototype.moveChildren = function (targetParent, refNode) {\n this.children.forEach(function (child) {\n targetParent.insertBefore(child, refNode);\n });\n };\n ContainerBlot.prototype.optimize = function (context) {\n _super.prototype.optimize.call(this, context);\n if (this.children.length === 0) {\n if (this.statics.defaultChild != null) {\n var child = Registry.create(this.statics.defaultChild);\n this.appendChild(child);\n child.optimize(context);\n }\n else {\n this.remove();\n }\n }\n };\n ContainerBlot.prototype.path = function (index, inclusive) {\n if (inclusive === void 0) { inclusive = false; }\n var _a = this.children.find(index, inclusive), child = _a[0], offset = _a[1];\n var position = [[this, index]];\n if (child instanceof ContainerBlot) {\n return position.concat(child.path(offset, inclusive));\n }\n else if (child != null) {\n position.push([child, offset]);\n }\n return position;\n };\n ContainerBlot.prototype.removeChild = function (child) {\n this.children.remove(child);\n };\n ContainerBlot.prototype.replace = function (target) {\n if (target instanceof ContainerBlot) {\n target.moveChildren(this);\n }\n _super.prototype.replace.call(this, target);\n };\n ContainerBlot.prototype.split = function (index, force) {\n if (force === void 0) { force = false; }\n if (!force) {\n if (index === 0)\n return this;\n if (index === this.length())\n return this.next;\n }\n var after = this.clone();\n this.parent.insertBefore(after, this.next);\n this.children.forEachAt(index, this.length(), function (child, offset, length) {\n child = child.split(offset, force);\n after.appendChild(child);\n });\n return after;\n };\n ContainerBlot.prototype.unwrap = function () {\n this.moveChildren(this.parent, this.next);\n this.remove();\n };\n ContainerBlot.prototype.update = function (mutations, context) {\n var _this = this;\n var addedNodes = [];\n var removedNodes = [];\n mutations.forEach(function (mutation) {\n if (mutation.target === _this.domNode && mutation.type === 'childList') {\n addedNodes.push.apply(addedNodes, mutation.addedNodes);\n removedNodes.push.apply(removedNodes, mutation.removedNodes);\n }\n });\n removedNodes.forEach(function (node) {\n // Check node has actually been removed\n // One exception is Chrome does not immediately remove IFRAMEs\n // from DOM but MutationRecord is correct in its reported removal\n if (node.parentNode != null &&\n // @ts-ignore\n node.tagName !== 'IFRAME' &&\n document.body.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n return;\n }\n var blot = Registry.find(node);\n if (blot == null)\n return;\n if (blot.domNode.parentNode == null || blot.domNode.parentNode === _this.domNode) {\n blot.detach();\n }\n });\n addedNodes\n .filter(function (node) {\n return node.parentNode == _this.domNode;\n })\n .sort(function (a, b) {\n if (a === b)\n return 0;\n if (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) {\n return 1;\n }\n return -1;\n })\n .forEach(function (node) {\n var refBlot = null;\n if (node.nextSibling != null) {\n refBlot = Registry.find(node.nextSibling);\n }\n var blot = makeBlot(node);\n if (blot.next != refBlot || blot.next == null) {\n if (blot.parent != null) {\n blot.parent.removeChild(_this);\n }\n _this.insertBefore(blot, refBlot || undefined);\n }\n });\n };\n return ContainerBlot;\n}(shadow_1.default));\nfunction makeBlot(node) {\n var blot = Registry.find(node);\n if (blot == null) {\n try {\n blot = Registry.create(node);\n }\n catch (e) {\n blot = Registry.create(Registry.Scope.INLINE);\n [].slice.call(node.childNodes).forEach(function (child) {\n // @ts-ignore\n blot.domNode.appendChild(child);\n });\n if (node.parentNode) {\n node.parentNode.replaceChild(blot.domNode, node);\n }\n blot.attach();\n }\n }\n return blot;\n}\nexports.default = ContainerBlot;\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nvar store_1 = __webpack_require__(31);\nvar container_1 = __webpack_require__(17);\nvar Registry = __webpack_require__(1);\nvar FormatBlot = /** @class */ (function (_super) {\n __extends(FormatBlot, _super);\n function FormatBlot(domNode) {\n var _this = _super.call(this, domNode) || this;\n _this.attributes = new store_1.default(_this.domNode);\n return _this;\n }\n FormatBlot.formats = function (domNode) {\n if (typeof this.tagName === 'string') {\n return true;\n }\n else if (Array.isArray(this.tagName)) {\n return domNode.tagName.toLowerCase();\n }\n return undefined;\n };\n FormatBlot.prototype.format = function (name, value) {\n var format = Registry.query(name);\n if (format instanceof attributor_1.default) {\n this.attributes.attribute(format, value);\n }\n else if (value) {\n if (format != null && (name !== this.statics.blotName || this.formats()[name] !== value)) {\n this.replaceWith(name, value);\n }\n }\n };\n FormatBlot.prototype.formats = function () {\n var formats = this.attributes.values();\n var format = this.statics.formats(this.domNode);\n if (format != null) {\n formats[this.statics.blotName] = format;\n }\n return formats;\n };\n FormatBlot.prototype.replaceWith = function (name, value) {\n var replacement = _super.prototype.replaceWith.call(this, name, value);\n this.attributes.copy(replacement);\n return replacement;\n };\n FormatBlot.prototype.update = function (mutations, context) {\n var _this = this;\n _super.prototype.update.call(this, mutations, context);\n if (mutations.some(function (mutation) {\n return mutation.target === _this.domNode && mutation.type === 'attributes';\n })) {\n this.attributes.build();\n }\n };\n FormatBlot.prototype.wrap = function (name, value) {\n var wrapper = _super.prototype.wrap.call(this, name, value);\n if (wrapper instanceof FormatBlot && wrapper.statics.scope === this.statics.scope) {\n this.attributes.move(wrapper);\n }\n return wrapper;\n };\n return FormatBlot;\n}(container_1.default));\nexports.default = FormatBlot;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar shadow_1 = __webpack_require__(30);\nvar Registry = __webpack_require__(1);\nvar LeafBlot = /** @class */ (function (_super) {\n __extends(LeafBlot, _super);\n function LeafBlot() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n LeafBlot.value = function (domNode) {\n return true;\n };\n LeafBlot.prototype.index = function (node, offset) {\n if (this.domNode === node ||\n this.domNode.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n return Math.min(offset, 1);\n }\n return -1;\n };\n LeafBlot.prototype.position = function (index, inclusive) {\n var offset = [].indexOf.call(this.parent.domNode.childNodes, this.domNode);\n if (index > 0)\n offset += 1;\n return [this.parent.domNode, offset];\n };\n LeafBlot.prototype.value = function () {\n var _a;\n return _a = {}, _a[this.statics.blotName] = this.statics.value(this.domNode) || true, _a;\n };\n LeafBlot.scope = Registry.Scope.INLINE_BLOT;\n return LeafBlot;\n}(shadow_1.default));\nexports.default = LeafBlot;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar equal = __webpack_require__(11);\nvar extend = __webpack_require__(3);\n\n\nvar lib = {\n attributes: {\n compose: function (a, b, keepNull) {\n if (typeof a !== 'object') a = {};\n if (typeof b !== 'object') b = {};\n var attributes = extend(true, {}, b);\n if (!keepNull) {\n attributes = Object.keys(attributes).reduce(function (copy, key) {\n if (attributes[key] != null) {\n copy[key] = attributes[key];\n }\n return copy;\n }, {});\n }\n for (var key in a) {\n if (a[key] !== undefined && b[key] === undefined) {\n attributes[key] = a[key];\n }\n }\n return Object.keys(attributes).length > 0 ? attributes : undefined;\n },\n\n diff: function(a, b) {\n if (typeof a !== 'object') a = {};\n if (typeof b !== 'object') b = {};\n var attributes = Object.keys(a).concat(Object.keys(b)).reduce(function (attributes, key) {\n if (!equal(a[key], b[key])) {\n attributes[key] = b[key] === undefined ? null : b[key];\n }\n return attributes;\n }, {});\n return Object.keys(attributes).length > 0 ? attributes : undefined;\n },\n\n transform: function (a, b, priority) {\n if (typeof a !== 'object') return b;\n if (typeof b !== 'object') return undefined;\n if (!priority) return b; // b simply overwrites us without priority\n var attributes = Object.keys(b).reduce(function (attributes, key) {\n if (a[key] === undefined) attributes[key] = b[key]; // null is a valid value\n return attributes;\n }, {});\n return Object.keys(attributes).length > 0 ? attributes : undefined;\n }\n },\n\n iterator: function (ops) {\n return new Iterator(ops);\n },\n\n length: function (op) {\n if (typeof op['delete'] === 'number') {\n return op['delete'];\n } else if (typeof op.retain === 'number') {\n return op.retain;\n } else {\n return typeof op.insert === 'string' ? op.insert.length : 1;\n }\n }\n};\n\n\nfunction Iterator(ops) {\n this.ops = ops;\n this.index = 0;\n this.offset = 0;\n};\n\nIterator.prototype.hasNext = function () {\n return this.peekLength() < Infinity;\n};\n\nIterator.prototype.next = function (length) {\n if (!length) length = Infinity;\n var nextOp = this.ops[this.index];\n if (nextOp) {\n var offset = this.offset;\n var opLength = lib.length(nextOp)\n if (length >= opLength - offset) {\n length = opLength - offset;\n this.index += 1;\n this.offset = 0;\n } else {\n this.offset += length;\n }\n if (typeof nextOp['delete'] === 'number') {\n return { 'delete': length };\n } else {\n var retOp = {};\n if (nextOp.attributes) {\n retOp.attributes = nextOp.attributes;\n }\n if (typeof nextOp.retain === 'number') {\n retOp.retain = length;\n } else if (typeof nextOp.insert === 'string') {\n retOp.insert = nextOp.insert.substr(offset, length);\n } else {\n // offset should === 0, length should === 1\n retOp.insert = nextOp.insert;\n }\n return retOp;\n }\n } else {\n return { retain: Infinity };\n }\n};\n\nIterator.prototype.peek = function () {\n return this.ops[this.index];\n};\n\nIterator.prototype.peekLength = function () {\n if (this.ops[this.index]) {\n // Should never return 0 if our index is being managed correctly\n return lib.length(this.ops[this.index]) - this.offset;\n } else {\n return Infinity;\n }\n};\n\nIterator.prototype.peekType = function () {\n if (this.ops[this.index]) {\n if (typeof this.ops[this.index]['delete'] === 'number') {\n return 'delete';\n } else if (typeof this.ops[this.index].retain === 'number') {\n return 'retain';\n } else {\n return 'insert';\n }\n }\n return 'retain';\n};\n\nIterator.prototype.rest = function () {\n if (!this.hasNext()) {\n return [];\n } else if (this.offset === 0) {\n return this.ops.slice(this.index);\n } else {\n var offset = this.offset;\n var index = this.index;\n var next = this.next();\n var rest = this.ops.slice(this.index);\n this.offset = offset;\n this.index = index;\n return [next].concat(rest);\n }\n};\n\n\nmodule.exports = lib;\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\nvar clone = (function() {\n'use strict';\n\nfunction _instanceof(obj, type) {\n return type != null && obj instanceof type;\n}\n\nvar nativeMap;\ntry {\n nativeMap = Map;\n} catch(_) {\n // maybe a reference error because no `Map`. Give it a dummy value that no\n // value will ever be an instanceof.\n nativeMap = function() {};\n}\n\nvar nativeSet;\ntry {\n nativeSet = Set;\n} catch(_) {\n nativeSet = function() {};\n}\n\nvar nativePromise;\ntry {\n nativePromise = Promise;\n} catch(_) {\n nativePromise = function() {};\n}\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n * @param `includeNonEnumerable` - set to true if the non-enumerable properties\n * should be cloned as well. Non-enumerable properties on the prototype\n * chain will be ignored. (optional - false by default)\n*/\nfunction clone(parent, circular, depth, prototype, includeNonEnumerable) {\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n includeNonEnumerable = circular.includeNonEnumerable;\n circular = circular.circular;\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth === 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (_instanceof(parent, nativeMap)) {\n child = new nativeMap();\n } else if (_instanceof(parent, nativeSet)) {\n child = new nativeSet();\n } else if (_instanceof(parent, nativePromise)) {\n child = new nativePromise(function (resolve, reject) {\n parent.then(function(value) {\n resolve(_clone(value, depth - 1));\n }, function(err) {\n reject(_clone(err, depth - 1));\n });\n });\n } else if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n if (Buffer.allocUnsafe) {\n // Node.js >= 4.5.0\n child = Buffer.allocUnsafe(parent.length);\n } else {\n // Older Node.js versions\n child = new Buffer(parent.length);\n }\n parent.copy(child);\n return child;\n } else if (_instanceof(parent, Error)) {\n child = Object.create(parent);\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n if (_instanceof(parent, nativeMap)) {\n parent.forEach(function(value, key) {\n var keyChild = _clone(key, depth - 1);\n var valueChild = _clone(value, depth - 1);\n child.set(keyChild, valueChild);\n });\n }\n if (_instanceof(parent, nativeSet)) {\n parent.forEach(function(value) {\n var entryChild = _clone(value, depth - 1);\n child.add(entryChild);\n });\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(parent);\n for (var i = 0; i < symbols.length; i++) {\n // Don't need to worry about cloning a symbol because it is a primitive,\n // like a number or string.\n var symbol = symbols[i];\n var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);\n if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {\n continue;\n }\n child[symbol] = _clone(parent[symbol], depth - 1);\n if (!descriptor.enumerable) {\n Object.defineProperty(child, symbol, {\n enumerable: false\n });\n }\n }\n }\n\n if (includeNonEnumerable) {\n var allPropertyNames = Object.getOwnPropertyNames(parent);\n for (var i = 0; i < allPropertyNames.length; i++) {\n var propertyName = allPropertyNames[i];\n var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);\n if (descriptor && descriptor.enumerable) {\n continue;\n }\n child[propertyName] = _clone(parent[propertyName], depth - 1);\n Object.defineProperty(child, propertyName, {\n enumerable: false\n });\n }\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n}\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n}\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n}\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n}\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n}\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _emitter = __webpack_require__(8);\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _container = __webpack_require__(25);\n\nvar _container2 = _interopRequireDefault(_container);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction isLine(blot) {\n return blot instanceof _block2.default || blot instanceof _block.BlockEmbed;\n}\n\nvar Scroll = function (_Parchment$Scroll) {\n _inherits(Scroll, _Parchment$Scroll);\n\n function Scroll(domNode, config) {\n _classCallCheck(this, Scroll);\n\n var _this = _possibleConstructorReturn(this, (Scroll.__proto__ || Object.getPrototypeOf(Scroll)).call(this, domNode));\n\n _this.emitter = config.emitter;\n if (Array.isArray(config.whitelist)) {\n _this.whitelist = config.whitelist.reduce(function (whitelist, format) {\n whitelist[format] = true;\n return whitelist;\n }, {});\n }\n // Some reason fixes composition issues with character languages in Windows/Chrome, Safari\n _this.domNode.addEventListener('DOMNodeInserted', function () {});\n _this.optimize();\n _this.enable();\n return _this;\n }\n\n _createClass(Scroll, [{\n key: 'batchStart',\n value: function batchStart() {\n this.batch = true;\n }\n }, {\n key: 'batchEnd',\n value: function batchEnd() {\n this.batch = false;\n this.optimize();\n }\n }, {\n key: 'deleteAt',\n value: function deleteAt(index, length) {\n var _line = this.line(index),\n _line2 = _slicedToArray(_line, 2),\n first = _line2[0],\n offset = _line2[1];\n\n var _line3 = this.line(index + length),\n _line4 = _slicedToArray(_line3, 1),\n last = _line4[0];\n\n _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'deleteAt', this).call(this, index, length);\n if (last != null && first !== last && offset > 0) {\n if (first instanceof _block.BlockEmbed || last instanceof _block.BlockEmbed) {\n this.optimize();\n return;\n }\n if (first instanceof _code2.default) {\n var newlineIndex = first.newlineIndex(first.length(), true);\n if (newlineIndex > -1) {\n first = first.split(newlineIndex + 1);\n if (first === last) {\n this.optimize();\n return;\n }\n }\n } else if (last instanceof _code2.default) {\n var _newlineIndex = last.newlineIndex(0);\n if (_newlineIndex > -1) {\n last.split(_newlineIndex + 1);\n }\n }\n var ref = last.children.head instanceof _break2.default ? null : last.children.head;\n first.moveChildren(last, ref);\n first.remove();\n }\n this.optimize();\n }\n }, {\n key: 'enable',\n value: function enable() {\n var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n this.domNode.setAttribute('contenteditable', enabled);\n }\n }, {\n key: 'formatAt',\n value: function formatAt(index, length, format, value) {\n if (this.whitelist != null && !this.whitelist[format]) return;\n _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'formatAt', this).call(this, index, length, format, value);\n this.optimize();\n }\n }, {\n key: 'insertAt',\n value: function insertAt(index, value, def) {\n if (def != null && this.whitelist != null && !this.whitelist[value]) return;\n if (index >= this.length()) {\n if (def == null || _parchment2.default.query(value, _parchment2.default.Scope.BLOCK) == null) {\n var blot = _parchment2.default.create(this.statics.defaultChild);\n this.appendChild(blot);\n if (def == null && value.endsWith('\\n')) {\n value = value.slice(0, -1);\n }\n blot.insertAt(0, value, def);\n } else {\n var embed = _parchment2.default.create(value, def);\n this.appendChild(embed);\n }\n } else {\n _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertAt', this).call(this, index, value, def);\n }\n this.optimize();\n }\n }, {\n key: 'insertBefore',\n value: function insertBefore(blot, ref) {\n if (blot.statics.scope === _parchment2.default.Scope.INLINE_BLOT) {\n var wrapper = _parchment2.default.create(this.statics.defaultChild);\n wrapper.appendChild(blot);\n blot = wrapper;\n }\n _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertBefore', this).call(this, blot, ref);\n }\n }, {\n key: 'leaf',\n value: function leaf(index) {\n return this.path(index).pop() || [null, -1];\n }\n }, {\n key: 'line',\n value: function line(index) {\n if (index === this.length()) {\n return this.line(index - 1);\n }\n return this.descendant(isLine, index);\n }\n }, {\n key: 'lines',\n value: function lines() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;\n\n var getLines = function getLines(blot, index, length) {\n var lines = [],\n lengthLeft = length;\n blot.children.forEachAt(index, length, function (child, index, length) {\n if (isLine(child)) {\n lines.push(child);\n } else if (child instanceof _parchment2.default.Container) {\n lines = lines.concat(getLines(child, index, lengthLeft));\n }\n lengthLeft -= length;\n });\n return lines;\n };\n return getLines(this, index, length);\n }\n }, {\n key: 'optimize',\n value: function optimize() {\n var mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (this.batch === true) return;\n _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'optimize', this).call(this, mutations, context);\n if (mutations.length > 0) {\n this.emitter.emit(_emitter2.default.events.SCROLL_OPTIMIZE, mutations, context);\n }\n }\n }, {\n key: 'path',\n value: function path(index) {\n return _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'path', this).call(this, index).slice(1); // Exclude self\n }\n }, {\n key: 'update',\n value: function update(mutations) {\n if (this.batch === true) return;\n var source = _emitter2.default.sources.USER;\n if (typeof mutations === 'string') {\n source = mutations;\n }\n if (!Array.isArray(mutations)) {\n mutations = this.observer.takeRecords();\n }\n if (mutations.length > 0) {\n this.emitter.emit(_emitter2.default.events.SCROLL_BEFORE_UPDATE, source, mutations);\n }\n _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'update', this).call(this, mutations.concat([])); // pass copy\n if (mutations.length > 0) {\n this.emitter.emit(_emitter2.default.events.SCROLL_UPDATE, source, mutations);\n }\n }\n }]);\n\n return Scroll;\n}(_parchment2.default.Scroll);\n\nScroll.blotName = 'scroll';\nScroll.className = 'ql-editor';\nScroll.tagName = 'DIV';\nScroll.defaultChild = 'block';\nScroll.allowedChildren = [_block2.default, _block.BlockEmbed, _container2.default];\n\nexports.default = Scroll;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SHORTKEY = exports.default = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _clone = __webpack_require__(21);\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nvar _deepEqual = __webpack_require__(11);\n\nvar _deepEqual2 = _interopRequireDefault(_deepEqual);\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _op = __webpack_require__(20);\n\nvar _op2 = _interopRequireDefault(_op);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:keyboard');\n\nvar SHORTKEY = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey';\n\nvar Keyboard = function (_Module) {\n _inherits(Keyboard, _Module);\n\n _createClass(Keyboard, null, [{\n key: 'match',\n value: function match(evt, binding) {\n binding = normalize(binding);\n if (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some(function (key) {\n return !!binding[key] !== evt[key] && binding[key] !== null;\n })) {\n return false;\n }\n return binding.key === (evt.which || evt.keyCode);\n }\n }]);\n\n function Keyboard(quill, options) {\n _classCallCheck(this, Keyboard);\n\n var _this = _possibleConstructorReturn(this, (Keyboard.__proto__ || Object.getPrototypeOf(Keyboard)).call(this, quill, options));\n\n _this.bindings = {};\n Object.keys(_this.options.bindings).forEach(function (name) {\n if (name === 'list autofill' && quill.scroll.whitelist != null && !quill.scroll.whitelist['list']) {\n return;\n }\n if (_this.options.bindings[name]) {\n _this.addBinding(_this.options.bindings[name]);\n }\n });\n _this.addBinding({ key: Keyboard.keys.ENTER, shiftKey: null }, handleEnter);\n _this.addBinding({ key: Keyboard.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function () {});\n if (/Firefox/i.test(navigator.userAgent)) {\n // Need to handle delete and backspace for Firefox in the general case #1171\n _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true }, handleBackspace);\n _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true }, handleDelete);\n } else {\n _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true, prefix: /^.?$/ }, handleBackspace);\n _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true, suffix: /^.?$/ }, handleDelete);\n }\n _this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: false }, handleDeleteRange);\n _this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: false }, handleDeleteRange);\n _this.addBinding({ key: Keyboard.keys.BACKSPACE, altKey: null, ctrlKey: null, metaKey: null, shiftKey: null }, { collapsed: true, offset: 0 }, handleBackspace);\n _this.listen();\n return _this;\n }\n\n _createClass(Keyboard, [{\n key: 'addBinding',\n value: function addBinding(key) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var handler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var binding = normalize(key);\n if (binding == null || binding.key == null) {\n return debug.warn('Attempted to add invalid keyboard binding', binding);\n }\n if (typeof context === 'function') {\n context = { handler: context };\n }\n if (typeof handler === 'function') {\n handler = { handler: handler };\n }\n binding = (0, _extend2.default)(binding, context, handler);\n this.bindings[binding.key] = this.bindings[binding.key] || [];\n this.bindings[binding.key].push(binding);\n }\n }, {\n key: 'listen',\n value: function listen() {\n var _this2 = this;\n\n this.quill.root.addEventListener('keydown', function (evt) {\n if (evt.defaultPrevented) return;\n var which = evt.which || evt.keyCode;\n var bindings = (_this2.bindings[which] || []).filter(function (binding) {\n return Keyboard.match(evt, binding);\n });\n if (bindings.length === 0) return;\n var range = _this2.quill.getSelection();\n if (range == null || !_this2.quill.hasFocus()) return;\n\n var _quill$getLine = _this2.quill.getLine(range.index),\n _quill$getLine2 = _slicedToArray(_quill$getLine, 2),\n line = _quill$getLine2[0],\n offset = _quill$getLine2[1];\n\n var _quill$getLeaf = _this2.quill.getLeaf(range.index),\n _quill$getLeaf2 = _slicedToArray(_quill$getLeaf, 2),\n leafStart = _quill$getLeaf2[0],\n offsetStart = _quill$getLeaf2[1];\n\n var _ref = range.length === 0 ? [leafStart, offsetStart] : _this2.quill.getLeaf(range.index + range.length),\n _ref2 = _slicedToArray(_ref, 2),\n leafEnd = _ref2[0],\n offsetEnd = _ref2[1];\n\n var prefixText = leafStart instanceof _parchment2.default.Text ? leafStart.value().slice(0, offsetStart) : '';\n var suffixText = leafEnd instanceof _parchment2.default.Text ? leafEnd.value().slice(offsetEnd) : '';\n var curContext = {\n collapsed: range.length === 0,\n empty: range.length === 0 && line.length() <= 1,\n format: _this2.quill.getFormat(range),\n offset: offset,\n prefix: prefixText,\n suffix: suffixText\n };\n var prevented = bindings.some(function (binding) {\n if (binding.collapsed != null && binding.collapsed !== curContext.collapsed) return false;\n if (binding.empty != null && binding.empty !== curContext.empty) return false;\n if (binding.offset != null && binding.offset !== curContext.offset) return false;\n if (Array.isArray(binding.format)) {\n // any format is present\n if (binding.format.every(function (name) {\n return curContext.format[name] == null;\n })) {\n return false;\n }\n } else if (_typeof(binding.format) === 'object') {\n // all formats must match\n if (!Object.keys(binding.format).every(function (name) {\n if (binding.format[name] === true) return curContext.format[name] != null;\n if (binding.format[name] === false) return curContext.format[name] == null;\n return (0, _deepEqual2.default)(binding.format[name], curContext.format[name]);\n })) {\n return false;\n }\n }\n if (binding.prefix != null && !binding.prefix.test(curContext.prefix)) return false;\n if (binding.suffix != null && !binding.suffix.test(curContext.suffix)) return false;\n return binding.handler.call(_this2, range, curContext) !== true;\n });\n if (prevented) {\n evt.preventDefault();\n }\n });\n }\n }]);\n\n return Keyboard;\n}(_module2.default);\n\nKeyboard.keys = {\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n ESCAPE: 27,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n DELETE: 46\n};\n\nKeyboard.DEFAULTS = {\n bindings: {\n 'bold': makeFormatHandler('bold'),\n 'italic': makeFormatHandler('italic'),\n 'underline': makeFormatHandler('underline'),\n 'indent': {\n // highlight tab or tab at beginning of list, indent or blockquote\n key: Keyboard.keys.TAB,\n format: ['blockquote', 'indent', 'list'],\n handler: function handler(range, context) {\n if (context.collapsed && context.offset !== 0) return true;\n this.quill.format('indent', '+1', _quill2.default.sources.USER);\n }\n },\n 'outdent': {\n key: Keyboard.keys.TAB,\n shiftKey: true,\n format: ['blockquote', 'indent', 'list'],\n // highlight tab or tab at beginning of list, indent or blockquote\n handler: function handler(range, context) {\n if (context.collapsed && context.offset !== 0) return true;\n this.quill.format('indent', '-1', _quill2.default.sources.USER);\n }\n },\n 'outdent backspace': {\n key: Keyboard.keys.BACKSPACE,\n collapsed: true,\n shiftKey: null,\n metaKey: null,\n ctrlKey: null,\n altKey: null,\n format: ['indent', 'list'],\n offset: 0,\n handler: function handler(range, context) {\n if (context.format.indent != null) {\n this.quill.format('indent', '-1', _quill2.default.sources.USER);\n } else if (context.format.list != null) {\n this.quill.format('list', false, _quill2.default.sources.USER);\n }\n }\n },\n 'indent code-block': makeCodeBlockHandler(true),\n 'outdent code-block': makeCodeBlockHandler(false),\n 'remove tab': {\n key: Keyboard.keys.TAB,\n shiftKey: true,\n collapsed: true,\n prefix: /\\t$/,\n handler: function handler(range) {\n this.quill.deleteText(range.index - 1, 1, _quill2.default.sources.USER);\n }\n },\n 'tab': {\n key: Keyboard.keys.TAB,\n handler: function handler(range) {\n this.quill.history.cutoff();\n var delta = new _quillDelta2.default().retain(range.index).delete(range.length).insert('\\t');\n this.quill.updateContents(delta, _quill2.default.sources.USER);\n this.quill.history.cutoff();\n this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n }\n },\n 'list empty enter': {\n key: Keyboard.keys.ENTER,\n collapsed: true,\n format: ['list'],\n empty: true,\n handler: function handler(range, context) {\n this.quill.format('list', false, _quill2.default.sources.USER);\n if (context.format.indent) {\n this.quill.format('indent', false, _quill2.default.sources.USER);\n }\n }\n },\n 'checklist enter': {\n key: Keyboard.keys.ENTER,\n collapsed: true,\n format: { list: 'checked' },\n handler: function handler(range) {\n var _quill$getLine3 = this.quill.getLine(range.index),\n _quill$getLine4 = _slicedToArray(_quill$getLine3, 2),\n line = _quill$getLine4[0],\n offset = _quill$getLine4[1];\n\n var formats = (0, _extend2.default)({}, line.formats(), { list: 'checked' });\n var delta = new _quillDelta2.default().retain(range.index).insert('\\n', formats).retain(line.length() - offset - 1).retain(1, { list: 'unchecked' });\n this.quill.updateContents(delta, _quill2.default.sources.USER);\n this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n this.quill.scrollIntoView();\n }\n },\n 'header enter': {\n key: Keyboard.keys.ENTER,\n collapsed: true,\n format: ['header'],\n suffix: /^$/,\n handler: function handler(range, context) {\n var _quill$getLine5 = this.quill.getLine(range.index),\n _quill$getLine6 = _slicedToArray(_quill$getLine5, 2),\n line = _quill$getLine6[0],\n offset = _quill$getLine6[1];\n\n var delta = new _quillDelta2.default().retain(range.index).insert('\\n', context.format).retain(line.length() - offset - 1).retain(1, { header: null });\n this.quill.updateContents(delta, _quill2.default.sources.USER);\n this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n this.quill.scrollIntoView();\n }\n },\n 'list autofill': {\n key: ' ',\n collapsed: true,\n format: { list: false },\n prefix: /^\\s*?(\\d+\\.|-|\\*|\\[ ?\\]|\\[x\\])$/,\n handler: function handler(range, context) {\n var length = context.prefix.length;\n\n var _quill$getLine7 = this.quill.getLine(range.index),\n _quill$getLine8 = _slicedToArray(_quill$getLine7, 2),\n line = _quill$getLine8[0],\n offset = _quill$getLine8[1];\n\n if (offset > length) return true;\n var value = void 0;\n switch (context.prefix.trim()) {\n case '[]':case '[ ]':\n value = 'unchecked';\n break;\n case '[x]':\n value = 'checked';\n break;\n case '-':case '*':\n value = 'bullet';\n break;\n default:\n value = 'ordered';\n }\n this.quill.insertText(range.index, ' ', _quill2.default.sources.USER);\n this.quill.history.cutoff();\n var delta = new _quillDelta2.default().retain(range.index - offset).delete(length + 1).retain(line.length() - 2 - offset).retain(1, { list: value });\n this.quill.updateContents(delta, _quill2.default.sources.USER);\n this.quill.history.cutoff();\n this.quill.setSelection(range.index - length, _quill2.default.sources.SILENT);\n }\n },\n 'code exit': {\n key: Keyboard.keys.ENTER,\n collapsed: true,\n format: ['code-block'],\n prefix: /\\n\\n$/,\n suffix: /^\\s+$/,\n handler: function handler(range) {\n var _quill$getLine9 = this.quill.getLine(range.index),\n _quill$getLine10 = _slicedToArray(_quill$getLine9, 2),\n line = _quill$getLine10[0],\n offset = _quill$getLine10[1];\n\n var delta = new _quillDelta2.default().retain(range.index + line.length() - offset - 2).retain(1, { 'code-block': null }).delete(1);\n this.quill.updateContents(delta, _quill2.default.sources.USER);\n }\n },\n 'embed left': makeEmbedArrowHandler(Keyboard.keys.LEFT, false),\n 'embed left shift': makeEmbedArrowHandler(Keyboard.keys.LEFT, true),\n 'embed right': makeEmbedArrowHandler(Keyboard.keys.RIGHT, false),\n 'embed right shift': makeEmbedArrowHandler(Keyboard.keys.RIGHT, true)\n }\n};\n\nfunction makeEmbedArrowHandler(key, shiftKey) {\n var _ref3;\n\n var where = key === Keyboard.keys.LEFT ? 'prefix' : 'suffix';\n return _ref3 = {\n key: key,\n shiftKey: shiftKey,\n altKey: null\n }, _defineProperty(_ref3, where, /^$/), _defineProperty(_ref3, 'handler', function handler(range) {\n var index = range.index;\n if (key === Keyboard.keys.RIGHT) {\n index += range.length + 1;\n }\n\n var _quill$getLeaf3 = this.quill.getLeaf(index),\n _quill$getLeaf4 = _slicedToArray(_quill$getLeaf3, 1),\n leaf = _quill$getLeaf4[0];\n\n if (!(leaf instanceof _parchment2.default.Embed)) return true;\n if (key === Keyboard.keys.LEFT) {\n if (shiftKey) {\n this.quill.setSelection(range.index - 1, range.length + 1, _quill2.default.sources.USER);\n } else {\n this.quill.setSelection(range.index - 1, _quill2.default.sources.USER);\n }\n } else {\n if (shiftKey) {\n this.quill.setSelection(range.index, range.length + 1, _quill2.default.sources.USER);\n } else {\n this.quill.setSelection(range.index + range.length + 1, _quill2.default.sources.USER);\n }\n }\n return false;\n }), _ref3;\n}\n\nfunction handleBackspace(range, context) {\n if (range.index === 0 || this.quill.getLength() <= 1) return;\n\n var _quill$getLine11 = this.quill.getLine(range.index),\n _quill$getLine12 = _slicedToArray(_quill$getLine11, 1),\n line = _quill$getLine12[0];\n\n var formats = {};\n if (context.offset === 0) {\n var _quill$getLine13 = this.quill.getLine(range.index - 1),\n _quill$getLine14 = _slicedToArray(_quill$getLine13, 1),\n prev = _quill$getLine14[0];\n\n if (prev != null && prev.length() > 1) {\n var curFormats = line.formats();\n var prevFormats = this.quill.getFormat(range.index - 1, 1);\n formats = _op2.default.attributes.diff(curFormats, prevFormats) || {};\n }\n }\n // Check for astral symbols\n var length = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]$/.test(context.prefix) ? 2 : 1;\n this.quill.deleteText(range.index - length, length, _quill2.default.sources.USER);\n if (Object.keys(formats).length > 0) {\n this.quill.formatLine(range.index - length, length, formats, _quill2.default.sources.USER);\n }\n this.quill.focus();\n}\n\nfunction handleDelete(range, context) {\n // Check for astral symbols\n var length = /^[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/.test(context.suffix) ? 2 : 1;\n if (range.index >= this.quill.getLength() - length) return;\n var formats = {},\n nextLength = 0;\n\n var _quill$getLine15 = this.quill.getLine(range.index),\n _quill$getLine16 = _slicedToArray(_quill$getLine15, 1),\n line = _quill$getLine16[0];\n\n if (context.offset >= line.length() - 1) {\n var _quill$getLine17 = this.quill.getLine(range.index + 1),\n _quill$getLine18 = _slicedToArray(_quill$getLine17, 1),\n next = _quill$getLine18[0];\n\n if (next) {\n var curFormats = line.formats();\n var nextFormats = this.quill.getFormat(range.index, 1);\n formats = _op2.default.attributes.diff(curFormats, nextFormats) || {};\n nextLength = next.length();\n }\n }\n this.quill.deleteText(range.index, length, _quill2.default.sources.USER);\n if (Object.keys(formats).length > 0) {\n this.quill.formatLine(range.index + nextLength - 1, length, formats, _quill2.default.sources.USER);\n }\n}\n\nfunction handleDeleteRange(range) {\n var lines = this.quill.getLines(range);\n var formats = {};\n if (lines.length > 1) {\n var firstFormats = lines[0].formats();\n var lastFormats = lines[lines.length - 1].formats();\n formats = _op2.default.attributes.diff(lastFormats, firstFormats) || {};\n }\n this.quill.deleteText(range, _quill2.default.sources.USER);\n if (Object.keys(formats).length > 0) {\n this.quill.formatLine(range.index, 1, formats, _quill2.default.sources.USER);\n }\n this.quill.setSelection(range.index, _quill2.default.sources.SILENT);\n this.quill.focus();\n}\n\nfunction handleEnter(range, context) {\n var _this3 = this;\n\n if (range.length > 0) {\n this.quill.scroll.deleteAt(range.index, range.length); // So we do not trigger text-change\n }\n var lineFormats = Object.keys(context.format).reduce(function (lineFormats, format) {\n if (_parchment2.default.query(format, _parchment2.default.Scope.BLOCK) && !Array.isArray(context.format[format])) {\n lineFormats[format] = context.format[format];\n }\n return lineFormats;\n }, {});\n this.quill.insertText(range.index, '\\n', lineFormats, _quill2.default.sources.USER);\n // Earlier scroll.deleteAt might have messed up our selection,\n // so insertText's built in selection preservation is not reliable\n this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);\n this.quill.focus();\n Object.keys(context.format).forEach(function (name) {\n if (lineFormats[name] != null) return;\n if (Array.isArray(context.format[name])) return;\n if (name === 'link') return;\n _this3.quill.format(name, context.format[name], _quill2.default.sources.USER);\n });\n}\n\nfunction makeCodeBlockHandler(indent) {\n return {\n key: Keyboard.keys.TAB,\n shiftKey: !indent,\n format: { 'code-block': true },\n handler: function handler(range) {\n var CodeBlock = _parchment2.default.query('code-block');\n var index = range.index,\n length = range.length;\n\n var _quill$scroll$descend = this.quill.scroll.descendant(CodeBlock, index),\n _quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),\n block = _quill$scroll$descend2[0],\n offset = _quill$scroll$descend2[1];\n\n if (block == null) return;\n var scrollIndex = this.quill.getIndex(block);\n var start = block.newlineIndex(offset, true) + 1;\n var end = block.newlineIndex(scrollIndex + offset + length);\n var lines = block.domNode.textContent.slice(start, end).split('\\n');\n offset = 0;\n lines.forEach(function (line, i) {\n if (indent) {\n block.insertAt(start + offset, CodeBlock.TAB);\n offset += CodeBlock.TAB.length;\n if (i === 0) {\n index += CodeBlock.TAB.length;\n } else {\n length += CodeBlock.TAB.length;\n }\n } else if (line.startsWith(CodeBlock.TAB)) {\n block.deleteAt(start + offset, CodeBlock.TAB.length);\n offset -= CodeBlock.TAB.length;\n if (i === 0) {\n index -= CodeBlock.TAB.length;\n } else {\n length -= CodeBlock.TAB.length;\n }\n }\n offset += line.length + 1;\n });\n this.quill.update(_quill2.default.sources.USER);\n this.quill.setSelection(index, length, _quill2.default.sources.SILENT);\n }\n };\n}\n\nfunction makeFormatHandler(format) {\n return {\n key: format[0].toUpperCase(),\n shortKey: true,\n handler: function handler(range, context) {\n this.quill.format(format, !context.format[format], _quill2.default.sources.USER);\n }\n };\n}\n\nfunction normalize(binding) {\n if (typeof binding === 'string' || typeof binding === 'number') {\n return normalize({ key: binding });\n }\n if ((typeof binding === 'undefined' ? 'undefined' : _typeof(binding)) === 'object') {\n binding = (0, _clone2.default)(binding, false);\n }\n if (typeof binding.key === 'string') {\n if (Keyboard.keys[binding.key.toUpperCase()] != null) {\n binding.key = Keyboard.keys[binding.key.toUpperCase()];\n } else if (binding.key.length === 1) {\n binding.key = binding.key.toUpperCase().charCodeAt(0);\n } else {\n return null;\n }\n }\n if (binding.shortKey) {\n binding[SHORTKEY] = binding.shortKey;\n delete binding.shortKey;\n }\n return binding;\n}\n\nexports.default = Keyboard;\nexports.SHORTKEY = SHORTKEY;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Cursor = function (_Parchment$Embed) {\n _inherits(Cursor, _Parchment$Embed);\n\n _createClass(Cursor, null, [{\n key: 'value',\n value: function value() {\n return undefined;\n }\n }]);\n\n function Cursor(domNode, selection) {\n _classCallCheck(this, Cursor);\n\n var _this = _possibleConstructorReturn(this, (Cursor.__proto__ || Object.getPrototypeOf(Cursor)).call(this, domNode));\n\n _this.selection = selection;\n _this.textNode = document.createTextNode(Cursor.CONTENTS);\n _this.domNode.appendChild(_this.textNode);\n _this._length = 0;\n return _this;\n }\n\n _createClass(Cursor, [{\n key: 'detach',\n value: function detach() {\n // super.detach() will also clear domNode.__blot\n if (this.parent != null) this.parent.removeChild(this);\n }\n }, {\n key: 'format',\n value: function format(name, value) {\n if (this._length !== 0) {\n return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'format', this).call(this, name, value);\n }\n var target = this,\n index = 0;\n while (target != null && target.statics.scope !== _parchment2.default.Scope.BLOCK_BLOT) {\n index += target.offset(target.parent);\n target = target.parent;\n }\n if (target != null) {\n this._length = Cursor.CONTENTS.length;\n target.optimize();\n target.formatAt(index, Cursor.CONTENTS.length, name, value);\n this._length = 0;\n }\n }\n }, {\n key: 'index',\n value: function index(node, offset) {\n if (node === this.textNode) return 0;\n return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'index', this).call(this, node, offset);\n }\n }, {\n key: 'length',\n value: function length() {\n return this._length;\n }\n }, {\n key: 'position',\n value: function position() {\n return [this.textNode, this.textNode.data.length];\n }\n }, {\n key: 'remove',\n value: function remove() {\n _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'remove', this).call(this);\n this.parent = null;\n }\n }, {\n key: 'restore',\n value: function restore() {\n if (this.selection.composing || this.parent == null) return;\n var textNode = this.textNode;\n var range = this.selection.getNativeRange();\n var restoreText = void 0,\n start = void 0,\n end = void 0;\n if (range != null && range.start.node === textNode && range.end.node === textNode) {\n var _ref = [textNode, range.start.offset, range.end.offset];\n restoreText = _ref[0];\n start = _ref[1];\n end = _ref[2];\n }\n // Link format will insert text outside of anchor tag\n while (this.domNode.lastChild != null && this.domNode.lastChild !== this.textNode) {\n this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode);\n }\n if (this.textNode.data !== Cursor.CONTENTS) {\n var text = this.textNode.data.split(Cursor.CONTENTS).join('');\n if (this.next instanceof _text2.default) {\n restoreText = this.next.domNode;\n this.next.insertAt(0, text);\n this.textNode.data = Cursor.CONTENTS;\n } else {\n this.textNode.data = text;\n this.parent.insertBefore(_parchment2.default.create(this.textNode), this);\n this.textNode = document.createTextNode(Cursor.CONTENTS);\n this.domNode.appendChild(this.textNode);\n }\n }\n this.remove();\n if (start != null) {\n var _map = [start, end].map(function (offset) {\n return Math.max(0, Math.min(restoreText.data.length, offset - 1));\n });\n\n var _map2 = _slicedToArray(_map, 2);\n\n start = _map2[0];\n end = _map2[1];\n\n return {\n startNode: restoreText,\n startOffset: start,\n endNode: restoreText,\n endOffset: end\n };\n }\n }\n }, {\n key: 'update',\n value: function update(mutations, context) {\n var _this2 = this;\n\n if (mutations.some(function (mutation) {\n return mutation.type === 'characterData' && mutation.target === _this2.textNode;\n })) {\n var range = this.restore();\n if (range) context.range = range;\n }\n }\n }, {\n key: 'value',\n value: function value() {\n return '';\n }\n }]);\n\n return Cursor;\n}(_parchment2.default.Embed);\n\nCursor.blotName = 'cursor';\nCursor.className = 'ql-cursor';\nCursor.tagName = 'span';\nCursor.CONTENTS = '\\uFEFF'; // Zero width no break space\n\n\nexports.default = Cursor;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Container = function (_Parchment$Container) {\n _inherits(Container, _Parchment$Container);\n\n function Container() {\n _classCallCheck(this, Container);\n\n return _possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).apply(this, arguments));\n }\n\n return Container;\n}(_parchment2.default.Container);\n\nContainer.allowedChildren = [_block2.default, _block.BlockEmbed, Container];\n\nexports.default = Container;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ColorStyle = exports.ColorClass = exports.ColorAttributor = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ColorAttributor = function (_Parchment$Attributor) {\n _inherits(ColorAttributor, _Parchment$Attributor);\n\n function ColorAttributor() {\n _classCallCheck(this, ColorAttributor);\n\n return _possibleConstructorReturn(this, (ColorAttributor.__proto__ || Object.getPrototypeOf(ColorAttributor)).apply(this, arguments));\n }\n\n _createClass(ColorAttributor, [{\n key: 'value',\n value: function value(domNode) {\n var value = _get(ColorAttributor.prototype.__proto__ || Object.getPrototypeOf(ColorAttributor.prototype), 'value', this).call(this, domNode);\n if (!value.startsWith('rgb(')) return value;\n value = value.replace(/^[^\\d]+/, '').replace(/[^\\d]+$/, '');\n return '#' + value.split(',').map(function (component) {\n return ('00' + parseInt(component).toString(16)).slice(-2);\n }).join('');\n }\n }]);\n\n return ColorAttributor;\n}(_parchment2.default.Attributor.Style);\n\nvar ColorClass = new _parchment2.default.Attributor.Class('color', 'ql-color', {\n scope: _parchment2.default.Scope.INLINE\n});\nvar ColorStyle = new ColorAttributor('color', 'color', {\n scope: _parchment2.default.Scope.INLINE\n});\n\nexports.ColorAttributor = ColorAttributor;\nexports.ColorClass = ColorClass;\nexports.ColorStyle = ColorStyle;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.sanitize = exports.default = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Link = function (_Inline) {\n _inherits(Link, _Inline);\n\n function Link() {\n _classCallCheck(this, Link);\n\n return _possibleConstructorReturn(this, (Link.__proto__ || Object.getPrototypeOf(Link)).apply(this, arguments));\n }\n\n _createClass(Link, [{\n key: 'format',\n value: function format(name, value) {\n if (name !== this.statics.blotName || !value) return _get(Link.prototype.__proto__ || Object.getPrototypeOf(Link.prototype), 'format', this).call(this, name, value);\n value = this.constructor.sanitize(value);\n this.domNode.setAttribute('href', value);\n }\n }], [{\n key: 'create',\n value: function create(value) {\n var node = _get(Link.__proto__ || Object.getPrototypeOf(Link), 'create', this).call(this, value);\n value = this.sanitize(value);\n node.setAttribute('href', value);\n node.setAttribute('rel', 'noopener noreferrer');\n node.setAttribute('target', '_blank');\n return node;\n }\n }, {\n key: 'formats',\n value: function formats(domNode) {\n return domNode.getAttribute('href');\n }\n }, {\n key: 'sanitize',\n value: function sanitize(url) {\n return _sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL;\n }\n }]);\n\n return Link;\n}(_inline2.default);\n\nLink.blotName = 'link';\nLink.tagName = 'A';\nLink.SANITIZED_URL = 'about:blank';\nLink.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel'];\n\nfunction _sanitize(url, protocols) {\n var anchor = document.createElement('a');\n anchor.href = url;\n var protocol = anchor.href.slice(0, anchor.href.indexOf(':'));\n return protocols.indexOf(protocol) > -1;\n}\n\nexports.default = Link;\nexports.sanitize = _sanitize;\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _keyboard = __webpack_require__(23);\n\nvar _keyboard2 = _interopRequireDefault(_keyboard);\n\nvar _dropdown = __webpack_require__(107);\n\nvar _dropdown2 = _interopRequireDefault(_dropdown);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar optionsCounter = 0;\n\nfunction toggleAriaAttribute(element, attribute) {\n element.setAttribute(attribute, !(element.getAttribute(attribute) === 'true'));\n}\n\nvar Picker = function () {\n function Picker(select) {\n var _this = this;\n\n _classCallCheck(this, Picker);\n\n this.select = select;\n this.container = document.createElement('span');\n this.buildPicker();\n this.select.style.display = 'none';\n this.select.parentNode.insertBefore(this.container, this.select);\n\n this.label.addEventListener('mousedown', function () {\n _this.togglePicker();\n });\n this.label.addEventListener('keydown', function (event) {\n switch (event.keyCode) {\n // Allows the \"Enter\" key to open the picker\n case _keyboard2.default.keys.ENTER:\n _this.togglePicker();\n break;\n\n // Allows the \"Escape\" key to close the picker\n case _keyboard2.default.keys.ESCAPE:\n _this.escape();\n event.preventDefault();\n break;\n default:\n }\n });\n this.select.addEventListener('change', this.update.bind(this));\n }\n\n _createClass(Picker, [{\n key: 'togglePicker',\n value: function togglePicker() {\n this.container.classList.toggle('ql-expanded');\n // Toggle aria-expanded and aria-hidden to make the picker accessible\n toggleAriaAttribute(this.label, 'aria-expanded');\n toggleAriaAttribute(this.options, 'aria-hidden');\n }\n }, {\n key: 'buildItem',\n value: function buildItem(option) {\n var _this2 = this;\n\n var item = document.createElement('span');\n item.tabIndex = '0';\n item.setAttribute('role', 'button');\n\n item.classList.add('ql-picker-item');\n if (option.hasAttribute('value')) {\n item.setAttribute('data-value', option.getAttribute('value'));\n }\n if (option.textContent) {\n item.setAttribute('data-label', option.textContent);\n }\n item.addEventListener('click', function () {\n _this2.selectItem(item, true);\n });\n item.addEventListener('keydown', function (event) {\n switch (event.keyCode) {\n // Allows the \"Enter\" key to select an item\n case _keyboard2.default.keys.ENTER:\n _this2.selectItem(item, true);\n event.preventDefault();\n break;\n\n // Allows the \"Escape\" key to close the picker\n case _keyboard2.default.keys.ESCAPE:\n _this2.escape();\n event.preventDefault();\n break;\n default:\n }\n });\n\n return item;\n }\n }, {\n key: 'buildLabel',\n value: function buildLabel() {\n var label = document.createElement('span');\n label.classList.add('ql-picker-label');\n label.innerHTML = _dropdown2.default;\n label.tabIndex = '0';\n label.setAttribute('role', 'button');\n label.setAttribute('aria-expanded', 'false');\n this.container.appendChild(label);\n return label;\n }\n }, {\n key: 'buildOptions',\n value: function buildOptions() {\n var _this3 = this;\n\n var options = document.createElement('span');\n options.classList.add('ql-picker-options');\n\n // Don't want screen readers to read this until options are visible\n options.setAttribute('aria-hidden', 'true');\n options.tabIndex = '-1';\n\n // Need a unique id for aria-controls\n options.id = 'ql-picker-options-' + optionsCounter;\n optionsCounter += 1;\n this.label.setAttribute('aria-controls', options.id);\n\n this.options = options;\n\n [].slice.call(this.select.options).forEach(function (option) {\n var item = _this3.buildItem(option);\n options.appendChild(item);\n if (option.selected === true) {\n _this3.selectItem(item);\n }\n });\n this.container.appendChild(options);\n }\n }, {\n key: 'buildPicker',\n value: function buildPicker() {\n var _this4 = this;\n\n [].slice.call(this.select.attributes).forEach(function (item) {\n _this4.container.setAttribute(item.name, item.value);\n });\n this.container.classList.add('ql-picker');\n this.label = this.buildLabel();\n this.buildOptions();\n }\n }, {\n key: 'escape',\n value: function escape() {\n var _this5 = this;\n\n // Close menu and return focus to trigger label\n this.close();\n // Need setTimeout for accessibility to ensure that the browser executes\n // focus on the next process thread and after any DOM content changes\n setTimeout(function () {\n return _this5.label.focus();\n }, 1);\n }\n }, {\n key: 'close',\n value: function close() {\n this.container.classList.remove('ql-expanded');\n this.label.setAttribute('aria-expanded', 'false');\n this.options.setAttribute('aria-hidden', 'true');\n }\n }, {\n key: 'selectItem',\n value: function selectItem(item) {\n var trigger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var selected = this.container.querySelector('.ql-selected');\n if (item === selected) return;\n if (selected != null) {\n selected.classList.remove('ql-selected');\n }\n if (item == null) return;\n item.classList.add('ql-selected');\n this.select.selectedIndex = [].indexOf.call(item.parentNode.children, item);\n if (item.hasAttribute('data-value')) {\n this.label.setAttribute('data-value', item.getAttribute('data-value'));\n } else {\n this.label.removeAttribute('data-value');\n }\n if (item.hasAttribute('data-label')) {\n this.label.setAttribute('data-label', item.getAttribute('data-label'));\n } else {\n this.label.removeAttribute('data-label');\n }\n if (trigger) {\n if (typeof Event === 'function') {\n this.select.dispatchEvent(new Event('change'));\n } else if ((typeof Event === 'undefined' ? 'undefined' : _typeof(Event)) === 'object') {\n // IE11\n var event = document.createEvent('Event');\n event.initEvent('change', true, true);\n this.select.dispatchEvent(event);\n }\n this.close();\n }\n }\n }, {\n key: 'update',\n value: function update() {\n var option = void 0;\n if (this.select.selectedIndex > -1) {\n var item = this.container.querySelector('.ql-picker-options').children[this.select.selectedIndex];\n option = this.select.options[this.select.selectedIndex];\n this.selectItem(item);\n } else {\n this.selectItem(null);\n }\n var isActive = option != null && option !== this.select.querySelector('option[selected]');\n this.label.classList.toggle('ql-active', isActive);\n }\n }]);\n\n return Picker;\n}();\n\nexports.default = Picker;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _break = __webpack_require__(16);\n\nvar _break2 = _interopRequireDefault(_break);\n\nvar _container = __webpack_require__(25);\n\nvar _container2 = _interopRequireDefault(_container);\n\nvar _cursor = __webpack_require__(24);\n\nvar _cursor2 = _interopRequireDefault(_cursor);\n\nvar _embed = __webpack_require__(35);\n\nvar _embed2 = _interopRequireDefault(_embed);\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nvar _scroll = __webpack_require__(22);\n\nvar _scroll2 = _interopRequireDefault(_scroll);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _clipboard = __webpack_require__(55);\n\nvar _clipboard2 = _interopRequireDefault(_clipboard);\n\nvar _history = __webpack_require__(42);\n\nvar _history2 = _interopRequireDefault(_history);\n\nvar _keyboard = __webpack_require__(23);\n\nvar _keyboard2 = _interopRequireDefault(_keyboard);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_quill2.default.register({\n 'blots/block': _block2.default,\n 'blots/block/embed': _block.BlockEmbed,\n 'blots/break': _break2.default,\n 'blots/container': _container2.default,\n 'blots/cursor': _cursor2.default,\n 'blots/embed': _embed2.default,\n 'blots/inline': _inline2.default,\n 'blots/scroll': _scroll2.default,\n 'blots/text': _text2.default,\n\n 'modules/clipboard': _clipboard2.default,\n 'modules/history': _history2.default,\n 'modules/keyboard': _keyboard2.default\n});\n\n_parchment2.default.register(_block2.default, _break2.default, _cursor2.default, _inline2.default, _scroll2.default, _text2.default);\n\nexports.default = _quill2.default;\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Registry = __webpack_require__(1);\nvar ShadowBlot = /** @class */ (function () {\n function ShadowBlot(domNode) {\n this.domNode = domNode;\n // @ts-ignore\n this.domNode[Registry.DATA_KEY] = { blot: this };\n }\n Object.defineProperty(ShadowBlot.prototype, \"statics\", {\n // Hack for accessing inherited static methods\n get: function () {\n return this.constructor;\n },\n enumerable: true,\n configurable: true\n });\n ShadowBlot.create = function (value) {\n if (this.tagName == null) {\n throw new Registry.ParchmentError('Blot definition missing tagName');\n }\n var node;\n if (Array.isArray(this.tagName)) {\n if (typeof value === 'string') {\n value = value.toUpperCase();\n if (parseInt(value).toString() === value) {\n value = parseInt(value);\n }\n }\n if (typeof value === 'number') {\n node = document.createElement(this.tagName[value - 1]);\n }\n else if (this.tagName.indexOf(value) > -1) {\n node = document.createElement(value);\n }\n else {\n node = document.createElement(this.tagName[0]);\n }\n }\n else {\n node = document.createElement(this.tagName);\n }\n if (this.className) {\n node.classList.add(this.className);\n }\n return node;\n };\n ShadowBlot.prototype.attach = function () {\n if (this.parent != null) {\n this.scroll = this.parent.scroll;\n }\n };\n ShadowBlot.prototype.clone = function () {\n var domNode = this.domNode.cloneNode(false);\n return Registry.create(domNode);\n };\n ShadowBlot.prototype.detach = function () {\n if (this.parent != null)\n this.parent.removeChild(this);\n // @ts-ignore\n delete this.domNode[Registry.DATA_KEY];\n };\n ShadowBlot.prototype.deleteAt = function (index, length) {\n var blot = this.isolate(index, length);\n blot.remove();\n };\n ShadowBlot.prototype.formatAt = function (index, length, name, value) {\n var blot = this.isolate(index, length);\n if (Registry.query(name, Registry.Scope.BLOT) != null && value) {\n blot.wrap(name, value);\n }\n else if (Registry.query(name, Registry.Scope.ATTRIBUTE) != null) {\n var parent = Registry.create(this.statics.scope);\n blot.wrap(parent);\n parent.format(name, value);\n }\n };\n ShadowBlot.prototype.insertAt = function (index, value, def) {\n var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);\n var ref = this.split(index);\n this.parent.insertBefore(blot, ref);\n };\n ShadowBlot.prototype.insertInto = function (parentBlot, refBlot) {\n if (refBlot === void 0) { refBlot = null; }\n if (this.parent != null) {\n this.parent.children.remove(this);\n }\n var refDomNode = null;\n parentBlot.children.insertBefore(this, refBlot);\n if (refBlot != null) {\n refDomNode = refBlot.domNode;\n }\n if (this.domNode.parentNode != parentBlot.domNode ||\n this.domNode.nextSibling != refDomNode) {\n parentBlot.domNode.insertBefore(this.domNode, refDomNode);\n }\n this.parent = parentBlot;\n this.attach();\n };\n ShadowBlot.prototype.isolate = function (index, length) {\n var target = this.split(index);\n target.split(length);\n return target;\n };\n ShadowBlot.prototype.length = function () {\n return 1;\n };\n ShadowBlot.prototype.offset = function (root) {\n if (root === void 0) { root = this.parent; }\n if (this.parent == null || this == root)\n return 0;\n return this.parent.children.offset(this) + this.parent.offset(root);\n };\n ShadowBlot.prototype.optimize = function (context) {\n // TODO clean up once we use WeakMap\n // @ts-ignore\n if (this.domNode[Registry.DATA_KEY] != null) {\n // @ts-ignore\n delete this.domNode[Registry.DATA_KEY].mutations;\n }\n };\n ShadowBlot.prototype.remove = function () {\n if (this.domNode.parentNode != null) {\n this.domNode.parentNode.removeChild(this.domNode);\n }\n this.detach();\n };\n ShadowBlot.prototype.replace = function (target) {\n if (target.parent == null)\n return;\n target.parent.insertBefore(this, target.next);\n target.remove();\n };\n ShadowBlot.prototype.replaceWith = function (name, value) {\n var replacement = typeof name === 'string' ? Registry.create(name, value) : name;\n replacement.replace(this);\n return replacement;\n };\n ShadowBlot.prototype.split = function (index, force) {\n return index === 0 ? this : this.next;\n };\n ShadowBlot.prototype.update = function (mutations, context) {\n // Nothing to do by default\n };\n ShadowBlot.prototype.wrap = function (name, value) {\n var wrapper = typeof name === 'string' ? Registry.create(name, value) : name;\n if (this.parent != null) {\n this.parent.insertBefore(wrapper, this.next);\n }\n wrapper.appendChild(this);\n return wrapper;\n };\n ShadowBlot.blotName = 'abstract';\n return ShadowBlot;\n}());\nexports.default = ShadowBlot;\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nvar class_1 = __webpack_require__(32);\nvar style_1 = __webpack_require__(33);\nvar Registry = __webpack_require__(1);\nvar AttributorStore = /** @class */ (function () {\n function AttributorStore(domNode) {\n this.attributes = {};\n this.domNode = domNode;\n this.build();\n }\n AttributorStore.prototype.attribute = function (attribute, value) {\n // verb\n if (value) {\n if (attribute.add(this.domNode, value)) {\n if (attribute.value(this.domNode) != null) {\n this.attributes[attribute.attrName] = attribute;\n }\n else {\n delete this.attributes[attribute.attrName];\n }\n }\n }\n else {\n attribute.remove(this.domNode);\n delete this.attributes[attribute.attrName];\n }\n };\n AttributorStore.prototype.build = function () {\n var _this = this;\n this.attributes = {};\n var attributes = attributor_1.default.keys(this.domNode);\n var classes = class_1.default.keys(this.domNode);\n var styles = style_1.default.keys(this.domNode);\n attributes\n .concat(classes)\n .concat(styles)\n .forEach(function (name) {\n var attr = Registry.query(name, Registry.Scope.ATTRIBUTE);\n if (attr instanceof attributor_1.default) {\n _this.attributes[attr.attrName] = attr;\n }\n });\n };\n AttributorStore.prototype.copy = function (target) {\n var _this = this;\n Object.keys(this.attributes).forEach(function (key) {\n var value = _this.attributes[key].value(_this.domNode);\n target.format(key, value);\n });\n };\n AttributorStore.prototype.move = function (target) {\n var _this = this;\n this.copy(target);\n Object.keys(this.attributes).forEach(function (key) {\n _this.attributes[key].remove(_this.domNode);\n });\n this.attributes = {};\n };\n AttributorStore.prototype.values = function () {\n var _this = this;\n return Object.keys(this.attributes).reduce(function (attributes, name) {\n attributes[name] = _this.attributes[name].value(_this.domNode);\n return attributes;\n }, {});\n };\n return AttributorStore;\n}());\nexports.default = AttributorStore;\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nfunction match(node, prefix) {\n var className = node.getAttribute('class') || '';\n return className.split(/\\s+/).filter(function (name) {\n return name.indexOf(prefix + \"-\") === 0;\n });\n}\nvar ClassAttributor = /** @class */ (function (_super) {\n __extends(ClassAttributor, _super);\n function ClassAttributor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ClassAttributor.keys = function (node) {\n return (node.getAttribute('class') || '').split(/\\s+/).map(function (name) {\n return name\n .split('-')\n .slice(0, -1)\n .join('-');\n });\n };\n ClassAttributor.prototype.add = function (node, value) {\n if (!this.canAdd(node, value))\n return false;\n this.remove(node);\n node.classList.add(this.keyName + \"-\" + value);\n return true;\n };\n ClassAttributor.prototype.remove = function (node) {\n var matches = match(node, this.keyName);\n matches.forEach(function (name) {\n node.classList.remove(name);\n });\n if (node.classList.length === 0) {\n node.removeAttribute('class');\n }\n };\n ClassAttributor.prototype.value = function (node) {\n var result = match(node, this.keyName)[0] || '';\n var value = result.slice(this.keyName.length + 1); // +1 for hyphen\n return this.canAdd(node, value) ? value : '';\n };\n return ClassAttributor;\n}(attributor_1.default));\nexports.default = ClassAttributor;\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar attributor_1 = __webpack_require__(12);\nfunction camelize(name) {\n var parts = name.split('-');\n var rest = parts\n .slice(1)\n .map(function (part) {\n return part[0].toUpperCase() + part.slice(1);\n })\n .join('');\n return parts[0] + rest;\n}\nvar StyleAttributor = /** @class */ (function (_super) {\n __extends(StyleAttributor, _super);\n function StyleAttributor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StyleAttributor.keys = function (node) {\n return (node.getAttribute('style') || '').split(';').map(function (value) {\n var arr = value.split(':');\n return arr[0].trim();\n });\n };\n StyleAttributor.prototype.add = function (node, value) {\n if (!this.canAdd(node, value))\n return false;\n // @ts-ignore\n node.style[camelize(this.keyName)] = value;\n return true;\n };\n StyleAttributor.prototype.remove = function (node) {\n // @ts-ignore\n node.style[camelize(this.keyName)] = '';\n if (!node.getAttribute('style')) {\n node.removeAttribute('style');\n }\n };\n StyleAttributor.prototype.value = function (node) {\n // @ts-ignore\n var value = node.style[camelize(this.keyName)];\n return this.canAdd(node, value) ? value : '';\n };\n return StyleAttributor;\n}(attributor_1.default));\nexports.default = StyleAttributor;\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Theme = function () {\n function Theme(quill, options) {\n _classCallCheck(this, Theme);\n\n this.quill = quill;\n this.options = options;\n this.modules = {};\n }\n\n _createClass(Theme, [{\n key: 'init',\n value: function init() {\n var _this = this;\n\n Object.keys(this.options.modules).forEach(function (name) {\n if (_this.modules[name] == null) {\n _this.addModule(name);\n }\n });\n }\n }, {\n key: 'addModule',\n value: function addModule(name) {\n var moduleClass = this.quill.constructor.import('modules/' + name);\n this.modules[name] = new moduleClass(this.quill, this.options.modules[name] || {});\n return this.modules[name];\n }\n }]);\n\n return Theme;\n}();\n\nTheme.DEFAULTS = {\n modules: {}\n};\nTheme.themes = {\n 'default': Theme\n};\n\nexports.default = Theme;\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _text = __webpack_require__(7);\n\nvar _text2 = _interopRequireDefault(_text);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar GUARD_TEXT = '\\uFEFF';\n\nvar Embed = function (_Parchment$Embed) {\n _inherits(Embed, _Parchment$Embed);\n\n function Embed(node) {\n _classCallCheck(this, Embed);\n\n var _this = _possibleConstructorReturn(this, (Embed.__proto__ || Object.getPrototypeOf(Embed)).call(this, node));\n\n _this.contentNode = document.createElement('span');\n _this.contentNode.setAttribute('contenteditable', false);\n [].slice.call(_this.domNode.childNodes).forEach(function (childNode) {\n _this.contentNode.appendChild(childNode);\n });\n _this.leftGuard = document.createTextNode(GUARD_TEXT);\n _this.rightGuard = document.createTextNode(GUARD_TEXT);\n _this.domNode.appendChild(_this.leftGuard);\n _this.domNode.appendChild(_this.contentNode);\n _this.domNode.appendChild(_this.rightGuard);\n return _this;\n }\n\n _createClass(Embed, [{\n key: 'index',\n value: function index(node, offset) {\n if (node === this.leftGuard) return 0;\n if (node === this.rightGuard) return 1;\n return _get(Embed.prototype.__proto__ || Object.getPrototypeOf(Embed.prototype), 'index', this).call(this, node, offset);\n }\n }, {\n key: 'restore',\n value: function restore(node) {\n var range = void 0,\n textNode = void 0;\n var text = node.data.split(GUARD_TEXT).join('');\n if (node === this.leftGuard) {\n if (this.prev instanceof _text2.default) {\n var prevLength = this.prev.length();\n this.prev.insertAt(prevLength, text);\n range = {\n startNode: this.prev.domNode,\n startOffset: prevLength + text.length\n };\n } else {\n textNode = document.createTextNode(text);\n this.parent.insertBefore(_parchment2.default.create(textNode), this);\n range = {\n startNode: textNode,\n startOffset: text.length\n };\n }\n } else if (node === this.rightGuard) {\n if (this.next instanceof _text2.default) {\n this.next.insertAt(0, text);\n range = {\n startNode: this.next.domNode,\n startOffset: text.length\n };\n } else {\n textNode = document.createTextNode(text);\n this.parent.insertBefore(_parchment2.default.create(textNode), this.next);\n range = {\n startNode: textNode,\n startOffset: text.length\n };\n }\n }\n node.data = GUARD_TEXT;\n return range;\n }\n }, {\n key: 'update',\n value: function update(mutations, context) {\n var _this2 = this;\n\n mutations.forEach(function (mutation) {\n if (mutation.type === 'characterData' && (mutation.target === _this2.leftGuard || mutation.target === _this2.rightGuard)) {\n var range = _this2.restore(mutation.target);\n if (range) context.range = range;\n }\n });\n }\n }]);\n\n return Embed;\n}(_parchment2.default.Embed);\n\nexports.default = Embed;\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.AlignStyle = exports.AlignClass = exports.AlignAttribute = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar config = {\n scope: _parchment2.default.Scope.BLOCK,\n whitelist: ['right', 'center', 'justify']\n};\n\nvar AlignAttribute = new _parchment2.default.Attributor.Attribute('align', 'align', config);\nvar AlignClass = new _parchment2.default.Attributor.Class('align', 'ql-align', config);\nvar AlignStyle = new _parchment2.default.Attributor.Style('align', 'text-align', config);\n\nexports.AlignAttribute = AlignAttribute;\nexports.AlignClass = AlignClass;\nexports.AlignStyle = AlignStyle;\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BackgroundStyle = exports.BackgroundClass = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _color = __webpack_require__(26);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar BackgroundClass = new _parchment2.default.Attributor.Class('background', 'ql-bg', {\n scope: _parchment2.default.Scope.INLINE\n});\nvar BackgroundStyle = new _color.ColorAttributor('background', 'background-color', {\n scope: _parchment2.default.Scope.INLINE\n});\n\nexports.BackgroundClass = BackgroundClass;\nexports.BackgroundStyle = BackgroundStyle;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DirectionStyle = exports.DirectionClass = exports.DirectionAttribute = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar config = {\n scope: _parchment2.default.Scope.BLOCK,\n whitelist: ['rtl']\n};\n\nvar DirectionAttribute = new _parchment2.default.Attributor.Attribute('direction', 'dir', config);\nvar DirectionClass = new _parchment2.default.Attributor.Class('direction', 'ql-direction', config);\nvar DirectionStyle = new _parchment2.default.Attributor.Style('direction', 'direction', config);\n\nexports.DirectionAttribute = DirectionAttribute;\nexports.DirectionClass = DirectionClass;\nexports.DirectionStyle = DirectionStyle;\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FontClass = exports.FontStyle = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar config = {\n scope: _parchment2.default.Scope.INLINE,\n whitelist: ['serif', 'monospace']\n};\n\nvar FontClass = new _parchment2.default.Attributor.Class('font', 'ql-font', config);\n\nvar FontStyleAttributor = function (_Parchment$Attributor) {\n _inherits(FontStyleAttributor, _Parchment$Attributor);\n\n function FontStyleAttributor() {\n _classCallCheck(this, FontStyleAttributor);\n\n return _possibleConstructorReturn(this, (FontStyleAttributor.__proto__ || Object.getPrototypeOf(FontStyleAttributor)).apply(this, arguments));\n }\n\n _createClass(FontStyleAttributor, [{\n key: 'value',\n value: function value(node) {\n return _get(FontStyleAttributor.prototype.__proto__ || Object.getPrototypeOf(FontStyleAttributor.prototype), 'value', this).call(this, node).replace(/[\"']/g, '');\n }\n }]);\n\n return FontStyleAttributor;\n}(_parchment2.default.Attributor.Style);\n\nvar FontStyle = new FontStyleAttributor('font', 'font-family', config);\n\nexports.FontStyle = FontStyle;\nexports.FontClass = FontClass;\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SizeStyle = exports.SizeClass = undefined;\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SizeClass = new _parchment2.default.Attributor.Class('size', 'ql-size', {\n scope: _parchment2.default.Scope.INLINE,\n whitelist: ['small', 'large', 'huge']\n});\nvar SizeStyle = new _parchment2.default.Attributor.Style('size', 'font-size', {\n scope: _parchment2.default.Scope.INLINE,\n whitelist: ['10px', '18px', '32px']\n});\n\nexports.SizeClass = SizeClass;\nexports.SizeStyle = SizeStyle;\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n 'align': {\n '': __webpack_require__(76),\n 'center': __webpack_require__(77),\n 'right': __webpack_require__(78),\n 'justify': __webpack_require__(79)\n },\n 'background': __webpack_require__(80),\n 'blockquote': __webpack_require__(81),\n 'bold': __webpack_require__(82),\n 'clean': __webpack_require__(83),\n 'code': __webpack_require__(58),\n 'code-block': __webpack_require__(58),\n 'color': __webpack_require__(84),\n 'direction': {\n '': __webpack_require__(85),\n 'rtl': __webpack_require__(86)\n },\n 'float': {\n 'center': __webpack_require__(87),\n 'full': __webpack_require__(88),\n 'left': __webpack_require__(89),\n 'right': __webpack_require__(90)\n },\n 'formula': __webpack_require__(91),\n 'header': {\n '1': __webpack_require__(92),\n '2': __webpack_require__(93)\n },\n 'italic': __webpack_require__(94),\n 'image': __webpack_require__(95),\n 'indent': {\n '+1': __webpack_require__(96),\n '-1': __webpack_require__(97)\n },\n 'link': __webpack_require__(98),\n 'list': {\n 'ordered': __webpack_require__(99),\n 'bullet': __webpack_require__(100),\n 'check': __webpack_require__(101)\n },\n 'script': {\n 'sub': __webpack_require__(102),\n 'super': __webpack_require__(103)\n },\n 'strike': __webpack_require__(104),\n 'underline': __webpack_require__(105),\n 'video': __webpack_require__(106)\n};\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getLastChangeIndex = exports.default = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar History = function (_Module) {\n _inherits(History, _Module);\n\n function History(quill, options) {\n _classCallCheck(this, History);\n\n var _this = _possibleConstructorReturn(this, (History.__proto__ || Object.getPrototypeOf(History)).call(this, quill, options));\n\n _this.lastRecorded = 0;\n _this.ignoreChange = false;\n _this.clear();\n _this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (eventName, delta, oldDelta, source) {\n if (eventName !== _quill2.default.events.TEXT_CHANGE || _this.ignoreChange) return;\n if (!_this.options.userOnly || source === _quill2.default.sources.USER) {\n _this.record(delta, oldDelta);\n } else {\n _this.transform(delta);\n }\n });\n _this.quill.keyboard.addBinding({ key: 'Z', shortKey: true }, _this.undo.bind(_this));\n _this.quill.keyboard.addBinding({ key: 'Z', shortKey: true, shiftKey: true }, _this.redo.bind(_this));\n if (/Win/i.test(navigator.platform)) {\n _this.quill.keyboard.addBinding({ key: 'Y', shortKey: true }, _this.redo.bind(_this));\n }\n return _this;\n }\n\n _createClass(History, [{\n key: 'change',\n value: function change(source, dest) {\n if (this.stack[source].length === 0) return;\n var delta = this.stack[source].pop();\n this.stack[dest].push(delta);\n this.lastRecorded = 0;\n this.ignoreChange = true;\n this.quill.updateContents(delta[source], _quill2.default.sources.USER);\n this.ignoreChange = false;\n var index = getLastChangeIndex(delta[source]);\n this.quill.setSelection(index);\n }\n }, {\n key: 'clear',\n value: function clear() {\n this.stack = { undo: [], redo: [] };\n }\n }, {\n key: 'cutoff',\n value: function cutoff() {\n this.lastRecorded = 0;\n }\n }, {\n key: 'record',\n value: function record(changeDelta, oldDelta) {\n if (changeDelta.ops.length === 0) return;\n this.stack.redo = [];\n var undoDelta = this.quill.getContents().diff(oldDelta);\n var timestamp = Date.now();\n if (this.lastRecorded + this.options.delay > timestamp && this.stack.undo.length > 0) {\n var delta = this.stack.undo.pop();\n undoDelta = undoDelta.compose(delta.undo);\n changeDelta = delta.redo.compose(changeDelta);\n } else {\n this.lastRecorded = timestamp;\n }\n this.stack.undo.push({\n redo: changeDelta,\n undo: undoDelta\n });\n if (this.stack.undo.length > this.options.maxStack) {\n this.stack.undo.shift();\n }\n }\n }, {\n key: 'redo',\n value: function redo() {\n this.change('redo', 'undo');\n }\n }, {\n key: 'transform',\n value: function transform(delta) {\n this.stack.undo.forEach(function (change) {\n change.undo = delta.transform(change.undo, true);\n change.redo = delta.transform(change.redo, true);\n });\n this.stack.redo.forEach(function (change) {\n change.undo = delta.transform(change.undo, true);\n change.redo = delta.transform(change.redo, true);\n });\n }\n }, {\n key: 'undo',\n value: function undo() {\n this.change('undo', 'redo');\n }\n }]);\n\n return History;\n}(_module2.default);\n\nHistory.DEFAULTS = {\n delay: 1000,\n maxStack: 100,\n userOnly: false\n};\n\nfunction endsWithNewlineChange(delta) {\n var lastOp = delta.ops[delta.ops.length - 1];\n if (lastOp == null) return false;\n if (lastOp.insert != null) {\n return typeof lastOp.insert === 'string' && lastOp.insert.endsWith('\\n');\n }\n if (lastOp.attributes != null) {\n return Object.keys(lastOp.attributes).some(function (attr) {\n return _parchment2.default.query(attr, _parchment2.default.Scope.BLOCK) != null;\n });\n }\n return false;\n}\n\nfunction getLastChangeIndex(delta) {\n var deleteLength = delta.reduce(function (length, op) {\n length += op.delete || 0;\n return length;\n }, 0);\n var changeIndex = delta.length() - deleteLength;\n if (endsWithNewlineChange(delta)) {\n changeIndex -= 1;\n }\n return changeIndex;\n}\n\nexports.default = History;\nexports.getLastChangeIndex = getLastChangeIndex;\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.BaseTooltip = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _emitter = __webpack_require__(8);\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _keyboard = __webpack_require__(23);\n\nvar _keyboard2 = _interopRequireDefault(_keyboard);\n\nvar _theme = __webpack_require__(34);\n\nvar _theme2 = _interopRequireDefault(_theme);\n\nvar _colorPicker = __webpack_require__(59);\n\nvar _colorPicker2 = _interopRequireDefault(_colorPicker);\n\nvar _iconPicker = __webpack_require__(60);\n\nvar _iconPicker2 = _interopRequireDefault(_iconPicker);\n\nvar _picker = __webpack_require__(28);\n\nvar _picker2 = _interopRequireDefault(_picker);\n\nvar _tooltip = __webpack_require__(61);\n\nvar _tooltip2 = _interopRequireDefault(_tooltip);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ALIGNS = [false, 'center', 'right', 'justify'];\n\nvar COLORS = [\"#000000\", \"#e60000\", \"#ff9900\", \"#ffff00\", \"#008a00\", \"#0066cc\", \"#9933ff\", \"#ffffff\", \"#facccc\", \"#ffebcc\", \"#ffffcc\", \"#cce8cc\", \"#cce0f5\", \"#ebd6ff\", \"#bbbbbb\", \"#f06666\", \"#ffc266\", \"#ffff66\", \"#66b966\", \"#66a3e0\", \"#c285ff\", \"#888888\", \"#a10000\", \"#b26b00\", \"#b2b200\", \"#006100\", \"#0047b2\", \"#6b24b2\", \"#444444\", \"#5c0000\", \"#663d00\", \"#666600\", \"#003700\", \"#002966\", \"#3d1466\"];\n\nvar FONTS = [false, 'serif', 'monospace'];\n\nvar HEADERS = ['1', '2', '3', false];\n\nvar SIZES = ['small', false, 'large', 'huge'];\n\nvar BaseTheme = function (_Theme) {\n _inherits(BaseTheme, _Theme);\n\n function BaseTheme(quill, options) {\n _classCallCheck(this, BaseTheme);\n\n var _this = _possibleConstructorReturn(this, (BaseTheme.__proto__ || Object.getPrototypeOf(BaseTheme)).call(this, quill, options));\n\n var listener = function listener(e) {\n if (!document.body.contains(quill.root)) {\n return document.body.removeEventListener('click', listener);\n }\n if (_this.tooltip != null && !_this.tooltip.root.contains(e.target) && document.activeElement !== _this.tooltip.textbox && !_this.quill.hasFocus()) {\n _this.tooltip.hide();\n }\n if (_this.pickers != null) {\n _this.pickers.forEach(function (picker) {\n if (!picker.container.contains(e.target)) {\n picker.close();\n }\n });\n }\n };\n quill.emitter.listenDOM('click', document.body, listener);\n return _this;\n }\n\n _createClass(BaseTheme, [{\n key: 'addModule',\n value: function addModule(name) {\n var module = _get(BaseTheme.prototype.__proto__ || Object.getPrototypeOf(BaseTheme.prototype), 'addModule', this).call(this, name);\n if (name === 'toolbar') {\n this.extendToolbar(module);\n }\n return module;\n }\n }, {\n key: 'buildButtons',\n value: function buildButtons(buttons, icons) {\n buttons.forEach(function (button) {\n var className = button.getAttribute('class') || '';\n className.split(/\\s+/).forEach(function (name) {\n if (!name.startsWith('ql-')) return;\n name = name.slice('ql-'.length);\n if (icons[name] == null) return;\n if (name === 'direction') {\n button.innerHTML = icons[name][''] + icons[name]['rtl'];\n } else if (typeof icons[name] === 'string') {\n button.innerHTML = icons[name];\n } else {\n var value = button.value || '';\n if (value != null && icons[name][value]) {\n button.innerHTML = icons[name][value];\n }\n }\n });\n });\n }\n }, {\n key: 'buildPickers',\n value: function buildPickers(selects, icons) {\n var _this2 = this;\n\n this.pickers = selects.map(function (select) {\n if (select.classList.contains('ql-align')) {\n if (select.querySelector('option') == null) {\n fillSelect(select, ALIGNS);\n }\n return new _iconPicker2.default(select, icons.align);\n } else if (select.classList.contains('ql-background') || select.classList.contains('ql-color')) {\n var format = select.classList.contains('ql-background') ? 'background' : 'color';\n if (select.querySelector('option') == null) {\n fillSelect(select, COLORS, format === 'background' ? '#ffffff' : '#000000');\n }\n return new _colorPicker2.default(select, icons[format]);\n } else {\n if (select.querySelector('option') == null) {\n if (select.classList.contains('ql-font')) {\n fillSelect(select, FONTS);\n } else if (select.classList.contains('ql-header')) {\n fillSelect(select, HEADERS);\n } else if (select.classList.contains('ql-size')) {\n fillSelect(select, SIZES);\n }\n }\n return new _picker2.default(select);\n }\n });\n var update = function update() {\n _this2.pickers.forEach(function (picker) {\n picker.update();\n });\n };\n this.quill.on(_emitter2.default.events.EDITOR_CHANGE, update);\n }\n }]);\n\n return BaseTheme;\n}(_theme2.default);\n\nBaseTheme.DEFAULTS = (0, _extend2.default)(true, {}, _theme2.default.DEFAULTS, {\n modules: {\n toolbar: {\n handlers: {\n formula: function formula() {\n this.quill.theme.tooltip.edit('formula');\n },\n image: function image() {\n var _this3 = this;\n\n var fileInput = this.container.querySelector('input.ql-image[type=file]');\n if (fileInput == null) {\n fileInput = document.createElement('input');\n fileInput.setAttribute('type', 'file');\n fileInput.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon');\n fileInput.classList.add('ql-image');\n fileInput.addEventListener('change', function () {\n if (fileInput.files != null && fileInput.files[0] != null) {\n var reader = new FileReader();\n reader.onload = function (e) {\n var range = _this3.quill.getSelection(true);\n _this3.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert({ image: e.target.result }), _emitter2.default.sources.USER);\n _this3.quill.setSelection(range.index + 1, _emitter2.default.sources.SILENT);\n fileInput.value = \"\";\n };\n reader.readAsDataURL(fileInput.files[0]);\n }\n });\n this.container.appendChild(fileInput);\n }\n fileInput.click();\n },\n video: function video() {\n this.quill.theme.tooltip.edit('video');\n }\n }\n }\n }\n});\n\nvar BaseTooltip = function (_Tooltip) {\n _inherits(BaseTooltip, _Tooltip);\n\n function BaseTooltip(quill, boundsContainer) {\n _classCallCheck(this, BaseTooltip);\n\n var _this4 = _possibleConstructorReturn(this, (BaseTooltip.__proto__ || Object.getPrototypeOf(BaseTooltip)).call(this, quill, boundsContainer));\n\n _this4.textbox = _this4.root.querySelector('input[type=\"text\"]');\n _this4.listen();\n return _this4;\n }\n\n _createClass(BaseTooltip, [{\n key: 'listen',\n value: function listen() {\n var _this5 = this;\n\n this.textbox.addEventListener('keydown', function (event) {\n if (_keyboard2.default.match(event, 'enter')) {\n _this5.save();\n event.preventDefault();\n } else if (_keyboard2.default.match(event, 'escape')) {\n _this5.cancel();\n event.preventDefault();\n }\n });\n }\n }, {\n key: 'cancel',\n value: function cancel() {\n this.hide();\n }\n }, {\n key: 'edit',\n value: function edit() {\n var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'link';\n var preview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n this.root.classList.remove('ql-hidden');\n this.root.classList.add('ql-editing');\n if (preview != null) {\n this.textbox.value = preview;\n } else if (mode !== this.root.getAttribute('data-mode')) {\n this.textbox.value = '';\n }\n this.position(this.quill.getBounds(this.quill.selection.savedRange));\n this.textbox.select();\n this.textbox.setAttribute('placeholder', this.textbox.getAttribute('data-' + mode) || '');\n this.root.setAttribute('data-mode', mode);\n }\n }, {\n key: 'restoreFocus',\n value: function restoreFocus() {\n var scrollTop = this.quill.scrollingContainer.scrollTop;\n this.quill.focus();\n this.quill.scrollingContainer.scrollTop = scrollTop;\n }\n }, {\n key: 'save',\n value: function save() {\n var value = this.textbox.value;\n switch (this.root.getAttribute('data-mode')) {\n case 'link':\n {\n var scrollTop = this.quill.root.scrollTop;\n if (this.linkRange) {\n this.quill.formatText(this.linkRange, 'link', value, _emitter2.default.sources.USER);\n delete this.linkRange;\n } else {\n this.restoreFocus();\n this.quill.format('link', value, _emitter2.default.sources.USER);\n }\n this.quill.root.scrollTop = scrollTop;\n break;\n }\n case 'video':\n {\n value = extractVideoUrl(value);\n } // eslint-disable-next-line no-fallthrough\n case 'formula':\n {\n if (!value) break;\n var range = this.quill.getSelection(true);\n if (range != null) {\n var index = range.index + range.length;\n this.quill.insertEmbed(index, this.root.getAttribute('data-mode'), value, _emitter2.default.sources.USER);\n if (this.root.getAttribute('data-mode') === 'formula') {\n this.quill.insertText(index + 1, ' ', _emitter2.default.sources.USER);\n }\n this.quill.setSelection(index + 2, _emitter2.default.sources.USER);\n }\n break;\n }\n default:\n }\n this.textbox.value = '';\n this.hide();\n }\n }]);\n\n return BaseTooltip;\n}(_tooltip2.default);\n\nfunction extractVideoUrl(url) {\n var match = url.match(/^(?:(https?):\\/\\/)?(?:(?:www|m)\\.)?youtube\\.com\\/watch.*v=([a-zA-Z0-9_-]+)/) || url.match(/^(?:(https?):\\/\\/)?(?:(?:www|m)\\.)?youtu\\.be\\/([a-zA-Z0-9_-]+)/);\n if (match) {\n return (match[1] || 'https') + '://www.youtube.com/embed/' + match[2] + '?showinfo=0';\n }\n if (match = url.match(/^(?:(https?):\\/\\/)?(?:www\\.)?vimeo\\.com\\/(\\d+)/)) {\n // eslint-disable-line no-cond-assign\n return (match[1] || 'https') + '://player.vimeo.com/video/' + match[2] + '/';\n }\n return url;\n}\n\nfunction fillSelect(select, values) {\n var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n values.forEach(function (value) {\n var option = document.createElement('option');\n if (value === defaultValue) {\n option.setAttribute('selected', 'selected');\n } else {\n option.setAttribute('value', value);\n }\n select.appendChild(option);\n });\n}\n\nexports.BaseTooltip = BaseTooltip;\nexports.default = BaseTheme;\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar LinkedList = /** @class */ (function () {\n function LinkedList() {\n this.head = this.tail = null;\n this.length = 0;\n }\n LinkedList.prototype.append = function () {\n var nodes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n nodes[_i] = arguments[_i];\n }\n this.insertBefore(nodes[0], null);\n if (nodes.length > 1) {\n this.append.apply(this, nodes.slice(1));\n }\n };\n LinkedList.prototype.contains = function (node) {\n var cur, next = this.iterator();\n while ((cur = next())) {\n if (cur === node)\n return true;\n }\n return false;\n };\n LinkedList.prototype.insertBefore = function (node, refNode) {\n if (!node)\n return;\n node.next = refNode;\n if (refNode != null) {\n node.prev = refNode.prev;\n if (refNode.prev != null) {\n refNode.prev.next = node;\n }\n refNode.prev = node;\n if (refNode === this.head) {\n this.head = node;\n }\n }\n else if (this.tail != null) {\n this.tail.next = node;\n node.prev = this.tail;\n this.tail = node;\n }\n else {\n node.prev = null;\n this.head = this.tail = node;\n }\n this.length += 1;\n };\n LinkedList.prototype.offset = function (target) {\n var index = 0, cur = this.head;\n while (cur != null) {\n if (cur === target)\n return index;\n index += cur.length();\n cur = cur.next;\n }\n return -1;\n };\n LinkedList.prototype.remove = function (node) {\n if (!this.contains(node))\n return;\n if (node.prev != null)\n node.prev.next = node.next;\n if (node.next != null)\n node.next.prev = node.prev;\n if (node === this.head)\n this.head = node.next;\n if (node === this.tail)\n this.tail = node.prev;\n this.length -= 1;\n };\n LinkedList.prototype.iterator = function (curNode) {\n if (curNode === void 0) { curNode = this.head; }\n // TODO use yield when we can\n return function () {\n var ret = curNode;\n if (curNode != null)\n curNode = curNode.next;\n return ret;\n };\n };\n LinkedList.prototype.find = function (index, inclusive) {\n if (inclusive === void 0) { inclusive = false; }\n var cur, next = this.iterator();\n while ((cur = next())) {\n var length = cur.length();\n if (index < length ||\n (inclusive && index === length && (cur.next == null || cur.next.length() !== 0))) {\n return [cur, index];\n }\n index -= length;\n }\n return [null, 0];\n };\n LinkedList.prototype.forEach = function (callback) {\n var cur, next = this.iterator();\n while ((cur = next())) {\n callback(cur);\n }\n };\n LinkedList.prototype.forEachAt = function (index, length, callback) {\n if (length <= 0)\n return;\n var _a = this.find(index), startNode = _a[0], offset = _a[1];\n var cur, curIndex = index - offset, next = this.iterator(startNode);\n while ((cur = next()) && curIndex < index + length) {\n var curLength = cur.length();\n if (index > curIndex) {\n callback(cur, index - curIndex, Math.min(length, curIndex + curLength - index));\n }\n else {\n callback(cur, 0, Math.min(curLength, index + length - curIndex));\n }\n curIndex += curLength;\n }\n };\n LinkedList.prototype.map = function (callback) {\n return this.reduce(function (memo, cur) {\n memo.push(callback(cur));\n return memo;\n }, []);\n };\n LinkedList.prototype.reduce = function (callback, memo) {\n var cur, next = this.iterator();\n while ((cur = next())) {\n memo = callback(memo, cur);\n }\n return memo;\n };\n return LinkedList;\n}());\nexports.default = LinkedList;\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar container_1 = __webpack_require__(17);\nvar Registry = __webpack_require__(1);\nvar OBSERVER_CONFIG = {\n attributes: true,\n characterData: true,\n characterDataOldValue: true,\n childList: true,\n subtree: true,\n};\nvar MAX_OPTIMIZE_ITERATIONS = 100;\nvar ScrollBlot = /** @class */ (function (_super) {\n __extends(ScrollBlot, _super);\n function ScrollBlot(node) {\n var _this = _super.call(this, node) || this;\n _this.scroll = _this;\n _this.observer = new MutationObserver(function (mutations) {\n _this.update(mutations);\n });\n _this.observer.observe(_this.domNode, OBSERVER_CONFIG);\n _this.attach();\n return _this;\n }\n ScrollBlot.prototype.detach = function () {\n _super.prototype.detach.call(this);\n this.observer.disconnect();\n };\n ScrollBlot.prototype.deleteAt = function (index, length) {\n this.update();\n if (index === 0 && length === this.length()) {\n this.children.forEach(function (child) {\n child.remove();\n });\n }\n else {\n _super.prototype.deleteAt.call(this, index, length);\n }\n };\n ScrollBlot.prototype.formatAt = function (index, length, name, value) {\n this.update();\n _super.prototype.formatAt.call(this, index, length, name, value);\n };\n ScrollBlot.prototype.insertAt = function (index, value, def) {\n this.update();\n _super.prototype.insertAt.call(this, index, value, def);\n };\n ScrollBlot.prototype.optimize = function (mutations, context) {\n var _this = this;\n if (mutations === void 0) { mutations = []; }\n if (context === void 0) { context = {}; }\n _super.prototype.optimize.call(this, context);\n // We must modify mutations directly, cannot make copy and then modify\n var records = [].slice.call(this.observer.takeRecords());\n // Array.push currently seems to be implemented by a non-tail recursive function\n // so we cannot just mutations.push.apply(mutations, this.observer.takeRecords());\n while (records.length > 0)\n mutations.push(records.pop());\n // TODO use WeakMap\n var mark = function (blot, markParent) {\n if (markParent === void 0) { markParent = true; }\n if (blot == null || blot === _this)\n return;\n if (blot.domNode.parentNode == null)\n return;\n // @ts-ignore\n if (blot.domNode[Registry.DATA_KEY].mutations == null) {\n // @ts-ignore\n blot.domNode[Registry.DATA_KEY].mutations = [];\n }\n if (markParent)\n mark(blot.parent);\n };\n var optimize = function (blot) {\n // Post-order traversal\n if (\n // @ts-ignore\n blot.domNode[Registry.DATA_KEY] == null ||\n // @ts-ignore\n blot.domNode[Registry.DATA_KEY].mutations == null) {\n return;\n }\n if (blot instanceof container_1.default) {\n blot.children.forEach(optimize);\n }\n blot.optimize(context);\n };\n var remaining = mutations;\n for (var i = 0; remaining.length > 0; i += 1) {\n if (i >= MAX_OPTIMIZE_ITERATIONS) {\n throw new Error('[Parchment] Maximum optimize iterations reached');\n }\n remaining.forEach(function (mutation) {\n var blot = Registry.find(mutation.target, true);\n if (blot == null)\n return;\n if (blot.domNode === mutation.target) {\n if (mutation.type === 'childList') {\n mark(Registry.find(mutation.previousSibling, false));\n [].forEach.call(mutation.addedNodes, function (node) {\n var child = Registry.find(node, false);\n mark(child, false);\n if (child instanceof container_1.default) {\n child.children.forEach(function (grandChild) {\n mark(grandChild, false);\n });\n }\n });\n }\n else if (mutation.type === 'attributes') {\n mark(blot.prev);\n }\n }\n mark(blot);\n });\n this.children.forEach(optimize);\n remaining = [].slice.call(this.observer.takeRecords());\n records = remaining.slice();\n while (records.length > 0)\n mutations.push(records.pop());\n }\n };\n ScrollBlot.prototype.update = function (mutations, context) {\n var _this = this;\n if (context === void 0) { context = {}; }\n mutations = mutations || this.observer.takeRecords();\n // TODO use WeakMap\n mutations\n .map(function (mutation) {\n var blot = Registry.find(mutation.target, true);\n if (blot == null)\n return null;\n // @ts-ignore\n if (blot.domNode[Registry.DATA_KEY].mutations == null) {\n // @ts-ignore\n blot.domNode[Registry.DATA_KEY].mutations = [mutation];\n return blot;\n }\n else {\n // @ts-ignore\n blot.domNode[Registry.DATA_KEY].mutations.push(mutation);\n return null;\n }\n })\n .forEach(function (blot) {\n if (blot == null ||\n blot === _this ||\n //@ts-ignore\n blot.domNode[Registry.DATA_KEY] == null)\n return;\n // @ts-ignore\n blot.update(blot.domNode[Registry.DATA_KEY].mutations || [], context);\n });\n // @ts-ignore\n if (this.domNode[Registry.DATA_KEY].mutations != null) {\n // @ts-ignore\n _super.prototype.update.call(this, this.domNode[Registry.DATA_KEY].mutations, context);\n }\n this.optimize(mutations, context);\n };\n ScrollBlot.blotName = 'scroll';\n ScrollBlot.defaultChild = 'block';\n ScrollBlot.scope = Registry.Scope.BLOCK_BLOT;\n ScrollBlot.tagName = 'DIV';\n return ScrollBlot;\n}(container_1.default));\nexports.default = ScrollBlot;\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar format_1 = __webpack_require__(18);\nvar Registry = __webpack_require__(1);\n// Shallow object comparison\nfunction isEqual(obj1, obj2) {\n if (Object.keys(obj1).length !== Object.keys(obj2).length)\n return false;\n // @ts-ignore\n for (var prop in obj1) {\n // @ts-ignore\n if (obj1[prop] !== obj2[prop])\n return false;\n }\n return true;\n}\nvar InlineBlot = /** @class */ (function (_super) {\n __extends(InlineBlot, _super);\n function InlineBlot() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n InlineBlot.formats = function (domNode) {\n if (domNode.tagName === InlineBlot.tagName)\n return undefined;\n return _super.formats.call(this, domNode);\n };\n InlineBlot.prototype.format = function (name, value) {\n var _this = this;\n if (name === this.statics.blotName && !value) {\n this.children.forEach(function (child) {\n if (!(child instanceof format_1.default)) {\n child = child.wrap(InlineBlot.blotName, true);\n }\n _this.attributes.copy(child);\n });\n this.unwrap();\n }\n else {\n _super.prototype.format.call(this, name, value);\n }\n };\n InlineBlot.prototype.formatAt = function (index, length, name, value) {\n if (this.formats()[name] != null || Registry.query(name, Registry.Scope.ATTRIBUTE)) {\n var blot = this.isolate(index, length);\n blot.format(name, value);\n }\n else {\n _super.prototype.formatAt.call(this, index, length, name, value);\n }\n };\n InlineBlot.prototype.optimize = function (context) {\n _super.prototype.optimize.call(this, context);\n var formats = this.formats();\n if (Object.keys(formats).length === 0) {\n return this.unwrap(); // unformatted span\n }\n var next = this.next;\n if (next instanceof InlineBlot && next.prev === this && isEqual(formats, next.formats())) {\n next.moveChildren(this);\n next.remove();\n }\n };\n InlineBlot.blotName = 'inline';\n InlineBlot.scope = Registry.Scope.INLINE_BLOT;\n InlineBlot.tagName = 'SPAN';\n return InlineBlot;\n}(format_1.default));\nexports.default = InlineBlot;\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar format_1 = __webpack_require__(18);\nvar Registry = __webpack_require__(1);\nvar BlockBlot = /** @class */ (function (_super) {\n __extends(BlockBlot, _super);\n function BlockBlot() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BlockBlot.formats = function (domNode) {\n var tagName = Registry.query(BlockBlot.blotName).tagName;\n if (domNode.tagName === tagName)\n return undefined;\n return _super.formats.call(this, domNode);\n };\n BlockBlot.prototype.format = function (name, value) {\n if (Registry.query(name, Registry.Scope.BLOCK) == null) {\n return;\n }\n else if (name === this.statics.blotName && !value) {\n this.replaceWith(BlockBlot.blotName);\n }\n else {\n _super.prototype.format.call(this, name, value);\n }\n };\n BlockBlot.prototype.formatAt = function (index, length, name, value) {\n if (Registry.query(name, Registry.Scope.BLOCK) != null) {\n this.format(name, value);\n }\n else {\n _super.prototype.formatAt.call(this, index, length, name, value);\n }\n };\n BlockBlot.prototype.insertAt = function (index, value, def) {\n if (def == null || Registry.query(value, Registry.Scope.INLINE) != null) {\n // Insert text or inline\n _super.prototype.insertAt.call(this, index, value, def);\n }\n else {\n var after = this.split(index);\n var blot = Registry.create(value, def);\n after.parent.insertBefore(blot, after);\n }\n };\n BlockBlot.prototype.update = function (mutations, context) {\n if (navigator.userAgent.match(/Trident/)) {\n this.build();\n }\n else {\n _super.prototype.update.call(this, mutations, context);\n }\n };\n BlockBlot.blotName = 'block';\n BlockBlot.scope = Registry.Scope.BLOCK_BLOT;\n BlockBlot.tagName = 'P';\n return BlockBlot;\n}(format_1.default));\nexports.default = BlockBlot;\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar leaf_1 = __webpack_require__(19);\nvar EmbedBlot = /** @class */ (function (_super) {\n __extends(EmbedBlot, _super);\n function EmbedBlot() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n EmbedBlot.formats = function (domNode) {\n return undefined;\n };\n EmbedBlot.prototype.format = function (name, value) {\n // super.formatAt wraps, which is what we want in general,\n // but this allows subclasses to overwrite for formats\n // that just apply to particular embeds\n _super.prototype.formatAt.call(this, 0, this.length(), name, value);\n };\n EmbedBlot.prototype.formatAt = function (index, length, name, value) {\n if (index === 0 && length === this.length()) {\n this.format(name, value);\n }\n else {\n _super.prototype.formatAt.call(this, index, length, name, value);\n }\n };\n EmbedBlot.prototype.formats = function () {\n return this.statics.formats(this.domNode);\n };\n return EmbedBlot;\n}(leaf_1.default));\nexports.default = EmbedBlot;\n\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar leaf_1 = __webpack_require__(19);\nvar Registry = __webpack_require__(1);\nvar TextBlot = /** @class */ (function (_super) {\n __extends(TextBlot, _super);\n function TextBlot(node) {\n var _this = _super.call(this, node) || this;\n _this.text = _this.statics.value(_this.domNode);\n return _this;\n }\n TextBlot.create = function (value) {\n return document.createTextNode(value);\n };\n TextBlot.value = function (domNode) {\n var text = domNode.data;\n // @ts-ignore\n if (text['normalize'])\n text = text['normalize']();\n return text;\n };\n TextBlot.prototype.deleteAt = function (index, length) {\n this.domNode.data = this.text = this.text.slice(0, index) + this.text.slice(index + length);\n };\n TextBlot.prototype.index = function (node, offset) {\n if (this.domNode === node) {\n return offset;\n }\n return -1;\n };\n TextBlot.prototype.insertAt = function (index, value, def) {\n if (def == null) {\n this.text = this.text.slice(0, index) + value + this.text.slice(index);\n this.domNode.data = this.text;\n }\n else {\n _super.prototype.insertAt.call(this, index, value, def);\n }\n };\n TextBlot.prototype.length = function () {\n return this.text.length;\n };\n TextBlot.prototype.optimize = function (context) {\n _super.prototype.optimize.call(this, context);\n this.text = this.statics.value(this.domNode);\n if (this.text.length === 0) {\n this.remove();\n }\n else if (this.next instanceof TextBlot && this.next.prev === this) {\n this.insertAt(this.length(), this.next.value());\n this.next.remove();\n }\n };\n TextBlot.prototype.position = function (index, inclusive) {\n if (inclusive === void 0) { inclusive = false; }\n return [this.domNode, index];\n };\n TextBlot.prototype.split = function (index, force) {\n if (force === void 0) { force = false; }\n if (!force) {\n if (index === 0)\n return this;\n if (index === this.length())\n return this.next;\n }\n var after = Registry.create(this.domNode.splitText(index));\n this.parent.insertBefore(after, this.next);\n this.text = this.statics.value(this.domNode);\n return after;\n };\n TextBlot.prototype.update = function (mutations, context) {\n var _this = this;\n if (mutations.some(function (mutation) {\n return mutation.type === 'characterData' && mutation.target === _this.domNode;\n })) {\n this.text = this.statics.value(this.domNode);\n }\n };\n TextBlot.prototype.value = function () {\n return this.text;\n };\n TextBlot.blotName = 'text';\n TextBlot.scope = Registry.Scope.INLINE_BLOT;\n return TextBlot;\n}(leaf_1.default));\nexports.default = TextBlot;\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar elem = document.createElement('div');\nelem.classList.toggle('test-class', false);\nif (elem.classList.contains('test-class')) {\n var _toggle = DOMTokenList.prototype.toggle;\n DOMTokenList.prototype.toggle = function (token, force) {\n if (arguments.length > 1 && !this.contains(token) === !force) {\n return force;\n } else {\n return _toggle.call(this, token);\n }\n };\n}\n\nif (!String.prototype.startsWith) {\n String.prototype.startsWith = function (searchString, position) {\n position = position || 0;\n return this.substr(position, searchString.length) === searchString;\n };\n}\n\nif (!String.prototype.endsWith) {\n String.prototype.endsWith = function (searchString, position) {\n var subjectString = this.toString();\n if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {\n position = subjectString.length;\n }\n position -= searchString.length;\n var lastIndex = subjectString.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n };\n}\n\nif (!Array.prototype.find) {\n Object.defineProperty(Array.prototype, \"find\", {\n value: function value(predicate) {\n if (this === null) {\n throw new TypeError('Array.prototype.find called on null or undefined');\n }\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate must be a function');\n }\n var list = Object(this);\n var length = list.length >>> 0;\n var thisArg = arguments[1];\n var value;\n\n for (var i = 0; i < length; i++) {\n value = list[i];\n if (predicate.call(thisArg, value, i, list)) {\n return value;\n }\n }\n return undefined;\n }\n });\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n // Disable resizing in Firefox\n document.execCommand(\"enableObjectResizing\", false, false);\n // Disable automatic linkifying in IE11\n document.execCommand(\"autoUrlDetect\", false, false);\n});\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports) {\n\n/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int} cursor_pos Expected edit position in text1 (optional)\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos) {\n // Check for equality (speedup).\n if (text1 == text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n // Check cursor_pos within bounds\n if (cursor_pos < 0 || text1.length < cursor_pos) {\n cursor_pos = null;\n }\n\n // Trim off common prefix (speedup).\n var commonlength = diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs);\n if (cursor_pos != null) {\n diffs = fix_cursor(diffs, cursor_pos);\n }\n diffs = fix_emoji(diffs);\n return diffs;\n};\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i != -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [[DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)]];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length == 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n};\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = (delta % 2 != 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) == text2.charAt(y1)) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ==\n text2.charAt(text2_length - y2 - 1)) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n};\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = diff_main(text1a, text2a);\n var diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n};\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 ||\n text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = '';\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) != -1) {\n var prefixLength = diff_commonPrefix(longtext.substring(i),\n shorttext.substring(j));\n var suffixLength = diff_commonSuffix(longtext.substring(0, i),\n shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 2));\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n};\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n */\nfunction diff_cleanupMerge(diffs) {\n diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end.\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n var commonlength;\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete + count_insert > 1) {\n if (count_delete !== 0 && count_insert !== 0) {\n // Factor out any common prefixies.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if ((pointer - count_delete - count_insert) > 0 &&\n diffs[pointer - count_delete - count_insert - 1][0] ==\n DIFF_EQUAL) {\n diffs[pointer - count_delete - count_insert - 1][1] +=\n text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, [DIFF_EQUAL,\n text_insert.substring(0, commonlength)]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixies.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] = text_insert.substring(text_insert.length -\n commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length -\n commonlength);\n text_delete = text_delete.substring(0, text_delete.length -\n commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n if (count_delete === 0) {\n diffs.splice(pointer - count_insert,\n count_delete + count_insert, [DIFF_INSERT, text_insert]);\n } else if (count_insert === 0) {\n diffs.splice(pointer - count_delete,\n count_delete + count_insert, [DIFF_DELETE, text_delete]);\n } else {\n diffs.splice(pointer - count_delete - count_insert,\n count_delete + count_insert, [DIFF_DELETE, text_delete],\n [DIFF_INSERT, text_insert]);\n }\n pointer = pointer - count_delete - count_insert +\n (count_delete ? 1 : 0) + (count_insert ? 1 : 0) + 1;\n } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs);\n }\n};\n\n\nvar diff = diff_main;\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nmodule.exports = diff;\n\n/*\n * Modify a diff such that the cursor position points to the start of a change:\n * E.g.\n * cursor_normalize_diff([[DIFF_EQUAL, 'abc']], 1)\n * => [1, [[DIFF_EQUAL, 'a'], [DIFF_EQUAL, 'bc']]]\n * cursor_normalize_diff([[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xyz']], 2)\n * => [2, [[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xy'], [DIFF_DELETE, 'z']]]\n *\n * @param {Array} diffs Array of diff tuples\n * @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!\n * @return {Array} A tuple [cursor location in the modified diff, modified diff]\n */\nfunction cursor_normalize_diff (diffs, cursor_pos) {\n if (cursor_pos === 0) {\n return [DIFF_EQUAL, diffs];\n }\n for (var current_pos = 0, i = 0; i < diffs.length; i++) {\n var d = diffs[i];\n if (d[0] === DIFF_DELETE || d[0] === DIFF_EQUAL) {\n var next_pos = current_pos + d[1].length;\n if (cursor_pos === next_pos) {\n return [i + 1, diffs];\n } else if (cursor_pos < next_pos) {\n // copy to prevent side effects\n diffs = diffs.slice();\n // split d into two diff changes\n var split_pos = cursor_pos - current_pos;\n var d_left = [d[0], d[1].slice(0, split_pos)];\n var d_right = [d[0], d[1].slice(split_pos)];\n diffs.splice(i, 1, d_left, d_right);\n return [i + 1, diffs];\n } else {\n current_pos = next_pos;\n }\n }\n }\n throw new Error('cursor_pos is out of bounds!')\n}\n\n/*\n * Modify a diff such that the edit position is \"shifted\" to the proposed edit location (cursor_position).\n *\n * Case 1)\n * Check if a naive shift is possible:\n * [0, X], [ 1, Y] -> [ 1, Y], [0, X] (if X + Y === Y + X)\n * [0, X], [-1, Y] -> [-1, Y], [0, X] (if X + Y === Y + X) - holds same result\n * Case 2)\n * Check if the following shifts are possible:\n * [0, 'pre'], [ 1, 'prefix'] -> [ 1, 'pre'], [0, 'pre'], [ 1, 'fix']\n * [0, 'pre'], [-1, 'prefix'] -> [-1, 'pre'], [0, 'pre'], [-1, 'fix']\n * ^ ^\n * d d_next\n *\n * @param {Array} diffs Array of diff tuples\n * @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!\n * @return {Array} Array of diff tuples\n */\nfunction fix_cursor (diffs, cursor_pos) {\n var norm = cursor_normalize_diff(diffs, cursor_pos);\n var ndiffs = norm[1];\n var cursor_pointer = norm[0];\n var d = ndiffs[cursor_pointer];\n var d_next = ndiffs[cursor_pointer + 1];\n\n if (d == null) {\n // Text was deleted from end of original string,\n // cursor is now out of bounds in new string\n return diffs;\n } else if (d[0] !== DIFF_EQUAL) {\n // A modification happened at the cursor location.\n // This is the expected outcome, so we can return the original diff.\n return diffs;\n } else {\n if (d_next != null && d[1] + d_next[1] === d_next[1] + d[1]) {\n // Case 1)\n // It is possible to perform a naive shift\n ndiffs.splice(cursor_pointer, 2, d_next, d)\n return merge_tuples(ndiffs, cursor_pointer, 2)\n } else if (d_next != null && d_next[1].indexOf(d[1]) === 0) {\n // Case 2)\n // d[1] is a prefix of d_next[1]\n // We can assume that d_next[0] !== 0, since d[0] === 0\n // Shift edit locations..\n ndiffs.splice(cursor_pointer, 2, [d_next[0], d[1]], [0, d[1]]);\n var suffix = d_next[1].slice(d[1].length);\n if (suffix.length > 0) {\n ndiffs.splice(cursor_pointer + 2, 0, [d_next[0], suffix]);\n }\n return merge_tuples(ndiffs, cursor_pointer, 3)\n } else {\n // Not possible to perform any modification\n return diffs;\n }\n }\n}\n\n/*\n * Check diff did not split surrogate pairs.\n * Ex. [0, '\\uD83D'], [-1, '\\uDC36'], [1, '\\uDC2F'] -> [-1, '\\uD83D\\uDC36'], [1, '\\uD83D\\uDC2F']\n * '\\uD83D\\uDC36' === '🐶', '\\uD83D\\uDC2F' === '🐯'\n *\n * @param {Array} diffs Array of diff tuples\n * @return {Array} Array of diff tuples\n */\nfunction fix_emoji (diffs) {\n var compact = false;\n var starts_with_pair_end = function(str) {\n return str.charCodeAt(0) >= 0xDC00 && str.charCodeAt(0) <= 0xDFFF;\n }\n var ends_with_pair_start = function(str) {\n return str.charCodeAt(str.length-1) >= 0xD800 && str.charCodeAt(str.length-1) <= 0xDBFF;\n }\n for (var i = 2; i < diffs.length; i += 1) {\n if (diffs[i-2][0] === DIFF_EQUAL && ends_with_pair_start(diffs[i-2][1]) &&\n diffs[i-1][0] === DIFF_DELETE && starts_with_pair_end(diffs[i-1][1]) &&\n diffs[i][0] === DIFF_INSERT && starts_with_pair_end(diffs[i][1])) {\n compact = true;\n\n diffs[i-1][1] = diffs[i-2][1].slice(-1) + diffs[i-1][1];\n diffs[i][1] = diffs[i-2][1].slice(-1) + diffs[i][1];\n\n diffs[i-2][1] = diffs[i-2][1].slice(0, -1);\n }\n }\n if (!compact) {\n return diffs;\n }\n var fixed_diffs = [];\n for (var i = 0; i < diffs.length; i += 1) {\n if (diffs[i][1].length > 0) {\n fixed_diffs.push(diffs[i]);\n }\n }\n return fixed_diffs;\n}\n\n/*\n * Try to merge tuples with their neigbors in a given range.\n * E.g. [0, 'a'], [0, 'b'] -> [0, 'ab']\n *\n * @param {Array} diffs Array of diff tuples.\n * @param {Int} start Position of the first element to merge (diffs[start] is also merged with diffs[start - 1]).\n * @param {Int} length Number of consecutive elements to check.\n * @return {Array} Array of merged diff tuples.\n */\nfunction merge_tuples (diffs, start, length) {\n // Check from (start-1) to (start+length).\n for (var i = start + length - 1; i >= 0 && i >= start - 1; i--) {\n if (i + 1 < diffs.length) {\n var left_d = diffs[i];\n var right_d = diffs[i+1];\n if (left_d[0] === right_d[1]) {\n diffs.splice(i, 2, [left_d[0], left_d[1] + right_d[1]]);\n }\n }\n }\n return diffs;\n}\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports) {\n\nexports = module.exports = typeof Object.keys === 'function'\n ? Object.keys : shim;\n\nexports.shim = shim;\nfunction shim (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n}\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports) {\n\nvar supportsArgumentsClass = (function(){\n return Object.prototype.toString.call(arguments)\n})() == '[object Arguments]';\n\nexports = module.exports = supportsArgumentsClass ? supported : unsupported;\n\nexports.supported = supported;\nfunction supported(object) {\n return Object.prototype.toString.call(object) == '[object Arguments]';\n};\n\nexports.unsupported = unsupported;\nfunction unsupported(object){\n return object &&\n typeof object == 'object' &&\n typeof object.length == 'number' &&\n Object.prototype.hasOwnProperty.call(object, 'callee') &&\n !Object.prototype.propertyIsEnumerable.call(object, 'callee') ||\n false;\n};\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports) {\n\n'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @api private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {Mixed} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @api private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @api public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @api public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Boolean} exists Only check if there are listeners.\n * @returns {Array|Boolean}\n * @api public\n */\nEventEmitter.prototype.listeners = function listeners(event, exists) {\n var evt = prefix ? prefix + event : event\n , available = this._events[evt];\n\n if (exists) return !!available;\n if (!available) return [];\n if (available.fn) return [available.fn];\n\n for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {\n ee[i] = available[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @api public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n var listener = new EE(fn, context || this)\n , evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n else if (!this._events[evt].fn) this._events[evt].push(listener);\n else this._events[evt] = [this._events[evt], listener];\n\n return this;\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn The listener function.\n * @param {Mixed} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n var listener = new EE(fn, context || this, true)\n , evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;\n else if (!this._events[evt].fn) this._events[evt].push(listener);\n else this._events[evt] = [this._events[evt], listener];\n\n return this;\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {String|Symbol} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {Mixed} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn\n && (!once || listeners.once)\n && (!context || listeners.context === context)\n ) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn\n || (once && !listeners[i].once)\n || (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {String|Symbol} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @api public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) {\n if (--this._eventsCount === 0) this._events = new Events();\n else delete this._events[evt];\n }\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// This function doesn't apply anymore.\n//\nEventEmitter.prototype.setMaxListeners = function setMaxListeners() {\n return this;\n};\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.matchText = exports.matchSpacing = exports.matchNewline = exports.matchBlot = exports.matchAttributor = exports.default = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _extend2 = __webpack_require__(3);\n\nvar _extend3 = _interopRequireDefault(_extend2);\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nvar _align = __webpack_require__(36);\n\nvar _background = __webpack_require__(37);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _color = __webpack_require__(26);\n\nvar _direction = __webpack_require__(38);\n\nvar _font = __webpack_require__(39);\n\nvar _size = __webpack_require__(40);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:clipboard');\n\nvar DOM_KEY = '__ql-matcher';\n\nvar CLIPBOARD_CONFIG = [[Node.TEXT_NODE, matchText], [Node.TEXT_NODE, matchNewline], ['br', matchBreak], [Node.ELEMENT_NODE, matchNewline], [Node.ELEMENT_NODE, matchBlot], [Node.ELEMENT_NODE, matchSpacing], [Node.ELEMENT_NODE, matchAttributor], [Node.ELEMENT_NODE, matchStyles], ['li', matchIndent], ['b', matchAlias.bind(matchAlias, 'bold')], ['i', matchAlias.bind(matchAlias, 'italic')], ['style', matchIgnore]];\n\nvar ATTRIBUTE_ATTRIBUTORS = [_align.AlignAttribute, _direction.DirectionAttribute].reduce(function (memo, attr) {\n memo[attr.keyName] = attr;\n return memo;\n}, {});\n\nvar STYLE_ATTRIBUTORS = [_align.AlignStyle, _background.BackgroundStyle, _color.ColorStyle, _direction.DirectionStyle, _font.FontStyle, _size.SizeStyle].reduce(function (memo, attr) {\n memo[attr.keyName] = attr;\n return memo;\n}, {});\n\nvar Clipboard = function (_Module) {\n _inherits(Clipboard, _Module);\n\n function Clipboard(quill, options) {\n _classCallCheck(this, Clipboard);\n\n var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this, quill, options));\n\n _this.quill.root.addEventListener('paste', _this.onPaste.bind(_this));\n _this.container = _this.quill.addContainer('ql-clipboard');\n _this.container.setAttribute('contenteditable', true);\n _this.container.setAttribute('tabindex', -1);\n _this.matchers = [];\n CLIPBOARD_CONFIG.concat(_this.options.matchers).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n selector = _ref2[0],\n matcher = _ref2[1];\n\n if (!options.matchVisual && matcher === matchSpacing) return;\n _this.addMatcher(selector, matcher);\n });\n return _this;\n }\n\n _createClass(Clipboard, [{\n key: 'addMatcher',\n value: function addMatcher(selector, matcher) {\n this.matchers.push([selector, matcher]);\n }\n }, {\n key: 'convert',\n value: function convert(html) {\n if (typeof html === 'string') {\n this.container.innerHTML = html.replace(/\\>\\r?\\n +\\<'); // Remove spaces between tags\n return this.convert();\n }\n var formats = this.quill.getFormat(this.quill.selection.savedRange.index);\n if (formats[_code2.default.blotName]) {\n var text = this.container.innerText;\n this.container.innerHTML = '';\n return new _quillDelta2.default().insert(text, _defineProperty({}, _code2.default.blotName, formats[_code2.default.blotName]));\n }\n\n var _prepareMatching = this.prepareMatching(),\n _prepareMatching2 = _slicedToArray(_prepareMatching, 2),\n elementMatchers = _prepareMatching2[0],\n textMatchers = _prepareMatching2[1];\n\n var delta = traverse(this.container, elementMatchers, textMatchers);\n // Remove trailing newline\n if (deltaEndsWith(delta, '\\n') && delta.ops[delta.ops.length - 1].attributes == null) {\n delta = delta.compose(new _quillDelta2.default().retain(delta.length() - 1).delete(1));\n }\n debug.log('convert', this.container.innerHTML, delta);\n this.container.innerHTML = '';\n return delta;\n }\n }, {\n key: 'dangerouslyPasteHTML',\n value: function dangerouslyPasteHTML(index, html) {\n var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _quill2.default.sources.API;\n\n if (typeof index === 'string') {\n this.quill.setContents(this.convert(index), html);\n this.quill.setSelection(0, _quill2.default.sources.SILENT);\n } else {\n var paste = this.convert(html);\n this.quill.updateContents(new _quillDelta2.default().retain(index).concat(paste), source);\n this.quill.setSelection(index + paste.length(), _quill2.default.sources.SILENT);\n }\n }\n }, {\n key: 'onPaste',\n value: function onPaste(e) {\n var _this2 = this;\n\n if (e.defaultPrevented || !this.quill.isEnabled()) return;\n var range = this.quill.getSelection();\n var delta = new _quillDelta2.default().retain(range.index);\n var scrollTop = this.quill.scrollingContainer.scrollTop;\n this.container.focus();\n this.quill.selection.update(_quill2.default.sources.SILENT);\n setTimeout(function () {\n delta = delta.concat(_this2.convert()).delete(range.length);\n _this2.quill.updateContents(delta, _quill2.default.sources.USER);\n // range.length contributes to delta.length()\n _this2.quill.setSelection(delta.length() - range.length, _quill2.default.sources.SILENT);\n _this2.quill.scrollingContainer.scrollTop = scrollTop;\n _this2.quill.focus();\n }, 1);\n }\n }, {\n key: 'prepareMatching',\n value: function prepareMatching() {\n var _this3 = this;\n\n var elementMatchers = [],\n textMatchers = [];\n this.matchers.forEach(function (pair) {\n var _pair = _slicedToArray(pair, 2),\n selector = _pair[0],\n matcher = _pair[1];\n\n switch (selector) {\n case Node.TEXT_NODE:\n textMatchers.push(matcher);\n break;\n case Node.ELEMENT_NODE:\n elementMatchers.push(matcher);\n break;\n default:\n [].forEach.call(_this3.container.querySelectorAll(selector), function (node) {\n // TODO use weakmap\n node[DOM_KEY] = node[DOM_KEY] || [];\n node[DOM_KEY].push(matcher);\n });\n break;\n }\n });\n return [elementMatchers, textMatchers];\n }\n }]);\n\n return Clipboard;\n}(_module2.default);\n\nClipboard.DEFAULTS = {\n matchers: [],\n matchVisual: true\n};\n\nfunction applyFormat(delta, format, value) {\n if ((typeof format === 'undefined' ? 'undefined' : _typeof(format)) === 'object') {\n return Object.keys(format).reduce(function (delta, key) {\n return applyFormat(delta, key, format[key]);\n }, delta);\n } else {\n return delta.reduce(function (delta, op) {\n if (op.attributes && op.attributes[format]) {\n return delta.push(op);\n } else {\n return delta.insert(op.insert, (0, _extend3.default)({}, _defineProperty({}, format, value), op.attributes));\n }\n }, new _quillDelta2.default());\n }\n}\n\nfunction computeStyle(node) {\n if (node.nodeType !== Node.ELEMENT_NODE) return {};\n var DOM_KEY = '__ql-computed-style';\n return node[DOM_KEY] || (node[DOM_KEY] = window.getComputedStyle(node));\n}\n\nfunction deltaEndsWith(delta, text) {\n var endText = \"\";\n for (var i = delta.ops.length - 1; i >= 0 && endText.length < text.length; --i) {\n var op = delta.ops[i];\n if (typeof op.insert !== 'string') break;\n endText = op.insert + endText;\n }\n return endText.slice(-1 * text.length) === text;\n}\n\nfunction isLine(node) {\n if (node.childNodes.length === 0) return false; // Exclude embed blocks\n var style = computeStyle(node);\n return ['block', 'list-item'].indexOf(style.display) > -1;\n}\n\nfunction traverse(node, elementMatchers, textMatchers) {\n // Post-order\n if (node.nodeType === node.TEXT_NODE) {\n return textMatchers.reduce(function (delta, matcher) {\n return matcher(node, delta);\n }, new _quillDelta2.default());\n } else if (node.nodeType === node.ELEMENT_NODE) {\n return [].reduce.call(node.childNodes || [], function (delta, childNode) {\n var childrenDelta = traverse(childNode, elementMatchers, textMatchers);\n if (childNode.nodeType === node.ELEMENT_NODE) {\n childrenDelta = elementMatchers.reduce(function (childrenDelta, matcher) {\n return matcher(childNode, childrenDelta);\n }, childrenDelta);\n childrenDelta = (childNode[DOM_KEY] || []).reduce(function (childrenDelta, matcher) {\n return matcher(childNode, childrenDelta);\n }, childrenDelta);\n }\n return delta.concat(childrenDelta);\n }, new _quillDelta2.default());\n } else {\n return new _quillDelta2.default();\n }\n}\n\nfunction matchAlias(format, node, delta) {\n return applyFormat(delta, format, true);\n}\n\nfunction matchAttributor(node, delta) {\n var attributes = _parchment2.default.Attributor.Attribute.keys(node);\n var classes = _parchment2.default.Attributor.Class.keys(node);\n var styles = _parchment2.default.Attributor.Style.keys(node);\n var formats = {};\n attributes.concat(classes).concat(styles).forEach(function (name) {\n var attr = _parchment2.default.query(name, _parchment2.default.Scope.ATTRIBUTE);\n if (attr != null) {\n formats[attr.attrName] = attr.value(node);\n if (formats[attr.attrName]) return;\n }\n attr = ATTRIBUTE_ATTRIBUTORS[name];\n if (attr != null && (attr.attrName === name || attr.keyName === name)) {\n formats[attr.attrName] = attr.value(node) || undefined;\n }\n attr = STYLE_ATTRIBUTORS[name];\n if (attr != null && (attr.attrName === name || attr.keyName === name)) {\n attr = STYLE_ATTRIBUTORS[name];\n formats[attr.attrName] = attr.value(node) || undefined;\n }\n });\n if (Object.keys(formats).length > 0) {\n delta = applyFormat(delta, formats);\n }\n return delta;\n}\n\nfunction matchBlot(node, delta) {\n var match = _parchment2.default.query(node);\n if (match == null) return delta;\n if (match.prototype instanceof _parchment2.default.Embed) {\n var embed = {};\n var value = match.value(node);\n if (value != null) {\n embed[match.blotName] = value;\n delta = new _quillDelta2.default().insert(embed, match.formats(node));\n }\n } else if (typeof match.formats === 'function') {\n delta = applyFormat(delta, match.blotName, match.formats(node));\n }\n return delta;\n}\n\nfunction matchBreak(node, delta) {\n if (!deltaEndsWith(delta, '\\n')) {\n delta.insert('\\n');\n }\n return delta;\n}\n\nfunction matchIgnore() {\n return new _quillDelta2.default();\n}\n\nfunction matchIndent(node, delta) {\n var match = _parchment2.default.query(node);\n if (match == null || match.blotName !== 'list-item' || !deltaEndsWith(delta, '\\n')) {\n return delta;\n }\n var indent = -1,\n parent = node.parentNode;\n while (!parent.classList.contains('ql-clipboard')) {\n if ((_parchment2.default.query(parent) || {}).blotName === 'list') {\n indent += 1;\n }\n parent = parent.parentNode;\n }\n if (indent <= 0) return delta;\n return delta.compose(new _quillDelta2.default().retain(delta.length() - 1).retain(1, { indent: indent }));\n}\n\nfunction matchNewline(node, delta) {\n if (!deltaEndsWith(delta, '\\n')) {\n if (isLine(node) || delta.length() > 0 && node.nextSibling && isLine(node.nextSibling)) {\n delta.insert('\\n');\n }\n }\n return delta;\n}\n\nfunction matchSpacing(node, delta) {\n if (isLine(node) && node.nextElementSibling != null && !deltaEndsWith(delta, '\\n\\n')) {\n var nodeHeight = node.offsetHeight + parseFloat(computeStyle(node).marginTop) + parseFloat(computeStyle(node).marginBottom);\n if (node.nextElementSibling.offsetTop > node.offsetTop + nodeHeight * 1.5) {\n delta.insert('\\n');\n }\n }\n return delta;\n}\n\nfunction matchStyles(node, delta) {\n var formats = {};\n var style = node.style || {};\n if (style.fontStyle && computeStyle(node).fontStyle === 'italic') {\n formats.italic = true;\n }\n if (style.fontWeight && (computeStyle(node).fontWeight.startsWith('bold') || parseInt(computeStyle(node).fontWeight) >= 700)) {\n formats.bold = true;\n }\n if (Object.keys(formats).length > 0) {\n delta = applyFormat(delta, formats);\n }\n if (parseFloat(style.textIndent || 0) > 0) {\n // Could be 0.5in\n delta = new _quillDelta2.default().insert('\\t').concat(delta);\n }\n return delta;\n}\n\nfunction matchText(node, delta) {\n var text = node.data;\n // Word represents empty line with  \n if (node.parentNode.tagName === 'O:P') {\n return delta.insert(text.trim());\n }\n if (text.trim().length === 0 && node.parentNode.classList.contains('ql-clipboard')) {\n return delta;\n }\n if (!computeStyle(node.parentNode).whiteSpace.startsWith('pre')) {\n // eslint-disable-next-line func-style\n var replacer = function replacer(collapse, match) {\n match = match.replace(/[^\\u00a0]/g, ''); // \\u00a0 is nbsp;\n return match.length < 1 && collapse ? ' ' : match;\n };\n text = text.replace(/\\r\\n/g, ' ').replace(/\\n/g, ' ');\n text = text.replace(/\\s\\s+/g, replacer.bind(replacer, true)); // collapse whitespace\n if (node.previousSibling == null && isLine(node.parentNode) || node.previousSibling != null && isLine(node.previousSibling)) {\n text = text.replace(/^\\s+/, replacer.bind(replacer, false));\n }\n if (node.nextSibling == null && isLine(node.parentNode) || node.nextSibling != null && isLine(node.nextSibling)) {\n text = text.replace(/\\s+$/, replacer.bind(replacer, false));\n }\n }\n return delta.insert(text);\n}\n\nexports.default = Clipboard;\nexports.matchAttributor = matchAttributor;\nexports.matchBlot = matchBlot;\nexports.matchNewline = matchNewline;\nexports.matchSpacing = matchSpacing;\nexports.matchText = matchText;\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Bold = function (_Inline) {\n _inherits(Bold, _Inline);\n\n function Bold() {\n _classCallCheck(this, Bold);\n\n return _possibleConstructorReturn(this, (Bold.__proto__ || Object.getPrototypeOf(Bold)).apply(this, arguments));\n }\n\n _createClass(Bold, [{\n key: 'optimize',\n value: function optimize(context) {\n _get(Bold.prototype.__proto__ || Object.getPrototypeOf(Bold.prototype), 'optimize', this).call(this, context);\n if (this.domNode.tagName !== this.statics.tagName[0]) {\n this.replaceWith(this.statics.blotName);\n }\n }\n }], [{\n key: 'create',\n value: function create() {\n return _get(Bold.__proto__ || Object.getPrototypeOf(Bold), 'create', this).call(this);\n }\n }, {\n key: 'formats',\n value: function formats() {\n return true;\n }\n }]);\n\n return Bold;\n}(_inline2.default);\n\nBold.blotName = 'bold';\nBold.tagName = ['STRONG', 'B'];\n\nexports.default = Bold;\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.addControls = exports.default = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _quillDelta = __webpack_require__(2);\n\nvar _quillDelta2 = _interopRequireDefault(_quillDelta);\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _logger = __webpack_require__(10);\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar debug = (0, _logger2.default)('quill:toolbar');\n\nvar Toolbar = function (_Module) {\n _inherits(Toolbar, _Module);\n\n function Toolbar(quill, options) {\n _classCallCheck(this, Toolbar);\n\n var _this = _possibleConstructorReturn(this, (Toolbar.__proto__ || Object.getPrototypeOf(Toolbar)).call(this, quill, options));\n\n if (Array.isArray(_this.options.container)) {\n var container = document.createElement('div');\n addControls(container, _this.options.container);\n quill.container.parentNode.insertBefore(container, quill.container);\n _this.container = container;\n } else if (typeof _this.options.container === 'string') {\n _this.container = document.querySelector(_this.options.container);\n } else {\n _this.container = _this.options.container;\n }\n if (!(_this.container instanceof HTMLElement)) {\n var _ret;\n\n return _ret = debug.error('Container required for toolbar', _this.options), _possibleConstructorReturn(_this, _ret);\n }\n _this.container.classList.add('ql-toolbar');\n _this.controls = [];\n _this.handlers = {};\n Object.keys(_this.options.handlers).forEach(function (format) {\n _this.addHandler(format, _this.options.handlers[format]);\n });\n [].forEach.call(_this.container.querySelectorAll('button, select'), function (input) {\n _this.attach(input);\n });\n _this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (type, range) {\n if (type === _quill2.default.events.SELECTION_CHANGE) {\n _this.update(range);\n }\n });\n _this.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () {\n var _this$quill$selection = _this.quill.selection.getRange(),\n _this$quill$selection2 = _slicedToArray(_this$quill$selection, 1),\n range = _this$quill$selection2[0]; // quill.getSelection triggers update\n\n\n _this.update(range);\n });\n return _this;\n }\n\n _createClass(Toolbar, [{\n key: 'addHandler',\n value: function addHandler(format, handler) {\n this.handlers[format] = handler;\n }\n }, {\n key: 'attach',\n value: function attach(input) {\n var _this2 = this;\n\n var format = [].find.call(input.classList, function (className) {\n return className.indexOf('ql-') === 0;\n });\n if (!format) return;\n format = format.slice('ql-'.length);\n if (input.tagName === 'BUTTON') {\n input.setAttribute('type', 'button');\n }\n if (this.handlers[format] == null) {\n if (this.quill.scroll.whitelist != null && this.quill.scroll.whitelist[format] == null) {\n debug.warn('ignoring attaching to disabled format', format, input);\n return;\n }\n if (_parchment2.default.query(format) == null) {\n debug.warn('ignoring attaching to nonexistent format', format, input);\n return;\n }\n }\n var eventName = input.tagName === 'SELECT' ? 'change' : 'click';\n input.addEventListener(eventName, function (e) {\n var value = void 0;\n if (input.tagName === 'SELECT') {\n if (input.selectedIndex < 0) return;\n var selected = input.options[input.selectedIndex];\n if (selected.hasAttribute('selected')) {\n value = false;\n } else {\n value = selected.value || false;\n }\n } else {\n if (input.classList.contains('ql-active')) {\n value = false;\n } else {\n value = input.value || !input.hasAttribute('value');\n }\n e.preventDefault();\n }\n _this2.quill.focus();\n\n var _quill$selection$getR = _this2.quill.selection.getRange(),\n _quill$selection$getR2 = _slicedToArray(_quill$selection$getR, 1),\n range = _quill$selection$getR2[0];\n\n if (_this2.handlers[format] != null) {\n _this2.handlers[format].call(_this2, value);\n } else if (_parchment2.default.query(format).prototype instanceof _parchment2.default.Embed) {\n value = prompt('Enter ' + format);\n if (!value) return;\n _this2.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert(_defineProperty({}, format, value)), _quill2.default.sources.USER);\n } else {\n _this2.quill.format(format, value, _quill2.default.sources.USER);\n }\n _this2.update(range);\n });\n // TODO use weakmap\n this.controls.push([format, input]);\n }\n }, {\n key: 'update',\n value: function update(range) {\n var formats = range == null ? {} : this.quill.getFormat(range);\n this.controls.forEach(function (pair) {\n var _pair = _slicedToArray(pair, 2),\n format = _pair[0],\n input = _pair[1];\n\n if (input.tagName === 'SELECT') {\n var option = void 0;\n if (range == null) {\n option = null;\n } else if (formats[format] == null) {\n option = input.querySelector('option[selected]');\n } else if (!Array.isArray(formats[format])) {\n var value = formats[format];\n if (typeof value === 'string') {\n value = value.replace(/\\\"/g, '\\\\\"');\n }\n option = input.querySelector('option[value=\"' + value + '\"]');\n }\n if (option == null) {\n input.value = ''; // TODO make configurable?\n input.selectedIndex = -1;\n } else {\n option.selected = true;\n }\n } else {\n if (range == null) {\n input.classList.remove('ql-active');\n } else if (input.hasAttribute('value')) {\n // both being null should match (default values)\n // '1' should match with 1 (headers)\n var isActive = formats[format] === input.getAttribute('value') || formats[format] != null && formats[format].toString() === input.getAttribute('value') || formats[format] == null && !input.getAttribute('value');\n input.classList.toggle('ql-active', isActive);\n } else {\n input.classList.toggle('ql-active', formats[format] != null);\n }\n }\n });\n }\n }]);\n\n return Toolbar;\n}(_module2.default);\n\nToolbar.DEFAULTS = {};\n\nfunction addButton(container, format, value) {\n var input = document.createElement('button');\n input.setAttribute('type', 'button');\n input.classList.add('ql-' + format);\n if (value != null) {\n input.value = value;\n }\n container.appendChild(input);\n}\n\nfunction addControls(container, groups) {\n if (!Array.isArray(groups[0])) {\n groups = [groups];\n }\n groups.forEach(function (controls) {\n var group = document.createElement('span');\n group.classList.add('ql-formats');\n controls.forEach(function (control) {\n if (typeof control === 'string') {\n addButton(group, control);\n } else {\n var format = Object.keys(control)[0];\n var value = control[format];\n if (Array.isArray(value)) {\n addSelect(group, format, value);\n } else {\n addButton(group, format, value);\n }\n }\n });\n container.appendChild(group);\n });\n}\n\nfunction addSelect(container, format, values) {\n var input = document.createElement('select');\n input.classList.add('ql-' + format);\n values.forEach(function (value) {\n var option = document.createElement('option');\n if (value !== false) {\n option.setAttribute('value', value);\n } else {\n option.setAttribute('selected', 'selected');\n }\n input.appendChild(option);\n });\n container.appendChild(input);\n}\n\nToolbar.DEFAULTS = {\n container: null,\n handlers: {\n clean: function clean() {\n var _this3 = this;\n\n var range = this.quill.getSelection();\n if (range == null) return;\n if (range.length == 0) {\n var formats = this.quill.getFormat();\n Object.keys(formats).forEach(function (name) {\n // Clean functionality in existing apps only clean inline formats\n if (_parchment2.default.query(name, _parchment2.default.Scope.INLINE) != null) {\n _this3.quill.format(name, false);\n }\n });\n } else {\n this.quill.removeFormat(range, _quill2.default.sources.USER);\n }\n },\n direction: function direction(value) {\n var align = this.quill.getFormat()['align'];\n if (value === 'rtl' && align == null) {\n this.quill.format('align', 'right', _quill2.default.sources.USER);\n } else if (!value && align === 'right') {\n this.quill.format('align', false, _quill2.default.sources.USER);\n }\n this.quill.format('direction', value, _quill2.default.sources.USER);\n },\n indent: function indent(value) {\n var range = this.quill.getSelection();\n var formats = this.quill.getFormat(range);\n var indent = parseInt(formats.indent || 0);\n if (value === '+1' || value === '-1') {\n var modifier = value === '+1' ? 1 : -1;\n if (formats.direction === 'rtl') modifier *= -1;\n this.quill.format('indent', indent + modifier, _quill2.default.sources.USER);\n }\n },\n link: function link(value) {\n if (value === true) {\n value = prompt('Enter link URL:');\n }\n this.quill.format('link', value, _quill2.default.sources.USER);\n },\n list: function list(value) {\n var range = this.quill.getSelection();\n var formats = this.quill.getFormat(range);\n if (value === 'check') {\n if (formats['list'] === 'checked' || formats['list'] === 'unchecked') {\n this.quill.format('list', false, _quill2.default.sources.USER);\n } else {\n this.quill.format('list', 'unchecked', _quill2.default.sources.USER);\n }\n } else {\n this.quill.format('list', value, _quill2.default.sources.USER);\n }\n }\n }\n};\n\nexports.default = Toolbar;\nexports.addControls = addControls;\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _picker = __webpack_require__(28);\n\nvar _picker2 = _interopRequireDefault(_picker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ColorPicker = function (_Picker) {\n _inherits(ColorPicker, _Picker);\n\n function ColorPicker(select, label) {\n _classCallCheck(this, ColorPicker);\n\n var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this, select));\n\n _this.label.innerHTML = label;\n _this.container.classList.add('ql-color-picker');\n [].slice.call(_this.container.querySelectorAll('.ql-picker-item'), 0, 7).forEach(function (item) {\n item.classList.add('ql-primary');\n });\n return _this;\n }\n\n _createClass(ColorPicker, [{\n key: 'buildItem',\n value: function buildItem(option) {\n var item = _get(ColorPicker.prototype.__proto__ || Object.getPrototypeOf(ColorPicker.prototype), 'buildItem', this).call(this, option);\n item.style.backgroundColor = option.getAttribute('value') || '';\n return item;\n }\n }, {\n key: 'selectItem',\n value: function selectItem(item, trigger) {\n _get(ColorPicker.prototype.__proto__ || Object.getPrototypeOf(ColorPicker.prototype), 'selectItem', this).call(this, item, trigger);\n var colorLabel = this.label.querySelector('.ql-color-label');\n var value = item ? item.getAttribute('data-value') || '' : '';\n if (colorLabel) {\n if (colorLabel.tagName === 'line') {\n colorLabel.style.stroke = value;\n } else {\n colorLabel.style.fill = value;\n }\n }\n }\n }]);\n\n return ColorPicker;\n}(_picker2.default);\n\nexports.default = ColorPicker;\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _picker = __webpack_require__(28);\n\nvar _picker2 = _interopRequireDefault(_picker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar IconPicker = function (_Picker) {\n _inherits(IconPicker, _Picker);\n\n function IconPicker(select, icons) {\n _classCallCheck(this, IconPicker);\n\n var _this = _possibleConstructorReturn(this, (IconPicker.__proto__ || Object.getPrototypeOf(IconPicker)).call(this, select));\n\n _this.container.classList.add('ql-icon-picker');\n [].forEach.call(_this.container.querySelectorAll('.ql-picker-item'), function (item) {\n item.innerHTML = icons[item.getAttribute('data-value') || ''];\n });\n _this.defaultItem = _this.container.querySelector('.ql-selected');\n _this.selectItem(_this.defaultItem);\n return _this;\n }\n\n _createClass(IconPicker, [{\n key: 'selectItem',\n value: function selectItem(item, trigger) {\n _get(IconPicker.prototype.__proto__ || Object.getPrototypeOf(IconPicker.prototype), 'selectItem', this).call(this, item, trigger);\n item = item || this.defaultItem;\n this.label.innerHTML = item.innerHTML;\n }\n }]);\n\n return IconPicker;\n}(_picker2.default);\n\nexports.default = IconPicker;\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Tooltip = function () {\n function Tooltip(quill, boundsContainer) {\n var _this = this;\n\n _classCallCheck(this, Tooltip);\n\n this.quill = quill;\n this.boundsContainer = boundsContainer || document.body;\n this.root = quill.addContainer('ql-tooltip');\n this.root.innerHTML = this.constructor.TEMPLATE;\n if (this.quill.root === this.quill.scrollingContainer) {\n this.quill.root.addEventListener('scroll', function () {\n _this.root.style.marginTop = -1 * _this.quill.root.scrollTop + 'px';\n });\n }\n this.hide();\n }\n\n _createClass(Tooltip, [{\n key: 'hide',\n value: function hide() {\n this.root.classList.add('ql-hidden');\n }\n }, {\n key: 'position',\n value: function position(reference) {\n var left = reference.left + reference.width / 2 - this.root.offsetWidth / 2;\n // root.scrollTop should be 0 if scrollContainer !== root\n var top = reference.bottom + this.quill.root.scrollTop;\n this.root.style.left = left + 'px';\n this.root.style.top = top + 'px';\n this.root.classList.remove('ql-flip');\n var containerBounds = this.boundsContainer.getBoundingClientRect();\n var rootBounds = this.root.getBoundingClientRect();\n var shift = 0;\n if (rootBounds.right > containerBounds.right) {\n shift = containerBounds.right - rootBounds.right;\n this.root.style.left = left + shift + 'px';\n }\n if (rootBounds.left < containerBounds.left) {\n shift = containerBounds.left - rootBounds.left;\n this.root.style.left = left + shift + 'px';\n }\n if (rootBounds.bottom > containerBounds.bottom) {\n var height = rootBounds.bottom - rootBounds.top;\n var verticalShift = reference.bottom - reference.top + height;\n this.root.style.top = top - verticalShift + 'px';\n this.root.classList.add('ql-flip');\n }\n return shift;\n }\n }, {\n key: 'show',\n value: function show() {\n this.root.classList.remove('ql-editing');\n this.root.classList.remove('ql-hidden');\n }\n }]);\n\n return Tooltip;\n}();\n\nexports.default = Tooltip;\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _emitter = __webpack_require__(8);\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _base = __webpack_require__(43);\n\nvar _base2 = _interopRequireDefault(_base);\n\nvar _link = __webpack_require__(27);\n\nvar _link2 = _interopRequireDefault(_link);\n\nvar _selection = __webpack_require__(15);\n\nvar _icons = __webpack_require__(41);\n\nvar _icons2 = _interopRequireDefault(_icons);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TOOLBAR_CONFIG = [[{ header: ['1', '2', '3', false] }], ['bold', 'italic', 'underline', 'link'], [{ list: 'ordered' }, { list: 'bullet' }], ['clean']];\n\nvar SnowTheme = function (_BaseTheme) {\n _inherits(SnowTheme, _BaseTheme);\n\n function SnowTheme(quill, options) {\n _classCallCheck(this, SnowTheme);\n\n if (options.modules.toolbar != null && options.modules.toolbar.container == null) {\n options.modules.toolbar.container = TOOLBAR_CONFIG;\n }\n\n var _this = _possibleConstructorReturn(this, (SnowTheme.__proto__ || Object.getPrototypeOf(SnowTheme)).call(this, quill, options));\n\n _this.quill.container.classList.add('ql-snow');\n return _this;\n }\n\n _createClass(SnowTheme, [{\n key: 'extendToolbar',\n value: function extendToolbar(toolbar) {\n toolbar.container.classList.add('ql-snow');\n this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), _icons2.default);\n this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), _icons2.default);\n this.tooltip = new SnowTooltip(this.quill, this.options.bounds);\n if (toolbar.container.querySelector('.ql-link')) {\n this.quill.keyboard.addBinding({ key: 'K', shortKey: true }, function (range, context) {\n toolbar.handlers['link'].call(toolbar, !context.format.link);\n });\n }\n }\n }]);\n\n return SnowTheme;\n}(_base2.default);\n\nSnowTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, {\n modules: {\n toolbar: {\n handlers: {\n link: function link(value) {\n if (value) {\n var range = this.quill.getSelection();\n if (range == null || range.length == 0) return;\n var preview = this.quill.getText(range);\n if (/^\\S+@\\S+\\.\\S+$/.test(preview) && preview.indexOf('mailto:') !== 0) {\n preview = 'mailto:' + preview;\n }\n var tooltip = this.quill.theme.tooltip;\n tooltip.edit('link', preview);\n } else {\n this.quill.format('link', false);\n }\n }\n }\n }\n }\n});\n\nvar SnowTooltip = function (_BaseTooltip) {\n _inherits(SnowTooltip, _BaseTooltip);\n\n function SnowTooltip(quill, bounds) {\n _classCallCheck(this, SnowTooltip);\n\n var _this2 = _possibleConstructorReturn(this, (SnowTooltip.__proto__ || Object.getPrototypeOf(SnowTooltip)).call(this, quill, bounds));\n\n _this2.preview = _this2.root.querySelector('a.ql-preview');\n return _this2;\n }\n\n _createClass(SnowTooltip, [{\n key: 'listen',\n value: function listen() {\n var _this3 = this;\n\n _get(SnowTooltip.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip.prototype), 'listen', this).call(this);\n this.root.querySelector('a.ql-action').addEventListener('click', function (event) {\n if (_this3.root.classList.contains('ql-editing')) {\n _this3.save();\n } else {\n _this3.edit('link', _this3.preview.textContent);\n }\n event.preventDefault();\n });\n this.root.querySelector('a.ql-remove').addEventListener('click', function (event) {\n if (_this3.linkRange != null) {\n var range = _this3.linkRange;\n _this3.restoreFocus();\n _this3.quill.formatText(range, 'link', false, _emitter2.default.sources.USER);\n delete _this3.linkRange;\n }\n event.preventDefault();\n _this3.hide();\n });\n this.quill.on(_emitter2.default.events.SELECTION_CHANGE, function (range, oldRange, source) {\n if (range == null) return;\n if (range.length === 0 && source === _emitter2.default.sources.USER) {\n var _quill$scroll$descend = _this3.quill.scroll.descendant(_link2.default, range.index),\n _quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),\n link = _quill$scroll$descend2[0],\n offset = _quill$scroll$descend2[1];\n\n if (link != null) {\n _this3.linkRange = new _selection.Range(range.index - offset, link.length());\n var preview = _link2.default.formats(link.domNode);\n _this3.preview.textContent = preview;\n _this3.preview.setAttribute('href', preview);\n _this3.show();\n _this3.position(_this3.quill.getBounds(_this3.linkRange));\n return;\n }\n } else {\n delete _this3.linkRange;\n }\n _this3.hide();\n });\n }\n }, {\n key: 'show',\n value: function show() {\n _get(SnowTooltip.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip.prototype), 'show', this).call(this);\n this.root.removeAttribute('data-mode');\n }\n }]);\n\n return SnowTooltip;\n}(_base.BaseTooltip);\n\nSnowTooltip.TEMPLATE = ['', '', '', ''].join('');\n\nexports.default = SnowTheme;\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _core = __webpack_require__(29);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _align = __webpack_require__(36);\n\nvar _direction = __webpack_require__(38);\n\nvar _indent = __webpack_require__(64);\n\nvar _blockquote = __webpack_require__(65);\n\nvar _blockquote2 = _interopRequireDefault(_blockquote);\n\nvar _header = __webpack_require__(66);\n\nvar _header2 = _interopRequireDefault(_header);\n\nvar _list = __webpack_require__(67);\n\nvar _list2 = _interopRequireDefault(_list);\n\nvar _background = __webpack_require__(37);\n\nvar _color = __webpack_require__(26);\n\nvar _font = __webpack_require__(39);\n\nvar _size = __webpack_require__(40);\n\nvar _bold = __webpack_require__(56);\n\nvar _bold2 = _interopRequireDefault(_bold);\n\nvar _italic = __webpack_require__(68);\n\nvar _italic2 = _interopRequireDefault(_italic);\n\nvar _link = __webpack_require__(27);\n\nvar _link2 = _interopRequireDefault(_link);\n\nvar _script = __webpack_require__(69);\n\nvar _script2 = _interopRequireDefault(_script);\n\nvar _strike = __webpack_require__(70);\n\nvar _strike2 = _interopRequireDefault(_strike);\n\nvar _underline = __webpack_require__(71);\n\nvar _underline2 = _interopRequireDefault(_underline);\n\nvar _image = __webpack_require__(72);\n\nvar _image2 = _interopRequireDefault(_image);\n\nvar _video = __webpack_require__(73);\n\nvar _video2 = _interopRequireDefault(_video);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nvar _formula = __webpack_require__(74);\n\nvar _formula2 = _interopRequireDefault(_formula);\n\nvar _syntax = __webpack_require__(75);\n\nvar _syntax2 = _interopRequireDefault(_syntax);\n\nvar _toolbar = __webpack_require__(57);\n\nvar _toolbar2 = _interopRequireDefault(_toolbar);\n\nvar _icons = __webpack_require__(41);\n\nvar _icons2 = _interopRequireDefault(_icons);\n\nvar _picker = __webpack_require__(28);\n\nvar _picker2 = _interopRequireDefault(_picker);\n\nvar _colorPicker = __webpack_require__(59);\n\nvar _colorPicker2 = _interopRequireDefault(_colorPicker);\n\nvar _iconPicker = __webpack_require__(60);\n\nvar _iconPicker2 = _interopRequireDefault(_iconPicker);\n\nvar _tooltip = __webpack_require__(61);\n\nvar _tooltip2 = _interopRequireDefault(_tooltip);\n\nvar _bubble = __webpack_require__(108);\n\nvar _bubble2 = _interopRequireDefault(_bubble);\n\nvar _snow = __webpack_require__(62);\n\nvar _snow2 = _interopRequireDefault(_snow);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_core2.default.register({\n 'attributors/attribute/direction': _direction.DirectionAttribute,\n\n 'attributors/class/align': _align.AlignClass,\n 'attributors/class/background': _background.BackgroundClass,\n 'attributors/class/color': _color.ColorClass,\n 'attributors/class/direction': _direction.DirectionClass,\n 'attributors/class/font': _font.FontClass,\n 'attributors/class/size': _size.SizeClass,\n\n 'attributors/style/align': _align.AlignStyle,\n 'attributors/style/background': _background.BackgroundStyle,\n 'attributors/style/color': _color.ColorStyle,\n 'attributors/style/direction': _direction.DirectionStyle,\n 'attributors/style/font': _font.FontStyle,\n 'attributors/style/size': _size.SizeStyle\n}, true);\n\n_core2.default.register({\n 'formats/align': _align.AlignClass,\n 'formats/direction': _direction.DirectionClass,\n 'formats/indent': _indent.IndentClass,\n\n 'formats/background': _background.BackgroundStyle,\n 'formats/color': _color.ColorStyle,\n 'formats/font': _font.FontClass,\n 'formats/size': _size.SizeClass,\n\n 'formats/blockquote': _blockquote2.default,\n 'formats/code-block': _code2.default,\n 'formats/header': _header2.default,\n 'formats/list': _list2.default,\n\n 'formats/bold': _bold2.default,\n 'formats/code': _code.Code,\n 'formats/italic': _italic2.default,\n 'formats/link': _link2.default,\n 'formats/script': _script2.default,\n 'formats/strike': _strike2.default,\n 'formats/underline': _underline2.default,\n\n 'formats/image': _image2.default,\n 'formats/video': _video2.default,\n\n 'formats/list/item': _list.ListItem,\n\n 'modules/formula': _formula2.default,\n 'modules/syntax': _syntax2.default,\n 'modules/toolbar': _toolbar2.default,\n\n 'themes/bubble': _bubble2.default,\n 'themes/snow': _snow2.default,\n\n 'ui/icons': _icons2.default,\n 'ui/picker': _picker2.default,\n 'ui/icon-picker': _iconPicker2.default,\n 'ui/color-picker': _colorPicker2.default,\n 'ui/tooltip': _tooltip2.default\n}, true);\n\nexports.default = _core2.default;\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.IndentClass = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar IdentAttributor = function (_Parchment$Attributor) {\n _inherits(IdentAttributor, _Parchment$Attributor);\n\n function IdentAttributor() {\n _classCallCheck(this, IdentAttributor);\n\n return _possibleConstructorReturn(this, (IdentAttributor.__proto__ || Object.getPrototypeOf(IdentAttributor)).apply(this, arguments));\n }\n\n _createClass(IdentAttributor, [{\n key: 'add',\n value: function add(node, value) {\n if (value === '+1' || value === '-1') {\n var indent = this.value(node) || 0;\n value = value === '+1' ? indent + 1 : indent - 1;\n }\n if (value === 0) {\n this.remove(node);\n return true;\n } else {\n return _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'add', this).call(this, node, value);\n }\n }\n }, {\n key: 'canAdd',\n value: function canAdd(node, value) {\n return _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'canAdd', this).call(this, node, value) || _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'canAdd', this).call(this, node, parseInt(value));\n }\n }, {\n key: 'value',\n value: function value(node) {\n return parseInt(_get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'value', this).call(this, node)) || undefined; // Don't return NaN\n }\n }]);\n\n return IdentAttributor;\n}(_parchment2.default.Attributor.Class);\n\nvar IndentClass = new IdentAttributor('indent', 'ql-indent', {\n scope: _parchment2.default.Scope.BLOCK,\n whitelist: [1, 2, 3, 4, 5, 6, 7, 8]\n});\n\nexports.IndentClass = IndentClass;\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Blockquote = function (_Block) {\n _inherits(Blockquote, _Block);\n\n function Blockquote() {\n _classCallCheck(this, Blockquote);\n\n return _possibleConstructorReturn(this, (Blockquote.__proto__ || Object.getPrototypeOf(Blockquote)).apply(this, arguments));\n }\n\n return Blockquote;\n}(_block2.default);\n\nBlockquote.blotName = 'blockquote';\nBlockquote.tagName = 'blockquote';\n\nexports.default = Blockquote;\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Header = function (_Block) {\n _inherits(Header, _Block);\n\n function Header() {\n _classCallCheck(this, Header);\n\n return _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).apply(this, arguments));\n }\n\n _createClass(Header, null, [{\n key: 'formats',\n value: function formats(domNode) {\n return this.tagName.indexOf(domNode.tagName) + 1;\n }\n }]);\n\n return Header;\n}(_block2.default);\n\nHeader.blotName = 'header';\nHeader.tagName = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6'];\n\nexports.default = Header;\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.ListItem = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _block = __webpack_require__(4);\n\nvar _block2 = _interopRequireDefault(_block);\n\nvar _container = __webpack_require__(25);\n\nvar _container2 = _interopRequireDefault(_container);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ListItem = function (_Block) {\n _inherits(ListItem, _Block);\n\n function ListItem() {\n _classCallCheck(this, ListItem);\n\n return _possibleConstructorReturn(this, (ListItem.__proto__ || Object.getPrototypeOf(ListItem)).apply(this, arguments));\n }\n\n _createClass(ListItem, [{\n key: 'format',\n value: function format(name, value) {\n if (name === List.blotName && !value) {\n this.replaceWith(_parchment2.default.create(this.statics.scope));\n } else {\n _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'format', this).call(this, name, value);\n }\n }\n }, {\n key: 'remove',\n value: function remove() {\n if (this.prev == null && this.next == null) {\n this.parent.remove();\n } else {\n _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'remove', this).call(this);\n }\n }\n }, {\n key: 'replaceWith',\n value: function replaceWith(name, value) {\n this.parent.isolate(this.offset(this.parent), this.length());\n if (name === this.parent.statics.blotName) {\n this.parent.replaceWith(name, value);\n return this;\n } else {\n this.parent.unwrap();\n return _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'replaceWith', this).call(this, name, value);\n }\n }\n }], [{\n key: 'formats',\n value: function formats(domNode) {\n return domNode.tagName === this.tagName ? undefined : _get(ListItem.__proto__ || Object.getPrototypeOf(ListItem), 'formats', this).call(this, domNode);\n }\n }]);\n\n return ListItem;\n}(_block2.default);\n\nListItem.blotName = 'list-item';\nListItem.tagName = 'LI';\n\nvar List = function (_Container) {\n _inherits(List, _Container);\n\n _createClass(List, null, [{\n key: 'create',\n value: function create(value) {\n var tagName = value === 'ordered' ? 'OL' : 'UL';\n var node = _get(List.__proto__ || Object.getPrototypeOf(List), 'create', this).call(this, tagName);\n if (value === 'checked' || value === 'unchecked') {\n node.setAttribute('data-checked', value === 'checked');\n }\n return node;\n }\n }, {\n key: 'formats',\n value: function formats(domNode) {\n if (domNode.tagName === 'OL') return 'ordered';\n if (domNode.tagName === 'UL') {\n if (domNode.hasAttribute('data-checked')) {\n return domNode.getAttribute('data-checked') === 'true' ? 'checked' : 'unchecked';\n } else {\n return 'bullet';\n }\n }\n return undefined;\n }\n }]);\n\n function List(domNode) {\n _classCallCheck(this, List);\n\n var _this2 = _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).call(this, domNode));\n\n var listEventHandler = function listEventHandler(e) {\n if (e.target.parentNode !== domNode) return;\n var format = _this2.statics.formats(domNode);\n var blot = _parchment2.default.find(e.target);\n if (format === 'checked') {\n blot.format('list', 'unchecked');\n } else if (format === 'unchecked') {\n blot.format('list', 'checked');\n }\n };\n\n domNode.addEventListener('touchstart', listEventHandler);\n domNode.addEventListener('mousedown', listEventHandler);\n return _this2;\n }\n\n _createClass(List, [{\n key: 'format',\n value: function format(name, value) {\n if (this.children.length > 0) {\n this.children.tail.format(name, value);\n }\n }\n }, {\n key: 'formats',\n value: function formats() {\n // We don't inherit from FormatBlot\n return _defineProperty({}, this.statics.blotName, this.statics.formats(this.domNode));\n }\n }, {\n key: 'insertBefore',\n value: function insertBefore(blot, ref) {\n if (blot instanceof ListItem) {\n _get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'insertBefore', this).call(this, blot, ref);\n } else {\n var index = ref == null ? this.length() : ref.offset(this);\n var after = this.split(index);\n after.parent.insertBefore(blot, after);\n }\n }\n }, {\n key: 'optimize',\n value: function optimize(context) {\n _get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'optimize', this).call(this, context);\n var next = this.next;\n if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && next.domNode.tagName === this.domNode.tagName && next.domNode.getAttribute('data-checked') === this.domNode.getAttribute('data-checked')) {\n next.moveChildren(this);\n next.remove();\n }\n }\n }, {\n key: 'replace',\n value: function replace(target) {\n if (target.statics.blotName !== this.statics.blotName) {\n var item = _parchment2.default.create(this.statics.defaultChild);\n target.moveChildren(item);\n this.appendChild(item);\n }\n _get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'replace', this).call(this, target);\n }\n }]);\n\n return List;\n}(_container2.default);\n\nList.blotName = 'list';\nList.scope = _parchment2.default.Scope.BLOCK_BLOT;\nList.tagName = ['OL', 'UL'];\nList.defaultChild = 'list-item';\nList.allowedChildren = [ListItem];\n\nexports.ListItem = ListItem;\nexports.default = List;\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _bold = __webpack_require__(56);\n\nvar _bold2 = _interopRequireDefault(_bold);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Italic = function (_Bold) {\n _inherits(Italic, _Bold);\n\n function Italic() {\n _classCallCheck(this, Italic);\n\n return _possibleConstructorReturn(this, (Italic.__proto__ || Object.getPrototypeOf(Italic)).apply(this, arguments));\n }\n\n return Italic;\n}(_bold2.default);\n\nItalic.blotName = 'italic';\nItalic.tagName = ['EM', 'I'];\n\nexports.default = Italic;\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Script = function (_Inline) {\n _inherits(Script, _Inline);\n\n function Script() {\n _classCallCheck(this, Script);\n\n return _possibleConstructorReturn(this, (Script.__proto__ || Object.getPrototypeOf(Script)).apply(this, arguments));\n }\n\n _createClass(Script, null, [{\n key: 'create',\n value: function create(value) {\n if (value === 'super') {\n return document.createElement('sup');\n } else if (value === 'sub') {\n return document.createElement('sub');\n } else {\n return _get(Script.__proto__ || Object.getPrototypeOf(Script), 'create', this).call(this, value);\n }\n }\n }, {\n key: 'formats',\n value: function formats(domNode) {\n if (domNode.tagName === 'SUB') return 'sub';\n if (domNode.tagName === 'SUP') return 'super';\n return undefined;\n }\n }]);\n\n return Script;\n}(_inline2.default);\n\nScript.blotName = 'script';\nScript.tagName = ['SUB', 'SUP'];\n\nexports.default = Script;\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Strike = function (_Inline) {\n _inherits(Strike, _Inline);\n\n function Strike() {\n _classCallCheck(this, Strike);\n\n return _possibleConstructorReturn(this, (Strike.__proto__ || Object.getPrototypeOf(Strike)).apply(this, arguments));\n }\n\n return Strike;\n}(_inline2.default);\n\nStrike.blotName = 'strike';\nStrike.tagName = 'S';\n\nexports.default = Strike;\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _inline = __webpack_require__(6);\n\nvar _inline2 = _interopRequireDefault(_inline);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Underline = function (_Inline) {\n _inherits(Underline, _Inline);\n\n function Underline() {\n _classCallCheck(this, Underline);\n\n return _possibleConstructorReturn(this, (Underline.__proto__ || Object.getPrototypeOf(Underline)).apply(this, arguments));\n }\n\n return Underline;\n}(_inline2.default);\n\nUnderline.blotName = 'underline';\nUnderline.tagName = 'U';\n\nexports.default = Underline;\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _link = __webpack_require__(27);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ATTRIBUTES = ['alt', 'height', 'width'];\n\nvar Image = function (_Parchment$Embed) {\n _inherits(Image, _Parchment$Embed);\n\n function Image() {\n _classCallCheck(this, Image);\n\n return _possibleConstructorReturn(this, (Image.__proto__ || Object.getPrototypeOf(Image)).apply(this, arguments));\n }\n\n _createClass(Image, [{\n key: 'format',\n value: function format(name, value) {\n if (ATTRIBUTES.indexOf(name) > -1) {\n if (value) {\n this.domNode.setAttribute(name, value);\n } else {\n this.domNode.removeAttribute(name);\n }\n } else {\n _get(Image.prototype.__proto__ || Object.getPrototypeOf(Image.prototype), 'format', this).call(this, name, value);\n }\n }\n }], [{\n key: 'create',\n value: function create(value) {\n var node = _get(Image.__proto__ || Object.getPrototypeOf(Image), 'create', this).call(this, value);\n if (typeof value === 'string') {\n node.setAttribute('src', this.sanitize(value));\n }\n return node;\n }\n }, {\n key: 'formats',\n value: function formats(domNode) {\n return ATTRIBUTES.reduce(function (formats, attribute) {\n if (domNode.hasAttribute(attribute)) {\n formats[attribute] = domNode.getAttribute(attribute);\n }\n return formats;\n }, {});\n }\n }, {\n key: 'match',\n value: function match(url) {\n return (/\\.(jpe?g|gif|png)$/.test(url) || /^data:image\\/.+;base64/.test(url)\n );\n }\n }, {\n key: 'sanitize',\n value: function sanitize(url) {\n return (0, _link.sanitize)(url, ['http', 'https', 'data']) ? url : '//:0';\n }\n }, {\n key: 'value',\n value: function value(domNode) {\n return domNode.getAttribute('src');\n }\n }]);\n\n return Image;\n}(_parchment2.default.Embed);\n\nImage.blotName = 'image';\nImage.tagName = 'IMG';\n\nexports.default = Image;\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _block = __webpack_require__(4);\n\nvar _link = __webpack_require__(27);\n\nvar _link2 = _interopRequireDefault(_link);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ATTRIBUTES = ['height', 'width'];\n\nvar Video = function (_BlockEmbed) {\n _inherits(Video, _BlockEmbed);\n\n function Video() {\n _classCallCheck(this, Video);\n\n return _possibleConstructorReturn(this, (Video.__proto__ || Object.getPrototypeOf(Video)).apply(this, arguments));\n }\n\n _createClass(Video, [{\n key: 'format',\n value: function format(name, value) {\n if (ATTRIBUTES.indexOf(name) > -1) {\n if (value) {\n this.domNode.setAttribute(name, value);\n } else {\n this.domNode.removeAttribute(name);\n }\n } else {\n _get(Video.prototype.__proto__ || Object.getPrototypeOf(Video.prototype), 'format', this).call(this, name, value);\n }\n }\n }], [{\n key: 'create',\n value: function create(value) {\n var node = _get(Video.__proto__ || Object.getPrototypeOf(Video), 'create', this).call(this, value);\n node.setAttribute('frameborder', '0');\n node.setAttribute('allowfullscreen', true);\n node.setAttribute('src', this.sanitize(value));\n return node;\n }\n }, {\n key: 'formats',\n value: function formats(domNode) {\n return ATTRIBUTES.reduce(function (formats, attribute) {\n if (domNode.hasAttribute(attribute)) {\n formats[attribute] = domNode.getAttribute(attribute);\n }\n return formats;\n }, {});\n }\n }, {\n key: 'sanitize',\n value: function sanitize(url) {\n return _link2.default.sanitize(url);\n }\n }, {\n key: 'value',\n value: function value(domNode) {\n return domNode.getAttribute('src');\n }\n }]);\n\n return Video;\n}(_block.BlockEmbed);\n\nVideo.blotName = 'video';\nVideo.className = 'ql-video';\nVideo.tagName = 'IFRAME';\n\nexports.default = Video;\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.FormulaBlot = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _embed = __webpack_require__(35);\n\nvar _embed2 = _interopRequireDefault(_embed);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FormulaBlot = function (_Embed) {\n _inherits(FormulaBlot, _Embed);\n\n function FormulaBlot() {\n _classCallCheck(this, FormulaBlot);\n\n return _possibleConstructorReturn(this, (FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot)).apply(this, arguments));\n }\n\n _createClass(FormulaBlot, null, [{\n key: 'create',\n value: function create(value) {\n var node = _get(FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot), 'create', this).call(this, value);\n if (typeof value === 'string') {\n window.katex.render(value, node, {\n throwOnError: false,\n errorColor: '#f00'\n });\n node.setAttribute('data-value', value);\n }\n return node;\n }\n }, {\n key: 'value',\n value: function value(domNode) {\n return domNode.getAttribute('data-value');\n }\n }]);\n\n return FormulaBlot;\n}(_embed2.default);\n\nFormulaBlot.blotName = 'formula';\nFormulaBlot.className = 'ql-formula';\nFormulaBlot.tagName = 'SPAN';\n\nvar Formula = function (_Module) {\n _inherits(Formula, _Module);\n\n _createClass(Formula, null, [{\n key: 'register',\n value: function register() {\n _quill2.default.register(FormulaBlot, true);\n }\n }]);\n\n function Formula() {\n _classCallCheck(this, Formula);\n\n var _this2 = _possibleConstructorReturn(this, (Formula.__proto__ || Object.getPrototypeOf(Formula)).call(this));\n\n if (window.katex == null) {\n throw new Error('Formula module requires KaTeX.');\n }\n return _this2;\n }\n\n return Formula;\n}(_module2.default);\n\nexports.FormulaBlot = FormulaBlot;\nexports.default = Formula;\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.CodeToken = exports.CodeBlock = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _parchment = __webpack_require__(0);\n\nvar _parchment2 = _interopRequireDefault(_parchment);\n\nvar _quill = __webpack_require__(5);\n\nvar _quill2 = _interopRequireDefault(_quill);\n\nvar _module = __webpack_require__(9);\n\nvar _module2 = _interopRequireDefault(_module);\n\nvar _code = __webpack_require__(13);\n\nvar _code2 = _interopRequireDefault(_code);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SyntaxCodeBlock = function (_CodeBlock) {\n _inherits(SyntaxCodeBlock, _CodeBlock);\n\n function SyntaxCodeBlock() {\n _classCallCheck(this, SyntaxCodeBlock);\n\n return _possibleConstructorReturn(this, (SyntaxCodeBlock.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock)).apply(this, arguments));\n }\n\n _createClass(SyntaxCodeBlock, [{\n key: 'replaceWith',\n value: function replaceWith(block) {\n this.domNode.textContent = this.domNode.textContent;\n this.attach();\n _get(SyntaxCodeBlock.prototype.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock.prototype), 'replaceWith', this).call(this, block);\n }\n }, {\n key: 'highlight',\n value: function highlight(_highlight) {\n var text = this.domNode.textContent;\n if (this.cachedText !== text) {\n if (text.trim().length > 0 || this.cachedText == null) {\n this.domNode.innerHTML = _highlight(text);\n this.domNode.normalize();\n this.attach();\n }\n this.cachedText = text;\n }\n }\n }]);\n\n return SyntaxCodeBlock;\n}(_code2.default);\n\nSyntaxCodeBlock.className = 'ql-syntax';\n\nvar CodeToken = new _parchment2.default.Attributor.Class('token', 'hljs', {\n scope: _parchment2.default.Scope.INLINE\n});\n\nvar Syntax = function (_Module) {\n _inherits(Syntax, _Module);\n\n _createClass(Syntax, null, [{\n key: 'register',\n value: function register() {\n _quill2.default.register(CodeToken, true);\n _quill2.default.register(SyntaxCodeBlock, true);\n }\n }]);\n\n function Syntax(quill, options) {\n _classCallCheck(this, Syntax);\n\n var _this2 = _possibleConstructorReturn(this, (Syntax.__proto__ || Object.getPrototypeOf(Syntax)).call(this, quill, options));\n\n if (typeof _this2.options.highlight !== 'function') {\n throw new Error('Syntax module requires highlight.js. Please include the library on the page before Quill.');\n }\n var timer = null;\n _this2.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () {\n clearTimeout(timer);\n timer = setTimeout(function () {\n _this2.highlight();\n timer = null;\n }, _this2.options.interval);\n });\n _this2.highlight();\n return _this2;\n }\n\n _createClass(Syntax, [{\n key: 'highlight',\n value: function highlight() {\n var _this3 = this;\n\n if (this.quill.selection.composing) return;\n this.quill.update(_quill2.default.sources.USER);\n var range = this.quill.getSelection();\n this.quill.scroll.descendants(SyntaxCodeBlock).forEach(function (code) {\n code.highlight(_this3.options.highlight);\n });\n this.quill.update(_quill2.default.sources.SILENT);\n if (range != null) {\n this.quill.setSelection(range, _quill2.default.sources.SILENT);\n }\n }\n }]);\n\n return Syntax;\n}(_module2.default);\n\nSyntax.DEFAULTS = {\n highlight: function () {\n if (window.hljs == null) return null;\n return function (text) {\n var result = window.hljs.highlightAuto(text);\n return result.value;\n };\n }(),\n interval: 1000\n};\n\nexports.CodeBlock = SyntaxCodeBlock;\nexports.CodeToken = CodeToken;\nexports.default = Syntax;\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports) {\n\nmodule.exports = \" \";\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.BubbleTooltip = undefined;\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _extend = __webpack_require__(3);\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _emitter = __webpack_require__(8);\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _base = __webpack_require__(43);\n\nvar _base2 = _interopRequireDefault(_base);\n\nvar _selection = __webpack_require__(15);\n\nvar _icons = __webpack_require__(41);\n\nvar _icons2 = _interopRequireDefault(_icons);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TOOLBAR_CONFIG = [['bold', 'italic', 'link'], [{ header: 1 }, { header: 2 }, 'blockquote']];\n\nvar BubbleTheme = function (_BaseTheme) {\n _inherits(BubbleTheme, _BaseTheme);\n\n function BubbleTheme(quill, options) {\n _classCallCheck(this, BubbleTheme);\n\n if (options.modules.toolbar != null && options.modules.toolbar.container == null) {\n options.modules.toolbar.container = TOOLBAR_CONFIG;\n }\n\n var _this = _possibleConstructorReturn(this, (BubbleTheme.__proto__ || Object.getPrototypeOf(BubbleTheme)).call(this, quill, options));\n\n _this.quill.container.classList.add('ql-bubble');\n return _this;\n }\n\n _createClass(BubbleTheme, [{\n key: 'extendToolbar',\n value: function extendToolbar(toolbar) {\n this.tooltip = new BubbleTooltip(this.quill, this.options.bounds);\n this.tooltip.root.appendChild(toolbar.container);\n this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), _icons2.default);\n this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), _icons2.default);\n }\n }]);\n\n return BubbleTheme;\n}(_base2.default);\n\nBubbleTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, {\n modules: {\n toolbar: {\n handlers: {\n link: function link(value) {\n if (!value) {\n this.quill.format('link', false);\n } else {\n this.quill.theme.tooltip.edit();\n }\n }\n }\n }\n }\n});\n\nvar BubbleTooltip = function (_BaseTooltip) {\n _inherits(BubbleTooltip, _BaseTooltip);\n\n function BubbleTooltip(quill, bounds) {\n _classCallCheck(this, BubbleTooltip);\n\n var _this2 = _possibleConstructorReturn(this, (BubbleTooltip.__proto__ || Object.getPrototypeOf(BubbleTooltip)).call(this, quill, bounds));\n\n _this2.quill.on(_emitter2.default.events.EDITOR_CHANGE, function (type, range, oldRange, source) {\n if (type !== _emitter2.default.events.SELECTION_CHANGE) return;\n if (range != null && range.length > 0 && source === _emitter2.default.sources.USER) {\n _this2.show();\n // Lock our width so we will expand beyond our offsetParent boundaries\n _this2.root.style.left = '0px';\n _this2.root.style.width = '';\n _this2.root.style.width = _this2.root.offsetWidth + 'px';\n var lines = _this2.quill.getLines(range.index, range.length);\n if (lines.length === 1) {\n _this2.position(_this2.quill.getBounds(range));\n } else {\n var lastLine = lines[lines.length - 1];\n var index = _this2.quill.getIndex(lastLine);\n var length = Math.min(lastLine.length() - 1, range.index + range.length - index);\n var _bounds = _this2.quill.getBounds(new _selection.Range(index, length));\n _this2.position(_bounds);\n }\n } else if (document.activeElement !== _this2.textbox && _this2.quill.hasFocus()) {\n _this2.hide();\n }\n });\n return _this2;\n }\n\n _createClass(BubbleTooltip, [{\n key: 'listen',\n value: function listen() {\n var _this3 = this;\n\n _get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'listen', this).call(this);\n this.root.querySelector('.ql-close').addEventListener('click', function () {\n _this3.root.classList.remove('ql-editing');\n });\n this.quill.on(_emitter2.default.events.SCROLL_OPTIMIZE, function () {\n // Let selection be restored by toolbar handlers before repositioning\n setTimeout(function () {\n if (_this3.root.classList.contains('ql-hidden')) return;\n var range = _this3.quill.getSelection();\n if (range != null) {\n _this3.position(_this3.quill.getBounds(range));\n }\n }, 1);\n });\n }\n }, {\n key: 'cancel',\n value: function cancel() {\n this.show();\n }\n }, {\n key: 'position',\n value: function position(reference) {\n var shift = _get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'position', this).call(this, reference);\n var arrow = this.root.querySelector('.ql-tooltip-arrow');\n arrow.style.marginLeft = '';\n if (shift === 0) return shift;\n arrow.style.marginLeft = -1 * shift - arrow.offsetWidth / 2 + 'px';\n }\n }]);\n\n return BubbleTooltip;\n}(_base.BaseTooltip);\n\nBubbleTooltip.TEMPLATE = ['', '
', '', '', '
'].join('');\n\nexports.BubbleTooltip = BubbleTooltip;\nexports.default = BubbleTheme;\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(63);\n\n\n/***/ })\n/******/ ])[\"default\"];\n});","'use strict';\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar React = require('react');\nvar PropTypes = require('prop-types');\n\nvar _require = require('react-dom'),\n findDOMNode = _require.findDOMNode;\n\nvar scrollIntoView = require('dom-scroll-into-view');\n\nvar IMPERATIVE_API = ['blur', 'checkValidity', 'click', 'focus', 'select', 'setCustomValidity', 'setSelectionRange', 'setRangeText'];\n\nfunction getScrollOffset() {\n return {\n x: window.pageXOffset !== undefined ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft,\n y: window.pageYOffset !== undefined ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop\n };\n}\n\nvar Autocomplete = function (_React$Component) {\n _inherits(Autocomplete, _React$Component);\n\n function Autocomplete(props) {\n _classCallCheck(this, Autocomplete);\n\n var _this = _possibleConstructorReturn(this, (Autocomplete.__proto__ || Object.getPrototypeOf(Autocomplete)).call(this, props));\n\n _this.state = {\n isOpen: false,\n highlightedIndex: null\n };\n _this._debugStates = [];\n _this.ensureHighlightedIndex = _this.ensureHighlightedIndex.bind(_this);\n _this.exposeAPI = _this.exposeAPI.bind(_this);\n _this.handleInputFocus = _this.handleInputFocus.bind(_this);\n _this.handleInputBlur = _this.handleInputBlur.bind(_this);\n _this.handleChange = _this.handleChange.bind(_this);\n _this.handleKeyDown = _this.handleKeyDown.bind(_this);\n _this.handleInputClick = _this.handleInputClick.bind(_this);\n _this.maybeAutoCompleteText = _this.maybeAutoCompleteText.bind(_this);\n return _this;\n }\n\n _createClass(Autocomplete, [{\n key: 'componentWillMount',\n value: function componentWillMount() {\n // this.refs is frozen, so we need to assign a new object to it\n this.refs = {};\n this._ignoreBlur = false;\n this._ignoreFocus = false;\n this._scrollOffset = null;\n this._scrollTimer = null;\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n clearTimeout(this._scrollTimer);\n this._scrollTimer = null;\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if (this.state.highlightedIndex !== null) {\n this.setState(this.ensureHighlightedIndex);\n }\n if (nextProps.autoHighlight && (this.props.value !== nextProps.value || this.state.highlightedIndex === null)) {\n this.setState(this.maybeAutoCompleteText);\n }\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.isOpen()) {\n this.setMenuPositions();\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n if (this.state.isOpen && !prevState.isOpen || 'open' in this.props && this.props.open && !prevProps.open) this.setMenuPositions();\n\n this.maybeScrollItemIntoView();\n if (prevState.isOpen !== this.state.isOpen) {\n this.props.onMenuVisibilityChange(this.state.isOpen);\n }\n }\n }, {\n key: 'exposeAPI',\n value: function exposeAPI(el) {\n var _this2 = this;\n\n this.refs.input = el;\n IMPERATIVE_API.forEach(function (ev) {\n return _this2[ev] = el && el[ev] && el[ev].bind(el);\n });\n }\n }, {\n key: 'maybeScrollItemIntoView',\n value: function maybeScrollItemIntoView() {\n if (this.isOpen() && this.state.highlightedIndex !== null) {\n var itemNode = this.refs['item-' + this.state.highlightedIndex];\n var menuNode = this.refs.menu;\n scrollIntoView(findDOMNode(itemNode), findDOMNode(menuNode), { onlyScrollIfNeeded: true });\n }\n }\n }, {\n key: 'handleKeyDown',\n value: function handleKeyDown(event) {\n if (Autocomplete.keyDownHandlers[event.key]) Autocomplete.keyDownHandlers[event.key].call(this, event);else if (!this.isOpen()) {\n this.setState({\n isOpen: true\n });\n }\n }\n }, {\n key: 'handleChange',\n value: function handleChange(event) {\n this.props.onChange(event, event.target.value);\n }\n }, {\n key: 'getFilteredItems',\n value: function getFilteredItems(props) {\n var items = props.items;\n\n if (props.shouldItemRender) {\n items = items.filter(function (item) {\n return props.shouldItemRender(item, props.value);\n });\n }\n\n if (props.sortItems) {\n items.sort(function (a, b) {\n return props.sortItems(a, b, props.value);\n });\n }\n\n return items;\n }\n }, {\n key: 'maybeAutoCompleteText',\n value: function maybeAutoCompleteText(state, props) {\n var highlightedIndex = state.highlightedIndex;\n var value = props.value,\n getItemValue = props.getItemValue;\n\n var index = highlightedIndex === null ? 0 : highlightedIndex;\n var items = this.getFilteredItems(props);\n for (var i = 0; i < items.length; i++) {\n if (props.isItemSelectable(items[index])) break;\n index = (index + 1) % items.length;\n }\n var matchedItem = items[index] && props.isItemSelectable(items[index]) ? items[index] : null;\n if (value !== '' && matchedItem) {\n var itemValue = getItemValue(matchedItem);\n var itemValueDoesMatch = itemValue.toLowerCase().indexOf(value.toLowerCase()) === 0;\n if (itemValueDoesMatch) {\n return { highlightedIndex: index };\n }\n }\n return { highlightedIndex: null };\n }\n }, {\n key: 'ensureHighlightedIndex',\n value: function ensureHighlightedIndex(state, props) {\n if (state.highlightedIndex >= this.getFilteredItems(props).length) {\n return { highlightedIndex: null };\n }\n }\n }, {\n key: 'setMenuPositions',\n value: function setMenuPositions() {\n var node = this.refs.input;\n var rect = node.getBoundingClientRect();\n var computedStyle = global.window.getComputedStyle(node);\n var marginBottom = parseInt(computedStyle.marginBottom, 10) || 0;\n var marginLeft = parseInt(computedStyle.marginLeft, 10) || 0;\n var marginRight = parseInt(computedStyle.marginRight, 10) || 0;\n this.setState({\n menuTop: rect.bottom + marginBottom,\n menuLeft: rect.left + marginLeft,\n menuWidth: rect.width + marginLeft + marginRight\n });\n }\n }, {\n key: 'highlightItemFromMouse',\n value: function highlightItemFromMouse(index) {\n this.setState({ highlightedIndex: index });\n }\n }, {\n key: 'selectItemFromMouse',\n value: function selectItemFromMouse(item) {\n var _this3 = this;\n\n var value = this.props.getItemValue(item);\n // The menu will de-render before a mouseLeave event\n // happens. Clear the flag to release control over focus\n this.setIgnoreBlur(false);\n this.setState({\n isOpen: false,\n highlightedIndex: null\n }, function () {\n _this3.props.onSelect(value, item);\n });\n }\n }, {\n key: 'setIgnoreBlur',\n value: function setIgnoreBlur(ignore) {\n this._ignoreBlur = ignore;\n }\n }, {\n key: 'renderMenu',\n value: function renderMenu() {\n var _this4 = this;\n\n var items = this.getFilteredItems(this.props).map(function (item, index) {\n var element = _this4.props.renderItem(item, _this4.state.highlightedIndex === index, { cursor: 'default' });\n return React.cloneElement(element, {\n onMouseEnter: _this4.props.isItemSelectable(item) ? function () {\n return _this4.highlightItemFromMouse(index);\n } : null,\n onClick: _this4.props.isItemSelectable(item) ? function () {\n return _this4.selectItemFromMouse(item);\n } : null,\n ref: function ref(e) {\n return _this4.refs['item-' + index] = e;\n }\n });\n });\n var style = {\n left: this.state.menuLeft,\n top: this.state.menuTop,\n minWidth: this.state.menuWidth\n };\n var menu = this.props.renderMenu(items, this.props.value, style);\n return React.cloneElement(menu, {\n ref: function ref(e) {\n return _this4.refs.menu = e;\n },\n // Ignore blur to prevent menu from de-rendering before we can process click\n onTouchStart: function onTouchStart() {\n return _this4.setIgnoreBlur(true);\n },\n onMouseEnter: function onMouseEnter() {\n return _this4.setIgnoreBlur(true);\n },\n onMouseLeave: function onMouseLeave() {\n return _this4.setIgnoreBlur(false);\n }\n });\n }\n }, {\n key: 'handleInputBlur',\n value: function handleInputBlur(event) {\n var _this5 = this;\n\n if (this._ignoreBlur) {\n this._ignoreFocus = true;\n this._scrollOffset = getScrollOffset();\n this.refs.input.focus();\n return;\n }\n var setStateCallback = void 0;\n var highlightedIndex = this.state.highlightedIndex;\n\n if (this.props.selectOnBlur && highlightedIndex !== null) {\n var items = this.getFilteredItems(this.props);\n var item = items[highlightedIndex];\n var value = this.props.getItemValue(item);\n setStateCallback = function setStateCallback() {\n return _this5.props.onSelect(value, item);\n };\n }\n this.setState({\n isOpen: false,\n highlightedIndex: null\n }, setStateCallback);\n var onBlur = this.props.inputProps.onBlur;\n\n if (onBlur) {\n onBlur(event);\n }\n }\n }, {\n key: 'handleInputFocus',\n value: function handleInputFocus(event) {\n var _this6 = this;\n\n if (this._ignoreFocus) {\n this._ignoreFocus = false;\n var _scrollOffset = this._scrollOffset,\n x = _scrollOffset.x,\n y = _scrollOffset.y;\n\n this._scrollOffset = null;\n // Focus will cause the browser to scroll the into view.\n // This can cause the mouse coords to change, which in turn\n // could cause a new highlight to happen, cancelling the click\n // event (when selecting with the mouse)\n window.scrollTo(x, y);\n // Some browsers wait until all focus event handlers have been\n // processed before scrolling the into view, so let's\n // scroll again on the next tick to ensure we're back to where\n // the user was before focus was lost. We could do the deferred\n // scroll only, but that causes a jarring split second jump in\n // some browsers that scroll before the focus event handlers\n // are triggered.\n clearTimeout(this._scrollTimer);\n this._scrollTimer = setTimeout(function () {\n _this6._scrollTimer = null;\n window.scrollTo(x, y);\n }, 0);\n return;\n }\n this.setState({ isOpen: true });\n var onFocus = this.props.inputProps.onFocus;\n\n if (onFocus) {\n onFocus(event);\n }\n }\n }, {\n key: 'isInputFocused',\n value: function isInputFocused() {\n var el = this.refs.input;\n return el.ownerDocument && el === el.ownerDocument.activeElement;\n }\n }, {\n key: 'handleInputClick',\n value: function handleInputClick() {\n // Input will not be focused if it's disabled\n if (this.isInputFocused() && !this.isOpen()) this.setState({ isOpen: true });\n }\n }, {\n key: 'composeEventHandlers',\n value: function composeEventHandlers(internal, external) {\n return external ? function (e) {\n internal(e);external(e);\n } : internal;\n }\n }, {\n key: 'isOpen',\n value: function isOpen() {\n return 'open' in this.props ? this.props.open : this.state.isOpen;\n }\n }, {\n key: 'render',\n value: function render() {\n if (this.props.debug) {\n // you don't like it, you love it\n this._debugStates.push({\n id: this._debugStates.length,\n state: this.state\n });\n }\n\n var inputProps = this.props.inputProps;\n\n var open = this.isOpen();\n return React.createElement(\n 'div',\n _extends({ style: _extends({}, this.props.wrapperStyle) }, this.props.wrapperProps),\n this.props.renderInput(_extends({}, inputProps, {\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': open,\n autoComplete: 'off',\n ref: this.exposeAPI,\n onFocus: this.handleInputFocus,\n onBlur: this.handleInputBlur,\n onChange: this.handleChange,\n onKeyDown: this.composeEventHandlers(this.handleKeyDown, inputProps.onKeyDown),\n onClick: this.composeEventHandlers(this.handleInputClick, inputProps.onClick),\n value: this.props.value\n })),\n open && this.renderMenu(),\n this.props.debug && React.createElement(\n 'pre',\n { style: { marginLeft: 300 } },\n JSON.stringify(this._debugStates.slice(Math.max(0, this._debugStates.length - 5), this._debugStates.length), null, 2)\n )\n );\n }\n }]);\n\n return Autocomplete;\n}(React.Component);\n\nAutocomplete.propTypes = {\n /**\n * The items to display in the dropdown menu\n */\n items: PropTypes.array.isRequired,\n /**\n * The value to display in the input field\n */\n value: PropTypes.any,\n /**\n * Arguments: `event: Event, value: String`\n *\n * Invoked every time the user changes the input's value.\n */\n onChange: PropTypes.func,\n /**\n * Arguments: `value: String, item: Any`\n *\n * Invoked when the user selects an item from the dropdown menu.\n */\n onSelect: PropTypes.func,\n /**\n * Arguments: `item: Any, value: String`\n *\n * Invoked for each entry in `items` and its return value is used to\n * determine whether or not it should be displayed in the dropdown menu.\n * By default all items are always rendered.\n */\n shouldItemRender: PropTypes.func,\n /**\n * Arguments: `item: Any`\n *\n * Invoked when attempting to select an item. The return value is used to\n * determine whether the item should be selectable or not.\n * By default all items are selectable.\n */\n isItemSelectable: PropTypes.func,\n /**\n * Arguments: `itemA: Any, itemB: Any, value: String`\n *\n * The function which is used to sort `items` before display.\n */\n sortItems: PropTypes.func,\n /**\n * Arguments: `item: Any`\n *\n * Used to read the display value from each entry in `items`.\n */\n getItemValue: PropTypes.func.isRequired,\n /**\n * Arguments: `item: Any, isHighlighted: Boolean, styles: Object`\n *\n * Invoked for each entry in `items` that also passes `shouldItemRender` to\n * generate the render tree for each item in the dropdown menu. `styles` is\n * an optional set of styles that can be applied to improve the look/feel\n * of the items in the dropdown menu.\n */\n renderItem: PropTypes.func.isRequired,\n /**\n * Arguments: `items: Array, value: String, styles: Object`\n *\n * Invoked to generate the render tree for the dropdown menu. Ensure the\n * returned tree includes every entry in `items` or else the highlight order\n * and keyboard navigation logic will break. `styles` will contain\n * { top, left, minWidth } which are the coordinates of the top-left corner\n * and the width of the dropdown menu.\n */\n renderMenu: PropTypes.func,\n /**\n * Styles that are applied to the dropdown menu in the default `renderMenu`\n * implementation. If you override `renderMenu` and you want to use\n * `menuStyle` you must manually apply them (`this.props.menuStyle`).\n */\n menuStyle: PropTypes.object,\n /**\n * Arguments: `props: Object`\n *\n * Invoked to generate the input element. The `props` argument is the result\n * of merging `props.inputProps` with a selection of props that are required\n * both for functionality and accessibility. At the very least you need to\n * apply `props.ref` and all `props.on` event handlers. Failing to do\n * this will cause `Autocomplete` to behave unexpectedly.\n */\n renderInput: PropTypes.func,\n /**\n * Props passed to `props.renderInput`. By default these props will be\n * applied to the `` element rendered by `Autocomplete`, unless you\n * have specified a custom value for `props.renderInput`. Any properties\n * supported by `HTMLInputElement` can be specified, apart from the\n * following which are set by `Autocomplete`: value, autoComplete, role,\n * aria-autocomplete. `inputProps` is commonly used for (but not limited to)\n * placeholder, event handlers (onFocus, onBlur, etc.), autoFocus, etc..\n */\n inputProps: PropTypes.object,\n /**\n * Props that are applied to the element which wraps the `` and\n * dropdown menu elements rendered by `Autocomplete`.\n */\n wrapperProps: PropTypes.object,\n /**\n * This is a shorthand for `wrapperProps={{ style: }}`.\n * Note that `wrapperStyle` is applied before `wrapperProps`, so the latter\n * will win if it contains a `style` entry.\n */\n wrapperStyle: PropTypes.object,\n /**\n * Whether or not to automatically highlight the top match in the dropdown\n * menu.\n */\n autoHighlight: PropTypes.bool,\n /**\n * Whether or not to automatically select the highlighted item when the\n * `` loses focus.\n */\n selectOnBlur: PropTypes.bool,\n /**\n * Arguments: `isOpen: Boolean`\n *\n * Invoked every time the dropdown menu's visibility changes (i.e. every\n * time it is displayed/hidden).\n */\n onMenuVisibilityChange: PropTypes.func,\n /**\n * Used to override the internal logic which displays/hides the dropdown\n * menu. This is useful if you want to force a certain state based on your\n * UX/business logic. Use it together with `onMenuVisibilityChange` for\n * fine-grained control over the dropdown menu dynamics.\n */\n open: PropTypes.bool,\n debug: PropTypes.bool\n};\nAutocomplete.defaultProps = {\n value: '',\n wrapperProps: {},\n wrapperStyle: {\n display: 'inline-block'\n },\n inputProps: {},\n renderInput: function renderInput(props) {\n return React.createElement('input', props);\n },\n onChange: function onChange() {},\n onSelect: function onSelect() {},\n isItemSelectable: function isItemSelectable() {\n return true;\n },\n renderMenu: function renderMenu(items, value, style) {\n return React.createElement('div', { style: _extends({}, style, this.menuStyle), children: items });\n },\n\n menuStyle: {\n borderRadius: '3px',\n boxShadow: '0 2px 12px rgba(0, 0, 0, 0.1)',\n background: 'rgba(255, 255, 255, 0.9)',\n padding: '2px 0',\n fontSize: '90%',\n position: 'fixed',\n overflow: 'auto',\n maxHeight: '50%' },\n autoHighlight: true,\n selectOnBlur: false,\n onMenuVisibilityChange: function onMenuVisibilityChange() {}\n};\nAutocomplete.keyDownHandlers = {\n ArrowDown: function ArrowDown(event) {\n event.preventDefault();\n var items = this.getFilteredItems(this.props);\n if (!items.length) return;\n var highlightedIndex = this.state.highlightedIndex;\n\n var index = highlightedIndex === null ? -1 : highlightedIndex;\n for (var i = 0; i < items.length; i++) {\n var p = (index + i + 1) % items.length;\n if (this.props.isItemSelectable(items[p])) {\n index = p;\n break;\n }\n }\n if (index > -1 && index !== highlightedIndex) {\n this.setState({\n highlightedIndex: index,\n isOpen: true\n });\n }\n },\n ArrowUp: function ArrowUp(event) {\n event.preventDefault();\n var items = this.getFilteredItems(this.props);\n if (!items.length) return;\n var highlightedIndex = this.state.highlightedIndex;\n\n var index = highlightedIndex === null ? items.length : highlightedIndex;\n for (var i = 0; i < items.length; i++) {\n var p = (index - (1 + i) + items.length) % items.length;\n if (this.props.isItemSelectable(items[p])) {\n index = p;\n break;\n }\n }\n if (index !== items.length) {\n this.setState({\n highlightedIndex: index,\n isOpen: true\n });\n }\n },\n Enter: function Enter(event) {\n var _this7 = this;\n\n // Key code 229 is used for selecting items from character selectors (Pinyin, Kana, etc)\n if (event.keyCode !== 13) return;\n // In case the user is currently hovering over the menu\n this.setIgnoreBlur(false);\n if (!this.isOpen()) {\n // menu is closed so there is no selection to accept -> do nothing\n return;\n } else if (this.state.highlightedIndex == null) {\n // input has focus but no menu item is selected + enter is hit -> close the menu, highlight whatever's in input\n this.setState({\n isOpen: false\n }, function () {\n _this7.refs.input.select();\n });\n } else {\n // text entered + menu item has been highlighted + enter is hit -> update value to that of selected menu item, close the menu\n event.preventDefault();\n var item = this.getFilteredItems(this.props)[this.state.highlightedIndex];\n var value = this.props.getItemValue(item);\n this.setState({\n isOpen: false,\n highlightedIndex: null\n }, function () {\n //this.refs.input.focus() // TODO: file issue\n _this7.refs.input.setSelectionRange(value.length, value.length);\n _this7.props.onSelect(value, item);\n });\n }\n },\n Escape: function Escape() {\n // In case the user is currently hovering over the menu\n this.setIgnoreBlur(false);\n this.setState({\n highlightedIndex: null,\n isOpen: false\n });\n },\n Tab: function Tab() {\n // In case the user is currently hovering over the menu\n this.setIgnoreBlur(false);\n }\n};\n\n\nmodule.exports = Autocomplete;","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports,require(\"react\"),require(\"prop-types\"),require(\"classnames\"),require(\"date-fns/isDate\"),require(\"date-fns/isValid\"),require(\"date-fns/format\"),require(\"date-fns/addMinutes\"),require(\"date-fns/addHours\"),require(\"date-fns/addDays\"),require(\"date-fns/addWeeks\"),require(\"date-fns/addMonths\"),require(\"date-fns/addYears\"),require(\"date-fns/subMinutes\"),require(\"date-fns/subHours\"),require(\"date-fns/subDays\"),require(\"date-fns/subWeeks\"),require(\"date-fns/subMonths\"),require(\"date-fns/subYears\"),require(\"date-fns/getSeconds\"),require(\"date-fns/getMinutes\"),require(\"date-fns/getHours\"),require(\"date-fns/getDay\"),require(\"date-fns/getDate\"),require(\"date-fns/getWeek\"),require(\"date-fns/getMonth\"),require(\"date-fns/getQuarter\"),require(\"date-fns/getYear\"),require(\"date-fns/getTime\"),require(\"date-fns/setSeconds\"),require(\"date-fns/setMinutes\"),require(\"date-fns/setHours\"),require(\"date-fns/setMonth\"),require(\"date-fns/setQuarter\"),require(\"date-fns/setYear\"),require(\"date-fns/min\"),require(\"date-fns/max\"),require(\"date-fns/differenceInCalendarDays\"),require(\"date-fns/differenceInCalendarMonths\"),require(\"date-fns/differenceInCalendarWeeks\"),require(\"date-fns/differenceInCalendarYears\"),require(\"date-fns/startOfDay\"),require(\"date-fns/startOfWeek\"),require(\"date-fns/startOfMonth\"),require(\"date-fns/startOfQuarter\"),require(\"date-fns/startOfYear\"),require(\"date-fns/endOfDay\"),require(\"date-fns/endOfWeek\"),require(\"date-fns/endOfMonth\"),require(\"date-fns/isEqual\"),require(\"date-fns/isSameDay\"),require(\"date-fns/isSameMonth\"),require(\"date-fns/isSameYear\"),require(\"date-fns/isSameQuarter\"),require(\"date-fns/isAfter\"),require(\"date-fns/isBefore\"),require(\"date-fns/isWithinInterval\"),require(\"date-fns/toDate\"),require(\"date-fns/parse\"),require(\"date-fns/parseISO\"),require(\"react-onclickoutside\"),require(\"react-popper\"),require(\"react-dom\")):\"function\"==typeof define&&define.amd?define([\"exports\",\"react\",\"prop-types\",\"classnames\",\"date-fns/isDate\",\"date-fns/isValid\",\"date-fns/format\",\"date-fns/addMinutes\",\"date-fns/addHours\",\"date-fns/addDays\",\"date-fns/addWeeks\",\"date-fns/addMonths\",\"date-fns/addYears\",\"date-fns/subMinutes\",\"date-fns/subHours\",\"date-fns/subDays\",\"date-fns/subWeeks\",\"date-fns/subMonths\",\"date-fns/subYears\",\"date-fns/getSeconds\",\"date-fns/getMinutes\",\"date-fns/getHours\",\"date-fns/getDay\",\"date-fns/getDate\",\"date-fns/getWeek\",\"date-fns/getMonth\",\"date-fns/getQuarter\",\"date-fns/getYear\",\"date-fns/getTime\",\"date-fns/setSeconds\",\"date-fns/setMinutes\",\"date-fns/setHours\",\"date-fns/setMonth\",\"date-fns/setQuarter\",\"date-fns/setYear\",\"date-fns/min\",\"date-fns/max\",\"date-fns/differenceInCalendarDays\",\"date-fns/differenceInCalendarMonths\",\"date-fns/differenceInCalendarWeeks\",\"date-fns/differenceInCalendarYears\",\"date-fns/startOfDay\",\"date-fns/startOfWeek\",\"date-fns/startOfMonth\",\"date-fns/startOfQuarter\",\"date-fns/startOfYear\",\"date-fns/endOfDay\",\"date-fns/endOfWeek\",\"date-fns/endOfMonth\",\"date-fns/isEqual\",\"date-fns/isSameDay\",\"date-fns/isSameMonth\",\"date-fns/isSameYear\",\"date-fns/isSameQuarter\",\"date-fns/isAfter\",\"date-fns/isBefore\",\"date-fns/isWithinInterval\",\"date-fns/toDate\",\"date-fns/parse\",\"date-fns/parseISO\",\"react-onclickoutside\",\"react-popper\",\"react-dom\"],t):t((e=\"undefined\"!=typeof globalThis?globalThis:e||self).DatePicker={},e.React,e.PropTypes,e.classNames,e.isDate,e.isValidDate,e.format,e.addMinutes,e.addHours,e.utils$2,e.utils$3,e.addMonths,e.addYears,null,null,e.subDays,e.subWeeks,e.subMonths,e.subYears,e.getSeconds,e.getMinutes,e.getHours,e.getDay,e.getDate,e.dfgetWeek,e.getMonth,e.getQuarter,e.getYear,e.getTime,e.setSeconds,e.setMinutes,e.setHours,e.utils,e.utils$1,e.utils$4,e.min,e.max,e.differenceInCalendarDays,e.differenceInCalendarMonths,null,e.differenceInCalendarYears,e.startOfDay,e.startOfWeek,e.startOfMonth,e.startOfQuarter,e.startOfYear,e.endOfDay,null,null,e.dfIsEqual,e.dfIsSameDay,e.dfIsSameMonth,e.dfIsSameYear,e.dfIsSameQuarter,e.isAfter,e.isBefore,e.isWithinInterval,e.toDate,e.parse,e.parseISO,e.onClickOutside,e.ReactPopper,e.ReactDOM)}(this,(function(e,t,r,a,n,o,s,i,p,l,d,c,u,f,h,m,y,v,D,w,g,k,b,C,S,_,M,P,E,N,O,x,Y,T,I,L,F,R,q,A,W,B,j,H,K,Q,V,U,$,z,G,J,X,Z,ee,te,re,ae,ne,oe,se,ie,pe){\"use strict\";function le(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var de=le(t),ce=le(a),ue=le(n),fe=le(o),he=le(s),me=le(i),ye=le(p),ve=le(l),De=le(d),we=le(c),ge=le(u),ke=le(m),be=le(y),Ce=le(v),Se=le(D),_e=le(w),Me=le(g),Pe=le(k),Ee=le(b),Ne=le(C),Oe=le(S),xe=le(_),Ye=le(M),Te=le(P),Ie=le(E),Le=le(N),Fe=le(O),Re=le(x),qe=le(Y),Ae=le(T),We=le(I),Be=le(L),je=le(F),He=le(R),Ke=le(q),Qe=le(W),Ve=le(B),Ue=le(j),$e=le(H),ze=le(K),Ge=le(Q),Je=le(V),Xe=le(z),Ze=le(G),et=le(J),tt=le(X),rt=le(Z),at=le(ee),nt=le(te),ot=le(re),st=le(ae),it=le(ne),pt=le(oe),lt=le(se),dt=le(pe);function ct(e){return(ct=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function ut(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function ft(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,a=new Array(t);r0&&(n=it.default(e,t.slice(0,e.length),new Date)),It(n)||(n=new Date(e))),It(n)&&s?n:null)}function It(e){return fe.default(e)&&at.default(e,new Date(\"1/1/1000\"))}function Lt(e,t,r){if(\"en\"===r)return he.default(e,t,{awareOfUnicodeTokens:!0});var a=Jt(r);return r&&!a&&console.warn('A locale object was not found for the provided string [\"'.concat(r,'\"].')),!a&&Gt()&&Jt(Gt())&&(a=Jt(Gt())),he.default(e,t,{locale:a||null,awareOfUnicodeTokens:!0})}function Ft(e,t){var r=t.hour,a=void 0===r?0:r,n=t.minute,o=void 0===n?0:n,s=t.second,i=void 0===s?0:s;return Re.default(Fe.default(Le.default(e,i),o),a)}function Rt(e,t){var r=t&&Jt(t)||Gt()&&Jt(Gt());return Oe.default(e,r?{locale:r}:null)}function qt(e,t){return Lt(e,\"ddd\",t)}function At(e){return Ve.default(e)}function Wt(e,t){var r=Jt(t||Gt());return Ue.default(e,{locale:r})}function Bt(e){return $e.default(e)}function jt(e){return Ge.default(e)}function Ht(e){return ze.default(e)}function Kt(e,t){return e&&t?tt.default(e,t):!e&&!t}function Qt(e,t){return e&&t?et.default(e,t):!e&&!t}function Vt(e,t){return e&&t?rt.default(e,t):!e&&!t}function Ut(e,t){return e&&t?Ze.default(e,t):!e&&!t}function $t(e,t){return e&&t?Xe.default(e,t):!e&&!t}function zt(e,t,r){var a,n=Ve.default(t),o=Je.default(r);try{a=ot.default(e,{start:n,end:o})}catch(e){a=!1}return a}function Gt(){return(\"undefined\"!=typeof window?window:global).__localeId__}function Jt(e){if(\"string\"==typeof e){var t=\"undefined\"!=typeof window?window:global;return t.__localeData__?t.__localeData__[e]:null}return e}function Xt(e,t){return Lt(qe.default(Yt(),e),\"LLLL\",t)}function Zt(e,t){return Lt(qe.default(Yt(),e),\"LLL\",t)}function er(e,t){return Lt(Ae.default(Yt(),e),\"QQQ\",t)}function tr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.maxDate,n=t.excludeDates,o=t.includeDates,s=t.filterDate;return pr(e,{minDate:r,maxDate:a})||n&&n.some((function(t){return Ut(e,t)}))||o&&!o.some((function(t){return Ut(e,t)}))||s&&!s(Yt(e))||!1}function rr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.excludeDates;return r&&r.some((function(t){return Ut(e,t)}))||!1}function ar(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.maxDate,n=t.excludeDates,o=t.includeDates,s=t.filterDate;return pr(e,{minDate:r,maxDate:a})||n&&n.some((function(t){return Qt(e,t)}))||o&&!o.some((function(t){return Qt(e,t)}))||s&&!s(Yt(e))||!1}function nr(e,t,r,a){var n=Te.default(e),o=xe.default(e),s=Te.default(t),i=xe.default(t),p=Te.default(a);return n===s&&n===p?o<=r&&r<=i:n=r||pn:void 0}function or(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.maxDate,n=t.excludeDates,o=t.includeDates,s=t.filterDate;return pr(e,{minDate:r,maxDate:a})||n&&n.some((function(t){return Vt(e,t)}))||o&&!o.some((function(t){return Vt(e,t)}))||s&&!s(Yt(e))||!1}function sr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.maxDate,n=new Date(e,0,1);return pr(n,{minDate:r,maxDate:a})||!1}function ir(e,t,r,a){var n=Te.default(e),o=Ye.default(e),s=Te.default(t),i=Ye.default(t),p=Te.default(a);return n===s&&n===p?o<=r&&r<=i:n=r||pn:void 0}function pr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.maxDate;return r&&He.default(e,r)<0||a&&He.default(e,a)>0}function lr(e,t){return t.some((function(t){return Pe.default(t)===Pe.default(e)&&Me.default(t)===Me.default(e)}))}function dr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.excludeTimes,a=t.includeTimes,n=t.filterTime;return r&&lr(e,r)||a&&!lr(e,a)||n&&!n(e)||!1}function cr(e,t){var r=t.minTime,a=t.maxTime;if(!r||!a)throw new Error(\"Both minTime and maxTime props required\");var n,o=Yt(),s=Re.default(Fe.default(o,Me.default(e)),Pe.default(e)),i=Re.default(Fe.default(o,Me.default(r)),Pe.default(r)),p=Re.default(Fe.default(o,Me.default(a)),Pe.default(a));try{n=!ot.default(s,{start:i,end:p})}catch(e){n=!1}return n}function ur(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.includeDates,n=Ce.default(e,1);return r&&Ke.default(r,n)>0||a&&a.every((function(e){return Ke.default(e,n)>0}))||!1}function fr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.maxDate,a=t.includeDates,n=we.default(e,1);return r&&Ke.default(n,r)>0||a&&a.every((function(e){return Ke.default(n,e)>0}))||!1}function hr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.includeDates,n=Se.default(e,1);return r&&Qe.default(r,n)>0||a&&a.every((function(e){return Qe.default(e,n)>0}))||!1}function mr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.maxDate,a=t.includeDates,n=ge.default(e,1);return r&&Qe.default(n,r)>0||a&&a.every((function(e){return Qe.default(n,e)>0}))||!1}function yr(e){var t=e.minDate,r=e.includeDates;if(r&&t){var a=r.filter((function(e){return He.default(e,t)>=0}));return Be.default(a)}return r?Be.default(r):t}function vr(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var a=r.filter((function(e){return He.default(e,t)<=0}));return je.default(a)}return r?je.default(r):t}function Dr(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"react-datepicker__day--highlighted\",r=new Map,a=0,n=e.length;a1&&void 0!==arguments[1]?arguments[1]:Ot,r=Math.ceil(Te.default(e)/t)*t,a=r-(t-1);return{startPeriod:a,endPeriod:r}}function br(e,t,r,a){for(var n=[],o=0;o<2*t+1;o++){var s=e+t-o,i=!0;r&&(i=Te.default(r)<=s),a&&i&&(i=Te.default(a)>=s),i&&n.push(s)}return n}var Cr=function(e){wt(r,e);var t=St(r);function r(e){var a;ut(this,r),mt(bt(a=t.call(this,e)),\"renderOptions\",(function(){var e=a.props.year,t=a.state.yearsList.map((function(t){return de.default.createElement(\"div\",{className:e===t?\"react-datepicker__year-option react-datepicker__year-option--selected_year\":\"react-datepicker__year-option\",key:t,onClick:a.onChange.bind(bt(a),t)},e===t?de.default.createElement(\"span\",{className:\"react-datepicker__year-option--selected\"},\"✓\"):\"\",t)})),r=a.props.minDate?Te.default(a.props.minDate):null,n=a.props.maxDate?Te.default(a.props.maxDate):null;return n&&a.state.yearsList.find((function(e){return e===n}))||t.unshift(de.default.createElement(\"div\",{className:\"react-datepicker__year-option\",key:\"upcoming\",onClick:a.incrementYears},de.default.createElement(\"a\",{className:\"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming\"}))),r&&a.state.yearsList.find((function(e){return e===r}))||t.push(de.default.createElement(\"div\",{className:\"react-datepicker__year-option\",key:\"previous\",onClick:a.decrementYears},de.default.createElement(\"a\",{className:\"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous\"}))),t})),mt(bt(a),\"onChange\",(function(e){a.props.onChange(e)})),mt(bt(a),\"handleClickOutside\",(function(){a.props.onCancel()})),mt(bt(a),\"shiftYears\",(function(e){var t=a.state.yearsList.map((function(t){return t+e}));a.setState({yearsList:t})})),mt(bt(a),\"incrementYears\",(function(){return a.shiftYears(1)})),mt(bt(a),\"decrementYears\",(function(){return a.shiftYears(-1)}));var n=e.yearDropdownItemNumber,o=e.scrollableYearDropdown,s=n||(o?10:5);return a.state={yearsList:br(a.props.year,s,a.props.minDate,a.props.maxDate)},a}return ht(r,[{key:\"render\",value:function(){var e=ce.default({\"react-datepicker__year-dropdown\":!0,\"react-datepicker__year-dropdown--scrollable\":this.props.scrollableYearDropdown});return de.default.createElement(\"div\",{className:e},this.renderOptions())}}]),r}(de.default.Component),Sr=lt.default(Cr),_r=function(e){wt(r,e);var t=St(r);function r(){var e;ut(this,r);for(var a=arguments.length,n=new Array(a),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},r=!1;0===e.getTabIndex()&&!t.isInputFocused&&e.isSameDay(e.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(r=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(r=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains(\"react-datepicker__day\")&&(r=!0)),r&&e.dayEl.current.focus({preventScroll:!0})})),mt(bt(e),\"renderDayContents\",(function(){if(e.isOutsideMonth()){if(e.props.monthShowsDuplicateDaysEnd&&Ne.default(e.props.day)<10)return null;if(e.props.monthShowsDuplicateDaysStart&&Ne.default(e.props.day)>20)return null}return e.props.renderDayContents?e.props.renderDayContents(Ne.default(e.props.day),e.props.day):Ne.default(e.props.day)})),mt(bt(e),\"render\",(function(){return de.default.createElement(\"div\",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,tabIndex:e.getTabIndex(),\"aria-label\":e.getAriaLabel(),role:\"button\",\"aria-disabled\":e.isDisabled()},e.renderDayContents())})),e}return ht(r,[{key:\"componentDidMount\",value:function(){this.handleFocusDay()}},{key:\"componentDidUpdate\",value:function(e){this.handleFocusDay(e)}}]),r}(de.default.Component),Ir=function(e){wt(r,e);var t=St(r);function r(){var e;ut(this,r);for(var a=arguments.length,n=new Array(a),o=0;o=6,i=!r&&!e.isWeekInMonth(a);if(s||i){if(!e.props.peekNextMonth)break;o=!0}}return t})),mt(bt(e),\"onMonthClick\",(function(t,r){e.handleDayClick(Bt(qe.default(e.props.day,r)),t)})),mt(bt(e),\"handleMonthNavigation\",(function(t,r){e.isDisabled(r)||e.isExcluded(r)||(e.props.setPreSelection(r),e.MONTH_REFS[t].current&&e.MONTH_REFS[t].current.focus())})),mt(bt(e),\"onMonthKeyDown\",(function(t,r){var a=t.key;if(!e.props.disabledKeyboardNavigation)switch(a){case\"Enter\":e.onMonthClick(t,r),e.props.setPreSelection(e.props.selected);break;case\"ArrowRight\":e.handleMonthNavigation(11===r?0:r+1,we.default(e.props.preSelection,1));break;case\"ArrowLeft\":e.handleMonthNavigation(0===r?11:r-1,Ce.default(e.props.preSelection,1))}})),mt(bt(e),\"onQuarterClick\",(function(t,r){e.handleDayClick(Ht(Ae.default(e.props.day,r)),t)})),mt(bt(e),\"getMonthClassNames\",(function(t){var r=e.props,a=r.day,n=r.startDate,o=r.endDate,s=r.selected,i=r.minDate,p=r.maxDate,l=r.preSelection,d=r.monthClassName,c=d?d(a):void 0;return ce.default(\"react-datepicker__month-text\",\"react-datepicker__month-\".concat(t),c,{\"react-datepicker__month--disabled\":(i||p)&&ar(qe.default(a,t),e.props),\"react-datepicker__month--selected\":xe.default(a)===t&&Te.default(a)===Te.default(s),\"react-datepicker__month-text--keyboard-selected\":xe.default(l)===t,\"react-datepicker__month--in-range\":nr(n,o,t,a),\"react-datepicker__month--range-start\":e.isRangeStartMonth(t),\"react-datepicker__month--range-end\":e.isRangeEndMonth(t)})})),mt(bt(e),\"getTabIndex\",(function(t){var r=xe.default(e.props.preSelection);return e.props.disabledKeyboardNavigation||t!==r?\"-1\":\"0\"})),mt(bt(e),\"getAriaLabel\",(function(t){var r=e.props,a=r.ariaLabelPrefix,n=void 0===a?\"Choose\":a,o=r.disabledDayAriaLabelPrefix,s=void 0===o?\"Not available\":o,i=r.day,p=qe.default(i,t),l=e.isDisabled(p)||e.isExcluded(p)?s:n;return\"\".concat(l,\" \").concat(Lt(p,\"MMMM yyyy\"))})),mt(bt(e),\"getQuarterClassNames\",(function(t){var r=e.props,a=r.day,n=r.startDate,o=r.endDate,s=r.selected,i=r.minDate,p=r.maxDate;return ce.default(\"react-datepicker__quarter-text\",\"react-datepicker__quarter-\".concat(t),{\"react-datepicker__quarter--disabled\":(i||p)&&or(Ae.default(a,t),e.props),\"react-datepicker__quarter--selected\":Ye.default(a)===t&&Te.default(a)===Te.default(s),\"react-datepicker__quarter--in-range\":ir(n,o,t,a),\"react-datepicker__quarter--range-start\":e.isRangeStartQuarter(t),\"react-datepicker__quarter--range-end\":e.isRangeEndQuarter(t)})})),mt(bt(e),\"renderMonths\",(function(){var t=e.props,r=t.showFullMonthYearPicker,a=t.showTwoColumnMonthYearPicker,n=t.locale;return(a?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map((function(t,a){return de.default.createElement(\"div\",{className:\"react-datepicker__month-wrapper\",key:a},t.map((function(t,a){return de.default.createElement(\"div\",{ref:e.MONTH_REFS[t],key:a,onClick:function(r){e.onMonthClick(r,t)},onKeyDown:function(r){e.onMonthKeyDown(r,t)},tabIndex:e.getTabIndex(t),className:e.getMonthClassNames(t),role:\"button\",\"aria-label\":e.getAriaLabel(t)},r?Xt(t,n):Zt(t,n))})))}))})),mt(bt(e),\"renderQuarters\",(function(){return de.default.createElement(\"div\",{className:\"react-datepicker__quarter-wrapper\"},[1,2,3,4].map((function(t,r){return de.default.createElement(\"div\",{key:r,onClick:function(r){e.onQuarterClick(r,t)},className:e.getQuarterClassNames(t)},er(t,e.props.locale))})))})),mt(bt(e),\"getClassNames\",(function(){var t=e.props,r=(t.day,t.selectingDate),a=t.selectsStart,n=t.selectsEnd,o=t.showMonthYearPicker,s=t.showQuarterYearPicker;return ce.default(\"react-datepicker__month\",{\"react-datepicker__month--selecting-range\":r&&(a||n)},{\"react-datepicker__monthPicker\":o},{\"react-datepicker__quarterPicker\":s})})),e}return ht(r,[{key:\"render\",value:function(){var e=this.props,t=e.showMonthYearPicker,r=e.showQuarterYearPicker,a=e.day,n=e.ariaLabelPrefix,o=void 0===n?\"month \":n;return de.default.createElement(\"div\",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,\"aria-label\":\"\".concat(o,\" \").concat(Lt(a,\"yyyy-MM\"))},t?this.renderMonths():r?this.renderQuarters():this.renderWeeks())}}]),r}(de.default.Component),Rr=function(e){wt(r,e);var t=St(r);function r(){var e;ut(this,r);for(var a=arguments.length,n=new Array(a),o=0;o0&&void 0!==arguments[0]?arguments[0]:{}).className||\"\").split(/\\s+/);return Br.some((function(t){return e.indexOf(t)>=0}))})(e.target)&&a.props.onDropdownFocus()})),mt(bt(a),\"getDateInView\",(function(){var e=a.props,t=e.preSelection,r=e.selected,n=e.openToDate,o=yr(a.props),s=vr(a.props),i=Yt(),p=n||r||t;return p||(o&&nt.default(i,o)?o:s&&at.default(i,s)?s:i)})),mt(bt(a),\"increaseMonth\",(function(){a.setState((function(e){var t=e.date;return{date:we.default(t,1)}}),(function(){return a.handleMonthChange(a.state.date)}))})),mt(bt(a),\"decreaseMonth\",(function(){a.setState((function(e){var t=e.date;return{date:Ce.default(t,1)}}),(function(){return a.handleMonthChange(a.state.date)}))})),mt(bt(a),\"handleDayClick\",(function(e,t,r){a.props.onSelect(e,t,r),a.props.setPreSelection&&a.props.setPreSelection(e)})),mt(bt(a),\"handleDayMouseEnter\",(function(e){a.setState({selectingDate:e}),a.props.onDayMouseEnter&&a.props.onDayMouseEnter(e)})),mt(bt(a),\"handleMonthMouseLeave\",(function(){a.setState({selectingDate:null}),a.props.onMonthMouseLeave&&a.props.onMonthMouseLeave()})),mt(bt(a),\"handleYearChange\",(function(e){a.props.onYearChange&&a.props.onYearChange(e),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(e),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(e)})),mt(bt(a),\"handleMonthChange\",(function(e){a.props.onMonthChange&&a.props.onMonthChange(e),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(e),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(e)})),mt(bt(a),\"handleMonthYearChange\",(function(e){a.handleYearChange(e),a.handleMonthChange(e)})),mt(bt(a),\"changeYear\",(function(e){a.setState((function(t){var r=t.date;return{date:We.default(r,e)}}),(function(){return a.handleYearChange(a.state.date)}))})),mt(bt(a),\"changeMonth\",(function(e){a.setState((function(t){var r=t.date;return{date:qe.default(r,e)}}),(function(){return a.handleMonthChange(a.state.date)}))})),mt(bt(a),\"changeMonthYear\",(function(e){a.setState((function(t){var r=t.date;return{date:We.default(qe.default(r,xe.default(e)),Te.default(e))}}),(function(){return a.handleMonthYearChange(a.state.date)}))})),mt(bt(a),\"header\",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.state.date,t=Wt(e,a.props.locale),r=[];return a.props.showWeekNumbers&&r.push(de.default.createElement(\"div\",{key:\"W\",className:\"react-datepicker__day-name\"},a.props.weekLabel||\"#\")),r.concat([0,1,2,3,4,5,6].map((function(e){var r=ve.default(t,e),n=a.formatWeekday(r,a.props.locale),o=a.props.weekDayClassName?a.props.weekDayClassName(r):void 0;return de.default.createElement(\"div\",{key:e,className:ce.default(\"react-datepicker__day-name\",o)},n)})))})),mt(bt(a),\"formatWeekday\",(function(e,t){return a.props.formatWeekDay?function(e,t,r){return t(Lt(e,\"EEEE\",r))}(e,a.props.formatWeekDay,t):a.props.useWeekdaysShort?function(e,t){return Lt(e,\"EEE\",t)}(e,t):function(e,t){return Lt(e,\"EEEEEE\",t)}(e,t)})),mt(bt(a),\"decreaseYear\",(function(){a.setState((function(e){var t=e.date;return{date:Se.default(t,a.props.showYearPicker?a.props.yearItemNumber:1)}}),(function(){return a.handleYearChange(a.state.date)}))})),mt(bt(a),\"renderPreviousButton\",(function(){if(!a.props.renderCustomHeader){var e;switch(!0){case a.props.showMonthYearPicker:e=hr(a.state.date,a.props);break;case a.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.yearItemNumber,n=void 0===a?Ot:a,o=kr(jt(Se.default(e,n)),n).endPeriod,s=r&&Te.default(r);return s&&s>o||!1}(a.state.date,a.props);break;default:e=ur(a.state.date,a.props)}if((a.props.forceShowMonthNavigation||a.props.showDisabledMonthNavigation||!e)&&!a.props.showTimeSelectOnly){var t=[\"react-datepicker__navigation\",\"react-datepicker__navigation--previous\"],r=a.decreaseMonth;(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker)&&(r=a.decreaseYear),e&&a.props.showDisabledMonthNavigation&&(t.push(\"react-datepicker__navigation--previous--disabled\"),r=null);var n=a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker,o=a.props,s=o.previousMonthAriaLabel,i=void 0===s?\"Previous Month\":s,p=o.previousYearAriaLabel,l=void 0===p?\"Previous Year\":p;return de.default.createElement(\"button\",{type:\"button\",className:t.join(\" \"),onClick:r,\"aria-label\":n?l:i},n?a.props.previousYearButtonLabel:a.props.previousMonthButtonLabel)}}})),mt(bt(a),\"increaseYear\",(function(){a.setState((function(e){var t=e.date;return{date:ge.default(t,a.props.showYearPicker?a.props.yearItemNumber:1)}}),(function(){return a.handleYearChange(a.state.date)}))})),mt(bt(a),\"renderNextButton\",(function(){if(!a.props.renderCustomHeader){var e;switch(!0){case a.props.showMonthYearPicker:e=mr(a.state.date,a.props);break;case a.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.maxDate,a=t.yearItemNumber,n=void 0===a?Ot:a,o=kr(ge.default(e,n),n).startPeriod,s=r&&Te.default(r);return s&&s0&&void 0!==arguments[0]?arguments[0]:a.state.date,t=[\"react-datepicker__current-month\"];return a.props.showYearDropdown&&t.push(\"react-datepicker__current-month--hasYearDropdown\"),a.props.showMonthDropdown&&t.push(\"react-datepicker__current-month--hasMonthDropdown\"),a.props.showMonthYearDropdown&&t.push(\"react-datepicker__current-month--hasMonthYearDropdown\"),de.default.createElement(\"div\",{className:t.join(\" \")},Lt(e,a.props.dateFormat,a.props.locale))})),mt(bt(a),\"renderYearDropdown\",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a.props.showYearDropdown&&!e)return de.default.createElement(_r,{adjustDateOnChange:a.props.adjustDateOnChange,date:a.state.date,onSelect:a.props.onSelect,setOpen:a.props.setOpen,dropdownMode:a.props.dropdownMode,onChange:a.changeYear,minDate:a.props.minDate,maxDate:a.props.maxDate,year:Te.default(a.state.date),scrollableYearDropdown:a.props.scrollableYearDropdown,yearDropdownItemNumber:a.props.yearDropdownItemNumber})})),mt(bt(a),\"renderMonthDropdown\",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a.props.showMonthDropdown&&!e)return de.default.createElement(Er,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,onChange:a.changeMonth,month:xe.default(a.state.date),useShortMonthInDropdown:a.props.useShortMonthInDropdown})})),mt(bt(a),\"renderMonthYearDropdown\",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a.props.showMonthYearDropdown&&!e)return de.default.createElement(Yr,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,dateFormat:a.props.dateFormat,onChange:a.changeMonthYear,minDate:a.props.minDate,maxDate:a.props.maxDate,date:a.state.date,scrollableMonthYearDropdown:a.props.scrollableMonthYearDropdown})})),mt(bt(a),\"renderTodayButton\",(function(){if(a.props.todayButton&&!a.props.showTimeSelectOnly)return de.default.createElement(\"div\",{className:\"react-datepicker__today-button\",onClick:function(e){return a.props.onSelect(Ve.default(Yt()),e)}},a.props.todayButton)})),mt(bt(a),\"renderDefaultHeader\",(function(e){var t=e.monthDate,r=e.i;return de.default.createElement(\"div\",{className:\"react-datepicker__header \".concat(a.props.showTimeSelect?\"react-datepicker__header--has-time-select\":\"\")},a.renderCurrentMonth(t),de.default.createElement(\"div\",{className:\"react-datepicker__header__dropdown react-datepicker__header__dropdown--\".concat(a.props.dropdownMode),onFocus:a.handleDropdownFocus},a.renderMonthDropdown(0!==r),a.renderMonthYearDropdown(0!==r),a.renderYearDropdown(0!==r)),de.default.createElement(\"div\",{className:\"react-datepicker__day-names\"},a.header(t)))})),mt(bt(a),\"renderCustomHeader\",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.monthDate,r=e.i;if(0!==r&&void 0!==r)return null;var n=ur(a.state.date,a.props),o=fr(a.state.date,a.props),s=hr(a.state.date,a.props),i=mr(a.state.date,a.props),p=!a.props.showMonthYearPicker&&!a.props.showQuarterYearPicker&&!a.props.showYearPicker;return de.default.createElement(\"div\",{className:\"react-datepicker__header react-datepicker__header--custom\",onFocus:a.props.onDropdownFocus},a.props.renderCustomHeader(Dt(Dt({},a.state),{},{changeMonth:a.changeMonth,changeYear:a.changeYear,decreaseMonth:a.decreaseMonth,increaseMonth:a.increaseMonth,decreaseYear:a.decreaseYear,increaseYear:a.increaseYear,prevMonthButtonDisabled:n,nextMonthButtonDisabled:o,prevYearButtonDisabled:s,nextYearButtonDisabled:i})),p&&de.default.createElement(\"div\",{className:\"react-datepicker__day-names\"},a.header(t)))})),mt(bt(a),\"renderYearHeader\",(function(){var e=a.state.date,t=a.props,r=t.showYearPicker,n=kr(e,t.yearItemNumber),o=n.startPeriod,s=n.endPeriod;return de.default.createElement(\"div\",{className:\"react-datepicker__header react-datepicker-year-header\"},r?\"\".concat(o,\" - \").concat(s):Te.default(e))})),mt(bt(a),\"renderHeader\",(function(e){switch(!0){case void 0!==a.props.renderCustomHeader:return a.renderCustomHeader(e);case a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker:return a.renderYearHeader(e);default:return a.renderDefaultHeader(e)}})),mt(bt(a),\"renderMonths\",(function(){if(!a.props.showTimeSelectOnly&&!a.props.showYearPicker){for(var e=[],t=a.props.showPreviousMonths?a.props.monthsShown-1:0,r=Ce.default(a.state.date,t),n=0;n0;e.push(de.default.createElement(\"div\",{key:i,ref:function(e){a.monthContainer=e},className:\"react-datepicker__month-container\"},a.renderHeader({monthDate:s,i:n}),de.default.createElement(Fr,{chooseDayAriaLabelPrefix:a.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:a.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:a.props.weekAriaLabelPrefix,onChange:a.changeMonthYear,day:s,dayClassName:a.props.dayClassName,monthClassName:a.props.monthClassName,onDayClick:a.handleDayClick,handleOnKeyDown:a.props.handleOnKeyDown,onDayMouseEnter:a.handleDayMouseEnter,onMouseLeave:a.handleMonthMouseLeave,onWeekSelect:a.props.onWeekSelect,orderInDisplay:n,formatWeekNumber:a.props.formatWeekNumber,locale:a.props.locale,minDate:a.props.minDate,maxDate:a.props.maxDate,excludeDates:a.props.excludeDates,highlightDates:a.props.highlightDates,selectingDate:a.state.selectingDate,includeDates:a.props.includeDates,inline:a.props.inline,shouldFocusDayInline:a.props.shouldFocusDayInline,fixedHeight:a.props.fixedHeight,filterDate:a.props.filterDate,preSelection:a.props.preSelection,setPreSelection:a.props.setPreSelection,selected:a.props.selected,selectsStart:a.props.selectsStart,selectsEnd:a.props.selectsEnd,selectsRange:a.props.selectsRange,showWeekNumbers:a.props.showWeekNumbers,startDate:a.props.startDate,endDate:a.props.endDate,peekNextMonth:a.props.peekNextMonth,setOpen:a.props.setOpen,shouldCloseOnSelect:a.props.shouldCloseOnSelect,renderDayContents:a.props.renderDayContents,disabledKeyboardNavigation:a.props.disabledKeyboardNavigation,showMonthYearPicker:a.props.showMonthYearPicker,showFullMonthYearPicker:a.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:a.props.showTwoColumnMonthYearPicker,showYearPicker:a.props.showYearPicker,showQuarterYearPicker:a.props.showQuarterYearPicker,isInputFocused:a.props.isInputFocused,containerRef:a.containerRef,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:l})))}return e}})),mt(bt(a),\"renderYears\",(function(){if(!a.props.showTimeSelectOnly)return a.props.showYearPicker?de.default.createElement(\"div\",{className:\"react-datepicker__year--container\"},a.renderHeader(),de.default.createElement(qr,yt({onDayClick:a.handleDayClick,date:a.state.date},a.props))):void 0})),mt(bt(a),\"renderTimeSection\",(function(){if(a.props.showTimeSelect&&(a.state.monthContainer||a.props.showTimeSelectOnly))return de.default.createElement(Rr,{selected:a.props.selected,openToDate:a.props.openToDate,onChange:a.props.onTimeChange,timeClassName:a.props.timeClassName,format:a.props.timeFormat,includeTimes:a.props.includeTimes,intervals:a.props.timeIntervals,minTime:a.props.minTime,maxTime:a.props.maxTime,excludeTimes:a.props.excludeTimes,filterTime:a.props.filterTime,timeCaption:a.props.timeCaption,todayButton:a.props.todayButton,showMonthDropdown:a.props.showMonthDropdown,showMonthYearDropdown:a.props.showMonthYearDropdown,showYearDropdown:a.props.showYearDropdown,withPortal:a.props.withPortal,monthRef:a.state.monthContainer,injectTimes:a.props.injectTimes,locale:a.props.locale,showTimeSelectOnly:a.props.showTimeSelectOnly})})),mt(bt(a),\"renderInputTimeSection\",(function(){var e=new Date(a.props.selected),t=It(e)&&Boolean(a.props.selected)?\"\".concat(gr(e.getHours()),\":\").concat(gr(e.getMinutes())):\"\";if(a.props.showTimeInput)return de.default.createElement(Ar,{date:e,timeString:t,timeInputLabel:a.props.timeInputLabel,onChange:a.props.onTimeChange,customTimeInput:a.props.customTimeInput})})),a.containerRef=de.default.createRef(),a.state={date:a.getDateInView(),selectingDate:null,monthContainer:null},a}return ht(r,null,[{key:\"defaultProps\",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:\"Time\",previousYearButtonLabel:\"Previous Year\",nextYearButtonLabel:\"Next Year\",previousMonthButtonLabel:\"Previous Month\",nextMonthButtonLabel:\"Next Month\",customTimeInput:null,yearItemNumber:Ot}}}]),ht(r,[{key:\"componentDidMount\",value:function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=void e.setState({monthContainer:e.monthContainer}))}},{key:\"componentDidUpdate\",value:function(e){this.props.preSelection&&!Ut(this.props.preSelection,e.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!Ut(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})}},{key:\"render\",value:function(){var e=this.props.container||Wr;return de.default.createElement(\"div\",{ref:this.containerRef},de.default.createElement(e,{className:ce.default(\"react-datepicker\",this.props.className,{\"react-datepicker--time-only\":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}]),r}(de.default.Component),Hr=function(e){return!e.disabled&&-1!==e.tabIndex},Kr=function(e){wt(r,e);var t=St(r);function r(e){var a;return ut(this,r),mt(bt(a=t.call(this,e)),\"getTabChildren\",(function(){return Array.prototype.slice.call(a.tabLoopRef.current.querySelectorAll(\"[tabindex], a, button, input, select, textarea\"),1,-1).filter(Hr)})),mt(bt(a),\"handleFocusStart\",(function(e){var t=a.getTabChildren();t&&t.length>1&&t[t.length-1].focus()})),mt(bt(a),\"handleFocusEnd\",(function(e){var t=a.getTabChildren();t&&t.length>1&&t[0].focus()})),a.tabLoopRef=de.default.createRef(),a}return ht(r,null,[{key:\"defaultProps\",get:function(){return{enableTabLoop:!0}}}]),ht(r,[{key:\"render\",value:function(){return this.props.enableTabLoop?de.default.createElement(\"div\",{className:\"react-datepicker__tab-loop\",ref:this.tabLoopRef},de.default.createElement(\"div\",{className:\"react-datepicker__tab-loop__start\",tabIndex:\"0\",onFocus:this.handleFocusStart}),this.props.children,de.default.createElement(\"div\",{className:\"react-datepicker__tab-loop__end\",tabIndex:\"0\",onFocus:this.handleFocusEnd})):this.props.children}}]),r}(de.default.Component),Qr=function(e){wt(r,e);var t=St(r);function r(e){var a;return ut(this,r),(a=t.call(this,e)).el=document.createElement(\"div\"),a}return ht(r,[{key:\"componentDidMount\",value:function(){this.portalRoot=document.getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement(\"div\"),this.portalRoot.setAttribute(\"id\",this.props.portalId),document.body.appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:\"componentWillUnmount\",value:function(){this.portalRoot.removeChild(this.el)}},{key:\"render\",value:function(){return dt.default.createPortal(this.props.children,this.el)}}]),r}(de.default.Component),Vr=function(e){wt(r,e);var t=St(r);function r(){return ut(this,r),t.apply(this,arguments)}return ht(r,[{key:\"render\",value:function(){var e,t=this.props,r=t.className,a=t.wrapperClassName,n=t.hidePopper,o=t.popperComponent,s=t.popperModifiers,i=t.popperPlacement,p=t.popperProps,l=t.targetComponent,d=t.enableTabLoop,c=t.popperOnKeyDown,u=t.portalId;if(!n){var f=ce.default(\"react-datepicker-popper\",r);e=de.default.createElement(ie.Popper,yt({modifiers:s,placement:i},p),(function(e){var t=e.ref,r=e.style,a=e.placement,n=e.arrowProps;return de.default.createElement(Kr,{enableTabLoop:d},de.default.createElement(\"div\",yt({ref:t,style:r},{className:f,\"data-placement\":a,onKeyDown:c}),de.default.cloneElement(o,{arrowProps:n})))}))}this.props.popperContainer&&(e=de.default.createElement(this.props.popperContainer,{},e)),u&&!n&&(e=de.default.createElement(Qr,{portalId:u},e));var h=ce.default(\"react-datepicker-wrapper\",a);return de.default.createElement(ie.Manager,{className:\"react-datepicker-manager\"},de.default.createElement(ie.Reference,null,(function(e){var t=e.ref;return de.default.createElement(\"div\",{ref:t,className:h},l)})),e)}}],[{key:\"defaultProps\",get:function(){return{hidePopper:!0,popperModifiers:{preventOverflow:{enabled:!0,escapeWithReference:!0,boundariesElement:\"viewport\"}},popperProps:{},popperPlacement:\"bottom-start\"}}}]),r}(de.default.Component),Ur=\"react-datepicker-ignore-onclickoutside\",$r=lt.default(jr);var zr=\"Date input not valid.\",Gr=function(e){wt(r,e);var t=St(r);function r(e){var a;return ut(this,r),mt(bt(a=t.call(this,e)),\"getPreSelection\",(function(){return a.props.openToDate?a.props.openToDate:a.props.selectsEnd&&a.props.startDate?a.props.startDate:a.props.selectsStart&&a.props.endDate?a.props.endDate:Yt()})),mt(bt(a),\"calcInitialState\",(function(){var e=a.getPreSelection(),t=yr(a.props),r=vr(a.props),n=t&&nt.default(e,t)?t:r&&at.default(e,r)?r:e;return{open:a.props.startOpen||!1,preventFocus:!1,preSelection:a.props.selected?a.props.selected:n,highlightDates:Dr(a.props.highlightDates),focused:!1,shouldFocusDayInline:!1}})),mt(bt(a),\"clearPreventFocusTimeout\",(function(){a.preventFocusTimeout&&clearTimeout(a.preventFocusTimeout)})),mt(bt(a),\"setFocus\",(function(){a.input&&a.input.focus&&a.input.focus({preventScroll:!0})})),mt(bt(a),\"setBlur\",(function(){a.input&&a.input.blur&&a.input.blur(),a.cancelFocusInput()})),mt(bt(a),\"setOpen\",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];a.setState({open:e,preSelection:e&&a.state.open?a.state.preSelection:a.calcInitialState().preSelection,lastPreSelectChange:Xr},(function(){e||a.setState((function(e){return{focused:!!t&&e.focused}}),(function(){!t&&a.setBlur(),a.setState({inputValue:null})}))}))})),mt(bt(a),\"inputOk\",(function(){return ue.default(a.state.preSelection)})),mt(bt(a),\"isCalendarOpen\",(function(){return void 0===a.props.open?a.state.open&&!a.props.disabled&&!a.props.readOnly:a.props.open})),mt(bt(a),\"handleFocus\",(function(e){a.state.preventFocus||(a.props.onFocus(e),a.props.preventOpenOnFocus||a.props.readOnly||a.setOpen(!0)),a.setState({focused:!0})})),mt(bt(a),\"cancelFocusInput\",(function(){clearTimeout(a.inputFocusTimeout),a.inputFocusTimeout=null})),mt(bt(a),\"deferFocusInput\",(function(){a.cancelFocusInput(),a.inputFocusTimeout=setTimeout((function(){return a.setFocus()}),1)})),mt(bt(a),\"handleDropdownFocus\",(function(){a.cancelFocusInput()})),mt(bt(a),\"handleBlur\",(function(e){(!a.state.open||a.props.withPortal||a.props.showTimeInput)&&a.props.onBlur(e),a.setState({focused:!1})})),mt(bt(a),\"handleCalendarClickOutside\",(function(e){a.props.inline||a.setOpen(!1),a.props.onClickOutside(e),a.props.withPortal&&e.preventDefault()})),mt(bt(a),\"handleChange\",(function(){for(var e=arguments.length,t=new Array(e),r=0;re.length)&&(t=e.length);for(var r=0,a=new Array(t);r0&&(o=mt.default(e,t.slice(0,e.length),new Date)),Ht(o)||(o=new Date(e))),Ht(o)&&i?o:null)}function Ht(e,t){return t=t||new Date(\"1/1/1000\"),ve.default(e)&&!ut.default(e,t)}function jt(e,t,r){if(\"en\"===r)return De.default(e,t,{awareOfUnicodeTokens:!0});var a=lr(r);return r&&!a&&console.warn('A locale object was not found for the provided string [\"'.concat(r,'\"].')),!a&&pr()&&lr(pr())&&(a=lr(pr())),De.default(e,t,{locale:a||null,awareOfUnicodeTokens:!0})}function Vt(e,t){var r=t.dateFormat,a=t.locale;return e&&jt(e,Array.isArray(r)?r[0]:r,a)||\"\"}function Ut(e,t){var r=t.hour,a=void 0===r?0:r,n=t.minute,o=void 0===n?0:n,s=t.second,i=void 0===s?0:s;return Qe.default(Be.default(We.default(e,i),o),a)}function zt(e,t){var r=t&&lr(t)||pr()&&lr(pr());return Re.default(e,r?{locale:r}:null)}function $t(e,t){return jt(e,\"ddd\",t)}function Gt(e){return Xe.default(e)}function Jt(e,t,r){var a=lr(t||pr());return Ze.default(e,{locale:a,weekStartsOn:r})}function Xt(e){return et.default(e)}function Zt(e){return rt.default(e)}function er(e){return tt.default(e)}function tr(){return Xe.default(Bt())}function rr(e,t){return e&&t?lt.default(e,t):!e&&!t}function ar(e,t){return e&&t?pt.default(e,t):!e&&!t}function nr(e,t){return e&&t?dt.default(e,t):!e&&!t}function or(e,t){return e&&t?it.default(e,t):!e&&!t}function sr(e,t){return e&&t?st.default(e,t):!e&&!t}function ir(e,t,r){var a,n=Xe.default(t),o=at.default(r);try{a=ft.default(e,{start:n,end:o})}catch(e){a=!1}return a}function pr(){return(\"undefined\"!=typeof window?window:globalThis).__localeId__}function lr(e){if(\"string\"==typeof e){var t=\"undefined\"!=typeof window?window:globalThis;return t.__localeData__?t.__localeData__[e]:null}return e}function dr(e,t){return jt(He.default(Bt(),e),\"LLLL\",t)}function cr(e,t){return jt(He.default(Bt(),e),\"LLL\",t)}function ur(e,t){return jt(je.default(Bt(),e),\"QQQ\",t)}function fr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.maxDate,n=t.excludeDates,o=t.excludeDateIntervals,s=t.includeDates,i=t.includeDateIntervals,p=t.filterDate;return gr(e,{minDate:r,maxDate:a})||n&&n.some((function(t){return or(e,t)}))||o&&o.some((function(t){var r=t.start,a=t.end;return ft.default(e,{start:r,end:a})}))||s&&!s.some((function(t){return or(e,t)}))||i&&!i.some((function(t){var r=t.start,a=t.end;return ft.default(e,{start:r,end:a})}))||p&&!p(Bt(e))||!1}function hr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.excludeDates,a=t.excludeDateIntervals;return a&&a.length>0?a.some((function(t){var r=t.start,a=t.end;return ft.default(e,{start:r,end:a})})):r&&r.some((function(t){return or(e,t)}))||!1}function mr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.maxDate,n=t.excludeDates,o=t.includeDates,s=t.filterDate;return gr(e,{minDate:et.default(r),maxDate:nt.default(a)})||n&&n.some((function(t){return ar(e,t)}))||o&&!o.some((function(t){return ar(e,t)}))||s&&!s(Bt(e))||!1}function yr(e,t,r,a){var n=qe.default(e),o=Fe.default(e),s=qe.default(t),i=Fe.default(t),p=qe.default(a);return n===s&&n===p?o<=r&&r<=i:n=r||pn:void 0}function vr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.maxDate,n=t.excludeDates,o=t.includeDates,s=t.filterDate;return gr(e,{minDate:r,maxDate:a})||n&&n.some((function(t){return nr(e,t)}))||o&&!o.some((function(t){return nr(e,t)}))||s&&!s(Bt(e))||!1}function Dr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.maxDate,n=t.excludeDates,o=t.includeDates,s=t.filterDate,i=new Date(e,0,1);return gr(i,{minDate:rt.default(r),maxDate:ot.default(a)})||n&&n.some((function(e){return rr(i,e)}))||o&&!o.some((function(e){return rr(i,e)}))||s&&!s(Bt(i))||!1}function wr(e,t,r,a){var n=qe.default(e),o=Ae.default(e),s=qe.default(t),i=Ae.default(t),p=qe.default(a);return n===s&&n===p?o<=r&&r<=i:n=r||pn:void 0}function gr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.maxDate;return r&&$e.default(e,r)<0||a&&$e.default(e,a)>0}function kr(e,t){return t.some((function(t){return Ie.default(t)===Ie.default(e)&&Ye.default(t)===Ye.default(e)}))}function br(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.excludeTimes,a=t.includeTimes,n=t.filterTime;return r&&kr(e,r)||a&&!kr(e,a)||n&&!n(e)||!1}function Sr(e,t){var r=t.minTime,a=t.maxTime;if(!r||!a)throw new Error(\"Both minTime and maxTime props required\");var n,o=Bt(),s=Qe.default(Be.default(o,Ye.default(e)),Ie.default(e)),i=Qe.default(Be.default(o,Ye.default(r)),Ie.default(r)),p=Qe.default(Be.default(o,Ye.default(a)),Ie.default(a));try{n=!ft.default(s,{start:i,end:p})}catch(e){n=!1}return n}function Cr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.includeDates,n=Ee.default(e,1);return r&&Ge.default(r,n)>0||a&&a.every((function(e){return Ge.default(e,n)>0}))||!1}function _r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.maxDate,a=t.includeDates,n=Se.default(e,1);return r&&Ge.default(n,r)>0||a&&a.every((function(e){return Ge.default(n,e)>0}))||!1}function Mr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.includeDates,n=xe.default(e,1);return r&&Je.default(r,n)>0||a&&a.every((function(e){return Je.default(e,n)>0}))||!1}function Pr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.maxDate,a=t.includeDates,n=_e.default(e,1);return r&&Je.default(n,r)>0||a&&a.every((function(e){return Je.default(n,e)>0}))||!1}function Er(e){var t=e.minDate,r=e.includeDates;if(r&&t){var a=r.filter((function(e){return $e.default(e,t)>=0}));return Ue.default(a)}return r?Ue.default(r):t}function Nr(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var a=r.filter((function(e){return $e.default(e,t)<=0}));return ze.default(a)}return r?ze.default(r):t}function xr(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"react-datepicker__day--highlighted\",r=new Map,a=0,n=e.length;a1&&void 0!==arguments[1]?arguments[1]:Kt,r=Math.ceil(qe.default(e)/t)*t,a=r-(t-1);return{startPeriod:a,endPeriod:r}}function Tr(e,t,r,a){for(var n=[],o=0;o<2*t+1;o++){var s=e+t-o,i=!0;r&&(i=qe.default(r)<=s),a&&i&&(i=qe.default(a)>=s),i&&n.push(s)}return n}var Lr=function(e){Et(a,e);var r=It(a);function a(e){var n;St(this,a),Mt(Ot(n=r.call(this,e)),\"renderOptions\",(function(){var e=n.props.year,t=n.state.yearsList.map((function(t){return he.default.createElement(\"div\",{className:e===t?\"react-datepicker__year-option react-datepicker__year-option--selected_year\":\"react-datepicker__year-option\",key:t,onClick:n.onChange.bind(Ot(n),t),\"aria-selected\":e===t?\"true\":void 0},e===t?he.default.createElement(\"span\",{className:\"react-datepicker__year-option--selected\"},\"✓\"):\"\",t)})),r=n.props.minDate?qe.default(n.props.minDate):null,a=n.props.maxDate?qe.default(n.props.maxDate):null;return a&&n.state.yearsList.find((function(e){return e===a}))||t.unshift(he.default.createElement(\"div\",{className:\"react-datepicker__year-option\",key:\"upcoming\",onClick:n.incrementYears},he.default.createElement(\"a\",{className:\"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming\"}))),r&&n.state.yearsList.find((function(e){return e===r}))||t.push(he.default.createElement(\"div\",{className:\"react-datepicker__year-option\",key:\"previous\",onClick:n.decrementYears},he.default.createElement(\"a\",{className:\"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous\"}))),t})),Mt(Ot(n),\"onChange\",(function(e){n.props.onChange(e)})),Mt(Ot(n),\"handleClickOutside\",(function(){n.props.onCancel()})),Mt(Ot(n),\"shiftYears\",(function(e){var t=n.state.yearsList.map((function(t){return t+e}));n.setState({yearsList:t})})),Mt(Ot(n),\"incrementYears\",(function(){return n.shiftYears(1)})),Mt(Ot(n),\"decrementYears\",(function(){return n.shiftYears(-1)}));var o=e.yearDropdownItemNumber,s=e.scrollableYearDropdown,i=o||(s?10:5);return n.state={yearsList:Tr(n.props.year,i,n.props.minDate,n.props.maxDate)},n.dropdownRef=t.createRef(),n}return _t(a,[{key:\"componentDidMount\",value:function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,r=t?t.find((function(e){return e.ariaSelected})):null;e.scrollTop=r?r.offsetTop+(r.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}}},{key:\"render\",value:function(){var e=me.default({\"react-datepicker__year-dropdown\":!0,\"react-datepicker__year-dropdown--scrollable\":this.props.scrollableYearDropdown});return he.default.createElement(\"div\",{className:e,ref:this.dropdownRef},this.renderOptions())}}]),a}(he.default.Component),Rr=vt.default(Lr),Fr=function(e){Et(r,e);var t=It(r);function r(){var e;St(this,r);for(var a=arguments.length,n=new Array(a),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},r=!1;0===e.getTabIndex()&&!t.isInputFocused&&e.isSameDay(e.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(r=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(r=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains(\"react-datepicker__day\")&&(r=!0)),r&&e.dayEl.current.focus({preventScroll:!0})})),Mt(Ot(e),\"renderDayContents\",(function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(Le.default(e.props.day),e.props.day):Le.default(e.props.day)})),Mt(Ot(e),\"render\",(function(){return he.default.createElement(\"div\",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,tabIndex:e.getTabIndex(),\"aria-label\":e.getAriaLabel(),role:\"option\",\"aria-disabled\":e.isDisabled(),\"aria-current\":e.isCurrentDay()?\"date\":void 0,\"aria-selected\":e.isSelected()},e.renderDayContents())})),e}return _t(r,[{key:\"componentDidMount\",value:function(){this.handleFocusDay()}},{key:\"componentDidUpdate\",value:function(e){this.handleFocusDay(e)}}]),r}(he.default.Component),Vr=function(e){Et(r,e);var t=It(r);function r(){var e;St(this,r);for(var a=arguments.length,n=new Array(a),o=0;o=6,i=!r&&!e.isWeekInMonth(o);if(s||i){if(!e.props.peekNextMonth)break;n=!0}}return t})),Mt(Ot(e),\"onMonthClick\",(function(t,r){e.handleDayClick(Xt(He.default(e.props.day,r)),t)})),Mt(Ot(e),\"handleMonthNavigation\",(function(t,r){e.isDisabled(r)||e.isExcluded(r)||(e.props.setPreSelection(r),e.MONTH_REFS[t].current&&e.MONTH_REFS[t].current.focus())})),Mt(Ot(e),\"onMonthKeyDown\",(function(t,r){t.preventDefault();var a=t.key;if(!e.props.disabledKeyboardNavigation)switch(a){case\"Enter\":e.onMonthClick(t,r),e.props.setPreSelection(e.props.selected);break;case\"ArrowRight\":e.handleMonthNavigation(11===r?0:r+1,Se.default(e.props.preSelection,1));break;case\"ArrowLeft\":e.handleMonthNavigation(0===r?11:r-1,Ee.default(e.props.preSelection,1));break;case\"ArrowUp\":e.handleMonthNavigation(r>=0&&r<=2?r+9:r-3,Ee.default(e.props.preSelection,3));break;case\"ArrowDown\":e.handleMonthNavigation(r>=9&&r<=11?r-9:r+3,Se.default(e.props.preSelection,3))}})),Mt(Ot(e),\"onQuarterClick\",(function(t,r){e.handleDayClick(er(je.default(e.props.day,r)),t)})),Mt(Ot(e),\"handleQuarterNavigation\",(function(t,r){e.isDisabled(r)||e.isExcluded(r)||(e.props.setPreSelection(r),e.QUARTER_REFS[t-1].current&&e.QUARTER_REFS[t-1].current.focus())})),Mt(Ot(e),\"onQuarterKeyDown\",(function(t,r){var a=t.key;if(!e.props.disabledKeyboardNavigation)switch(a){case\"Enter\":e.onQuarterClick(t,r),e.props.setPreSelection(e.props.selected);break;case\"ArrowRight\":e.handleQuarterNavigation(4===r?1:r+1,Ce.default(e.props.preSelection,1));break;case\"ArrowLeft\":e.handleQuarterNavigation(1===r?4:r-1,Ne.default(e.props.preSelection,1))}})),Mt(Ot(e),\"getMonthClassNames\",(function(t){var r=e.props,a=r.day,n=r.startDate,o=r.endDate,s=r.selected,i=r.minDate,p=r.maxDate,l=r.preSelection,d=r.monthClassName,c=r.excludeDates,u=r.includeDates,f=d?d(He.default(a,t)):void 0,h=He.default(a,t);return me.default(\"react-datepicker__month-text\",\"react-datepicker__month-\".concat(t),f,{\"react-datepicker__month--disabled\":(i||p||c||u)&&mr(h,e.props),\"react-datepicker__month--selected\":e.isSelectedMonth(a,t,s),\"react-datepicker__month-text--keyboard-selected\":!e.props.disabledKeyboardNavigation&&Fe.default(l)===t,\"react-datepicker__month--in-range\":yr(n,o,t,a),\"react-datepicker__month--range-start\":e.isRangeStartMonth(t),\"react-datepicker__month--range-end\":e.isRangeEndMonth(t),\"react-datepicker__month-text--today\":e.isCurrentMonth(a,t)})})),Mt(Ot(e),\"getTabIndex\",(function(t){var r=Fe.default(e.props.preSelection);return e.props.disabledKeyboardNavigation||t!==r?\"-1\":\"0\"})),Mt(Ot(e),\"getQuarterTabIndex\",(function(t){var r=Ae.default(e.props.preSelection);return e.props.disabledKeyboardNavigation||t!==r?\"-1\":\"0\"})),Mt(Ot(e),\"getAriaLabel\",(function(t){var r=e.props,a=r.chooseDayAriaLabelPrefix,n=void 0===a?\"Choose\":a,o=r.disabledDayAriaLabelPrefix,s=void 0===o?\"Not available\":o,i=r.day,p=He.default(i,t),l=e.isDisabled(p)||e.isExcluded(p)?s:n;return\"\".concat(l,\" \").concat(jt(p,\"MMMM yyyy\"))})),Mt(Ot(e),\"getQuarterClassNames\",(function(t){var r=e.props,a=r.day,n=r.startDate,o=r.endDate,s=r.selected,i=r.minDate,p=r.maxDate,l=r.preSelection;return me.default(\"react-datepicker__quarter-text\",\"react-datepicker__quarter-\".concat(t),{\"react-datepicker__quarter--disabled\":(i||p)&&vr(je.default(a,t),e.props),\"react-datepicker__quarter--selected\":e.isSelectedQuarter(a,t,s),\"react-datepicker__quarter-text--keyboard-selected\":Ae.default(l)===t,\"react-datepicker__quarter--in-range\":wr(n,o,t,a),\"react-datepicker__quarter--range-start\":e.isRangeStartQuarter(t),\"react-datepicker__quarter--range-end\":e.isRangeEndQuarter(t)})})),Mt(Ot(e),\"renderMonths\",(function(){var t=e.props,r=t.showFullMonthYearPicker,a=t.showTwoColumnMonthYearPicker,n=t.showFourColumnMonthYearPicker,o=t.locale,s=t.day,i=t.selected;return(n?[[0,1,2,3],[4,5,6,7],[8,9,10,11]]:a?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map((function(t,a){return he.default.createElement(\"div\",{className:\"react-datepicker__month-wrapper\",key:a},t.map((function(t,a){return he.default.createElement(\"div\",{ref:e.MONTH_REFS[t],key:a,onClick:function(r){e.onMonthClick(r,t)},onKeyDown:function(r){e.onMonthKeyDown(r,t)},tabIndex:e.getTabIndex(t),className:e.getMonthClassNames(t),role:\"option\",\"aria-label\":e.getAriaLabel(t),\"aria-current\":e.isCurrentMonth(s,t)?\"date\":void 0,\"aria-selected\":e.isSelectedMonth(s,t,i)},r?dr(t,o):cr(t,o))})))}))})),Mt(Ot(e),\"renderQuarters\",(function(){var t=e.props,r=t.day,a=t.selected;return he.default.createElement(\"div\",{className:\"react-datepicker__quarter-wrapper\"},[1,2,3,4].map((function(t,n){return he.default.createElement(\"div\",{key:n,ref:e.QUARTER_REFS[n],role:\"option\",onClick:function(r){e.onQuarterClick(r,t)},onKeyDown:function(r){e.onQuarterKeyDown(r,t)},className:e.getQuarterClassNames(t),\"aria-selected\":e.isSelectedQuarter(r,t,a),tabIndex:e.getQuarterTabIndex(t),\"aria-current\":e.isCurrentQuarter(r,t)?\"date\":void 0},ur(t,e.props.locale))})))})),Mt(Ot(e),\"getClassNames\",(function(){var t=e.props;t.day;var r=t.selectingDate,a=t.selectsStart,n=t.selectsEnd,o=t.showMonthYearPicker,s=t.showQuarterYearPicker;return me.default(\"react-datepicker__month\",{\"react-datepicker__month--selecting-range\":r&&(a||n)},{\"react-datepicker__monthPicker\":o},{\"react-datepicker__quarterPicker\":s})})),e}return _t(r,[{key:\"render\",value:function(){var e=this.props,t=e.showMonthYearPicker,r=e.showQuarterYearPicker,a=e.day,n=e.ariaLabelPrefix,o=void 0===n?\"month \":n;return he.default.createElement(\"div\",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,\"aria-label\":\"\".concat(o,\" \").concat(jt(a,\"yyyy-MM\")),role:\"listbox\"},t?this.renderMonths():r?this.renderQuarters():this.renderWeeks())}}]),r}(he.default.Component),$r=function(e){Et(r,e);var t=It(r);function r(){var e;St(this,r);for(var a=arguments.length,n=new Array(a),o=0;o0&&void 0!==arguments[0]?arguments[0]:{}).className||\"\").split(/\\s+/);return Zr.some((function(t){return e.indexOf(t)>=0}))})(e.target)&&a.props.onDropdownFocus()})),Mt(Ot(a),\"getDateInView\",(function(){var e=a.props,t=e.preSelection,r=e.selected,n=e.openToDate,o=Er(a.props),s=Nr(a.props),i=Bt(),p=n||r||t;return p||(o&&ut.default(i,o)?o:s&&ct.default(i,s)?s:i)})),Mt(Ot(a),\"increaseMonth\",(function(){a.setState((function(e){var t=e.date;return{date:Se.default(t,1)}}),(function(){return a.handleMonthChange(a.state.date)}))})),Mt(Ot(a),\"decreaseMonth\",(function(){a.setState((function(e){var t=e.date;return{date:Ee.default(t,1)}}),(function(){return a.handleMonthChange(a.state.date)}))})),Mt(Ot(a),\"handleDayClick\",(function(e,t,r){a.props.onSelect(e,t,r),a.props.setPreSelection&&a.props.setPreSelection(e)})),Mt(Ot(a),\"handleDayMouseEnter\",(function(e){a.setState({selectingDate:e}),a.props.onDayMouseEnter&&a.props.onDayMouseEnter(e)})),Mt(Ot(a),\"handleMonthMouseLeave\",(function(){a.setState({selectingDate:null}),a.props.onMonthMouseLeave&&a.props.onMonthMouseLeave()})),Mt(Ot(a),\"handleYearChange\",(function(e){a.props.onYearChange&&(a.props.onYearChange(e),a.setState({isRenderAriaLiveMessage:!0})),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(e),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(e)})),Mt(Ot(a),\"handleMonthChange\",(function(e){a.props.onMonthChange&&(a.props.onMonthChange(e),a.setState({isRenderAriaLiveMessage:!0})),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(e),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(e)})),Mt(Ot(a),\"handleMonthYearChange\",(function(e){a.handleYearChange(e),a.handleMonthChange(e)})),Mt(Ot(a),\"changeYear\",(function(e){a.setState((function(t){var r=t.date;return{date:Ve.default(r,e)}}),(function(){return a.handleYearChange(a.state.date)}))})),Mt(Ot(a),\"changeMonth\",(function(e){a.setState((function(t){var r=t.date;return{date:He.default(r,e)}}),(function(){return a.handleMonthChange(a.state.date)}))})),Mt(Ot(a),\"changeMonthYear\",(function(e){a.setState((function(t){var r=t.date;return{date:Ve.default(He.default(r,Fe.default(e)),qe.default(e))}}),(function(){return a.handleMonthYearChange(a.state.date)}))})),Mt(Ot(a),\"header\",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.state.date,t=Jt(e,a.props.locale,a.props.calendarStartDay),r=[];return a.props.showWeekNumbers&&r.push(he.default.createElement(\"div\",{key:\"W\",className:\"react-datepicker__day-name\"},a.props.weekLabel||\"#\")),r.concat([0,1,2,3,4,5,6].map((function(e){var r=ke.default(t,e),n=a.formatWeekday(r,a.props.locale),o=a.props.weekDayClassName?a.props.weekDayClassName(r):void 0;return he.default.createElement(\"div\",{key:e,className:me.default(\"react-datepicker__day-name\",o)},n)})))})),Mt(Ot(a),\"formatWeekday\",(function(e,t){return a.props.formatWeekDay?function(e,t,r){return t(jt(e,\"EEEE\",r))}(e,a.props.formatWeekDay,t):a.props.useWeekdaysShort?function(e,t){return jt(e,\"EEE\",t)}(e,t):function(e,t){return jt(e,\"EEEEEE\",t)}(e,t)})),Mt(Ot(a),\"decreaseYear\",(function(){a.setState((function(e){var t=e.date;return{date:xe.default(t,a.props.showYearPicker?a.props.yearItemNumber:1)}}),(function(){return a.handleYearChange(a.state.date)}))})),Mt(Ot(a),\"renderPreviousButton\",(function(){if(!a.props.renderCustomHeader){var e;switch(!0){case a.props.showMonthYearPicker:e=Mr(a.state.date,a.props);break;case a.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,a=t.yearItemNumber,n=void 0===a?Kt:a,o=Ir(Zt(xe.default(e,n)),n).endPeriod,s=r&&qe.default(r);return s&&s>o||!1}(a.state.date,a.props);break;default:e=Cr(a.state.date,a.props)}if((a.props.forceShowMonthNavigation||a.props.showDisabledMonthNavigation||!e)&&!a.props.showTimeSelectOnly){var t=[\"react-datepicker__navigation\",\"react-datepicker__navigation--previous\"],r=a.decreaseMonth;(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker)&&(r=a.decreaseYear),e&&a.props.showDisabledMonthNavigation&&(t.push(\"react-datepicker__navigation--previous--disabled\"),r=null);var n=a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker,o=a.props,s=o.previousMonthButtonLabel,i=o.previousYearButtonLabel,p=a.props,l=p.previousMonthAriaLabel,d=void 0===l?\"string\"==typeof s?s:\"Previous Month\":l,c=p.previousYearAriaLabel,u=void 0===c?\"string\"==typeof i?i:\"Previous Year\":c;return he.default.createElement(\"button\",{type:\"button\",className:t.join(\" \"),onClick:r,onKeyDown:a.props.handleOnKeyDown,\"aria-label\":n?u:d},he.default.createElement(\"span\",{className:[\"react-datepicker__navigation-icon\",\"react-datepicker__navigation-icon--previous\"].join(\" \")},n?a.props.previousYearButtonLabel:a.props.previousMonthButtonLabel))}}})),Mt(Ot(a),\"increaseYear\",(function(){a.setState((function(e){var t=e.date;return{date:_e.default(t,a.props.showYearPicker?a.props.yearItemNumber:1)}}),(function(){return a.handleYearChange(a.state.date)}))})),Mt(Ot(a),\"renderNextButton\",(function(){if(!a.props.renderCustomHeader){var e;switch(!0){case a.props.showMonthYearPicker:e=Pr(a.state.date,a.props);break;case a.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.maxDate,a=t.yearItemNumber,n=void 0===a?Kt:a,o=Ir(_e.default(e,n),n).startPeriod,s=r&&qe.default(r);return s&&s0&&void 0!==arguments[0]?arguments[0]:a.state.date,t=[\"react-datepicker__current-month\"];return a.props.showYearDropdown&&t.push(\"react-datepicker__current-month--hasYearDropdown\"),a.props.showMonthDropdown&&t.push(\"react-datepicker__current-month--hasMonthDropdown\"),a.props.showMonthYearDropdown&&t.push(\"react-datepicker__current-month--hasMonthYearDropdown\"),he.default.createElement(\"div\",{className:t.join(\" \")},jt(e,a.props.dateFormat,a.props.locale))})),Mt(Ot(a),\"renderYearDropdown\",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a.props.showYearDropdown&&!e)return he.default.createElement(Fr,{adjustDateOnChange:a.props.adjustDateOnChange,date:a.state.date,onSelect:a.props.onSelect,setOpen:a.props.setOpen,dropdownMode:a.props.dropdownMode,onChange:a.changeYear,minDate:a.props.minDate,maxDate:a.props.maxDate,year:qe.default(a.state.date),scrollableYearDropdown:a.props.scrollableYearDropdown,yearDropdownItemNumber:a.props.yearDropdownItemNumber})})),Mt(Ot(a),\"renderMonthDropdown\",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a.props.showMonthDropdown&&!e)return he.default.createElement(Kr,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,onChange:a.changeMonth,month:Fe.default(a.state.date),useShortMonthInDropdown:a.props.useShortMonthInDropdown})})),Mt(Ot(a),\"renderMonthYearDropdown\",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a.props.showMonthYearDropdown&&!e)return he.default.createElement(Hr,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,dateFormat:a.props.dateFormat,onChange:a.changeMonthYear,minDate:a.props.minDate,maxDate:a.props.maxDate,date:a.state.date,scrollableMonthYearDropdown:a.props.scrollableMonthYearDropdown})})),Mt(Ot(a),\"handleTodayButtonClick\",(function(e){a.props.onSelect(tr(),e),a.props.setPreSelection&&a.props.setPreSelection(tr())})),Mt(Ot(a),\"renderTodayButton\",(function(){if(a.props.todayButton&&!a.props.showTimeSelectOnly)return he.default.createElement(\"div\",{className:\"react-datepicker__today-button\",onClick:function(e){return a.handleTodayButtonClick(e)}},a.props.todayButton)})),Mt(Ot(a),\"renderDefaultHeader\",(function(e){var t=e.monthDate,r=e.i;return he.default.createElement(\"div\",{className:\"react-datepicker__header \".concat(a.props.showTimeSelect?\"react-datepicker__header--has-time-select\":\"\")},a.renderCurrentMonth(t),he.default.createElement(\"div\",{className:\"react-datepicker__header__dropdown react-datepicker__header__dropdown--\".concat(a.props.dropdownMode),onFocus:a.handleDropdownFocus},a.renderMonthDropdown(0!==r),a.renderMonthYearDropdown(0!==r),a.renderYearDropdown(0!==r)),he.default.createElement(\"div\",{className:\"react-datepicker__day-names\"},a.header(t)))})),Mt(Ot(a),\"renderCustomHeader\",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.monthDate,r=e.i;if(a.props.showTimeSelect&&!a.state.monthContainer||a.props.showTimeSelectOnly)return null;var n=Cr(a.state.date,a.props),o=_r(a.state.date,a.props),s=Mr(a.state.date,a.props),i=Pr(a.state.date,a.props),p=!a.props.showMonthYearPicker&&!a.props.showQuarterYearPicker&&!a.props.showYearPicker;return he.default.createElement(\"div\",{className:\"react-datepicker__header react-datepicker__header--custom\",onFocus:a.props.onDropdownFocus},a.props.renderCustomHeader(kt(kt({},a.state),{},{customHeaderCount:r,monthDate:t,changeMonth:a.changeMonth,changeYear:a.changeYear,decreaseMonth:a.decreaseMonth,increaseMonth:a.increaseMonth,decreaseYear:a.decreaseYear,increaseYear:a.increaseYear,prevMonthButtonDisabled:n,nextMonthButtonDisabled:o,prevYearButtonDisabled:s,nextYearButtonDisabled:i})),p&&he.default.createElement(\"div\",{className:\"react-datepicker__day-names\"},a.header(t)))})),Mt(Ot(a),\"renderYearHeader\",(function(){var e=a.state.date,t=a.props,r=t.showYearPicker,n=Ir(e,t.yearItemNumber),o=n.startPeriod,s=n.endPeriod;return he.default.createElement(\"div\",{className:\"react-datepicker__header react-datepicker-year-header\"},r?\"\".concat(o,\" - \").concat(s):qe.default(e))})),Mt(Ot(a),\"renderHeader\",(function(e){switch(!0){case void 0!==a.props.renderCustomHeader:return a.renderCustomHeader(e);case a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker:return a.renderYearHeader(e);default:return a.renderDefaultHeader(e)}})),Mt(Ot(a),\"renderMonths\",(function(){if(!a.props.showTimeSelectOnly&&!a.props.showYearPicker){for(var e=[],t=a.props.showPreviousMonths?a.props.monthsShown-1:0,r=Ee.default(a.state.date,t),n=0;n0;e.push(he.default.createElement(\"div\",{key:i,ref:function(e){a.monthContainer=e},className:\"react-datepicker__month-container\"},a.renderHeader({monthDate:s,i:n}),he.default.createElement(zr,{chooseDayAriaLabelPrefix:a.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:a.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:a.props.weekAriaLabelPrefix,ariaLabelPrefix:a.props.monthAriaLabelPrefix,onChange:a.changeMonthYear,day:s,dayClassName:a.props.dayClassName,calendarStartDay:a.props.calendarStartDay,monthClassName:a.props.monthClassName,onDayClick:a.handleDayClick,handleOnKeyDown:a.props.handleOnDayKeyDown,onDayMouseEnter:a.handleDayMouseEnter,onMouseLeave:a.handleMonthMouseLeave,onWeekSelect:a.props.onWeekSelect,orderInDisplay:n,formatWeekNumber:a.props.formatWeekNumber,locale:a.props.locale,minDate:a.props.minDate,maxDate:a.props.maxDate,excludeDates:a.props.excludeDates,excludeDateIntervals:a.props.excludeDateIntervals,highlightDates:a.props.highlightDates,selectingDate:a.state.selectingDate,includeDates:a.props.includeDates,includeDateIntervals:a.props.includeDateIntervals,inline:a.props.inline,shouldFocusDayInline:a.props.shouldFocusDayInline,fixedHeight:a.props.fixedHeight,filterDate:a.props.filterDate,preSelection:a.props.preSelection,setPreSelection:a.props.setPreSelection,selected:a.props.selected,selectsStart:a.props.selectsStart,selectsEnd:a.props.selectsEnd,selectsRange:a.props.selectsRange,selectsDisabledDaysInRange:a.props.selectsDisabledDaysInRange,showWeekNumbers:a.props.showWeekNumbers,startDate:a.props.startDate,endDate:a.props.endDate,peekNextMonth:a.props.peekNextMonth,setOpen:a.props.setOpen,shouldCloseOnSelect:a.props.shouldCloseOnSelect,renderDayContents:a.props.renderDayContents,disabledKeyboardNavigation:a.props.disabledKeyboardNavigation,showMonthYearPicker:a.props.showMonthYearPicker,showFullMonthYearPicker:a.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:a.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:a.props.showFourColumnMonthYearPicker,showYearPicker:a.props.showYearPicker,showQuarterYearPicker:a.props.showQuarterYearPicker,isInputFocused:a.props.isInputFocused,containerRef:a.containerRef,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:l})))}return e}})),Mt(Ot(a),\"renderYears\",(function(){if(!a.props.showTimeSelectOnly)return a.props.showYearPicker?he.default.createElement(\"div\",{className:\"react-datepicker__year--container\"},a.renderHeader(),he.default.createElement(Gr,Pt({onDayClick:a.handleDayClick,date:a.state.date},a.props))):void 0})),Mt(Ot(a),\"renderTimeSection\",(function(){if(a.props.showTimeSelect&&(a.state.monthContainer||a.props.showTimeSelectOnly))return he.default.createElement($r,{selected:a.props.selected,openToDate:a.props.openToDate,onChange:a.props.onTimeChange,timeClassName:a.props.timeClassName,format:a.props.timeFormat,includeTimes:a.props.includeTimes,intervals:a.props.timeIntervals,minTime:a.props.minTime,maxTime:a.props.maxTime,excludeTimes:a.props.excludeTimes,filterTime:a.props.filterTime,timeCaption:a.props.timeCaption,todayButton:a.props.todayButton,showMonthDropdown:a.props.showMonthDropdown,showMonthYearDropdown:a.props.showMonthYearDropdown,showYearDropdown:a.props.showYearDropdown,withPortal:a.props.withPortal,monthRef:a.state.monthContainer,injectTimes:a.props.injectTimes,locale:a.props.locale,handleOnKeyDown:a.props.handleOnKeyDown,showTimeSelectOnly:a.props.showTimeSelectOnly})})),Mt(Ot(a),\"renderInputTimeSection\",(function(){var e=new Date(a.props.selected),t=Ht(e)&&Boolean(a.props.selected)?\"\".concat(Yr(e.getHours()),\":\").concat(Yr(e.getMinutes())):\"\";if(a.props.showTimeInput)return he.default.createElement(Jr,{date:e,timeString:t,timeInputLabel:a.props.timeInputLabel,onChange:a.props.onTimeChange,customTimeInput:a.props.customTimeInput})})),Mt(Ot(a),\"renderAriaLiveRegion\",(function(){var e,t=Ir(a.state.date,a.props.yearItemNumber),r=t.startPeriod,n=t.endPeriod;return e=a.props.showYearPicker?\"\".concat(r,\" - \").concat(n):a.props.showMonthYearPicker||a.props.showQuarterYearPicker?qe.default(a.state.date):\"\".concat(dr(Fe.default(a.state.date),a.props.locale),\" \").concat(qe.default(a.state.date)),he.default.createElement(\"span\",{role:\"alert\",\"aria-live\":\"polite\",className:\"react-datepicker__aria-live\"},a.state.isRenderAriaLiveMessage&&e)})),Mt(Ot(a),\"renderChildren\",(function(){if(a.props.children)return he.default.createElement(\"div\",{className:\"react-datepicker__children-container\"},a.props.children)})),a.containerRef=he.default.createRef(),a.state={date:a.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},a}return _t(r,[{key:\"componentDidMount\",value:function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=void e.setState({monthContainer:e.monthContainer}))}},{key:\"componentDidUpdate\",value:function(e){!this.props.preSelection||or(this.props.preSelection,e.preSelection)&&this.props.monthSelectedIn===e.monthSelectedIn?this.props.openToDate&&!or(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate}):this.setState({date:this.props.preSelection})}},{key:\"render\",value:function(){var e=this.props.container||Xr;return he.default.createElement(\"div\",{ref:this.containerRef},he.default.createElement(e,{className:me.default(\"react-datepicker\",this.props.className,{\"react-datepicker--time-only\":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:\"defaultProps\",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:\"Time\",previousYearButtonLabel:\"Previous Year\",nextYearButtonLabel:\"Next Year\",previousMonthButtonLabel:\"Previous Month\",nextMonthButtonLabel:\"Next Month\",customTimeInput:null,yearItemNumber:Kt}}}]),r}(he.default.Component),ta=function(e){Et(r,e);var t=It(r);function r(e){var a;return St(this,r),(a=t.call(this,e)).el=document.createElement(\"div\"),a}return _t(r,[{key:\"componentDidMount\",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement(\"div\"),this.portalRoot.setAttribute(\"id\",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:\"componentWillUnmount\",value:function(){this.portalRoot.removeChild(this.el)}},{key:\"render\",value:function(){return Dt.default.createPortal(this.props.children,this.el)}}]),r}(he.default.Component),ra=function(e){return!e.disabled&&-1!==e.tabIndex},aa=function(e){Et(r,e);var t=It(r);function r(e){var a;return St(this,r),Mt(Ot(a=t.call(this,e)),\"getTabChildren\",(function(){return Array.prototype.slice.call(a.tabLoopRef.current.querySelectorAll(\"[tabindex], a, button, input, select, textarea\"),1,-1).filter(ra)})),Mt(Ot(a),\"handleFocusStart\",(function(e){var t=a.getTabChildren();t&&t.length>1&&t[t.length-1].focus()})),Mt(Ot(a),\"handleFocusEnd\",(function(e){var t=a.getTabChildren();t&&t.length>1&&t[0].focus()})),a.tabLoopRef=he.default.createRef(),a}return _t(r,[{key:\"render\",value:function(){return this.props.enableTabLoop?he.default.createElement(\"div\",{className:\"react-datepicker__tab-loop\",ref:this.tabLoopRef},he.default.createElement(\"div\",{className:\"react-datepicker__tab-loop__start\",tabIndex:\"0\",onFocus:this.handleFocusStart}),this.props.children,he.default.createElement(\"div\",{className:\"react-datepicker__tab-loop__end\",tabIndex:\"0\",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:\"defaultProps\",get:function(){return{enableTabLoop:!0}}}]),r}(he.default.Component),na=function(e){Et(r,e);var t=It(r);function r(){return St(this,r),t.apply(this,arguments)}return _t(r,[{key:\"render\",value:function(){var e,t=this.props,r=t.className,a=t.wrapperClassName,n=t.hidePopper,o=t.popperComponent,s=t.popperModifiers,i=t.popperPlacement,p=t.popperProps,l=t.targetComponent,d=t.enableTabLoop,c=t.popperOnKeyDown,u=t.portalId,f=t.portalHost;if(!n){var h=me.default(\"react-datepicker-popper\",r);e=he.default.createElement(ce.Popper,Pt({modifiers:s,placement:i},p),(function(e){var t=e.ref,r=e.style,a=e.placement,n=e.arrowProps;return he.default.createElement(aa,{enableTabLoop:d},he.default.createElement(\"div\",{ref:t,style:r,className:h,\"data-placement\":a,onKeyDown:c},he.default.cloneElement(o,{arrowProps:n})))}))}this.props.popperContainer&&(e=he.default.createElement(this.props.popperContainer,{},e)),u&&!n&&(e=he.default.createElement(ta,{portalId:u,portalHost:f},e));var m=me.default(\"react-datepicker-wrapper\",a);return he.default.createElement(ce.Manager,{className:\"react-datepicker-manager\"},he.default.createElement(ce.Reference,null,(function(e){var t=e.ref;return he.default.createElement(\"div\",{ref:t,className:m},l)})),e)}}],[{key:\"defaultProps\",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:\"bottom-start\"}}}]),r}(he.default.Component),oa=\"react-datepicker-ignore-onclickoutside\",sa=vt.default(ea);var ia=\"Date input not valid.\",pa=function(e){Et(r,e);var t=It(r);function r(e){var a;return St(this,r),Mt(Ot(a=t.call(this,e)),\"getPreSelection\",(function(){return a.props.openToDate?a.props.openToDate:a.props.selectsEnd&&a.props.startDate?a.props.startDate:a.props.selectsStart&&a.props.endDate?a.props.endDate:Bt()})),Mt(Ot(a),\"calcInitialState\",(function(){var e,t=a.getPreSelection(),r=Er(a.props),n=Nr(a.props),o=r&&ut.default(t,Xe.default(r))?r:n&&ct.default(t,at.default(n))?n:t;return{open:a.props.startOpen||!1,preventFocus:!1,preSelection:null!==(e=a.props.selectsRange?a.props.startDate:a.props.selected)&&void 0!==e?e:o,highlightDates:xr(a.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}})),Mt(Ot(a),\"clearPreventFocusTimeout\",(function(){a.preventFocusTimeout&&clearTimeout(a.preventFocusTimeout)})),Mt(Ot(a),\"setFocus\",(function(){a.input&&a.input.focus&&a.input.focus({preventScroll:!0})})),Mt(Ot(a),\"setBlur\",(function(){a.input&&a.input.blur&&a.input.blur(),a.cancelFocusInput()})),Mt(Ot(a),\"setOpen\",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];a.setState({open:e,preSelection:e&&a.state.open?a.state.preSelection:a.calcInitialState().preSelection,lastPreSelectChange:da},(function(){e||a.setState((function(e){return{focused:!!t&&e.focused}}),(function(){!t&&a.setBlur(),a.setState({inputValue:null})}))}))})),Mt(Ot(a),\"inputOk\",(function(){return ye.default(a.state.preSelection)})),Mt(Ot(a),\"isCalendarOpen\",(function(){return void 0===a.props.open?a.state.open&&!a.props.disabled&&!a.props.readOnly:a.props.open})),Mt(Ot(a),\"handleFocus\",(function(e){a.state.preventFocus||(a.props.onFocus(e),a.props.preventOpenOnFocus||a.props.readOnly||a.setOpen(!0)),a.setState({focused:!0})})),Mt(Ot(a),\"cancelFocusInput\",(function(){clearTimeout(a.inputFocusTimeout),a.inputFocusTimeout=null})),Mt(Ot(a),\"deferFocusInput\",(function(){a.cancelFocusInput(),a.inputFocusTimeout=setTimeout((function(){return a.setFocus()}),1)})),Mt(Ot(a),\"handleDropdownFocus\",(function(){a.cancelFocusInput()})),Mt(Ot(a),\"handleBlur\",(function(e){(!a.state.open||a.props.withPortal||a.props.showTimeInput)&&a.props.onBlur(e),a.setState({focused:!1})})),Mt(Ot(a),\"handleCalendarClickOutside\",(function(e){a.props.inline||a.setOpen(!1),a.props.onClickOutside(e),a.props.withPortal&&e.preventDefault()})),Mt(Ot(a),\"handleChange\",(function(){for(var e=arguments.length,t=new Array(e),r=0;rK;K++)J[K]=K+1;J[15]=0;var oa=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,pa=Object.prototype.hasOwnProperty,qa={},ra={};\nfunction sa(a){if(pa.call(ra,a))return!0;if(pa.call(qa,a))return!1;if(oa.test(a))return ra[a]=!0;qa[a]=!0;return!1}function ta(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case \"function\":case \"symbol\":return!0;case \"boolean\":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return\"data-\"!==a&&\"aria-\"!==a;default:return!1}}\nfunction ua(a,b,c,d){if(null===b||\"undefined\"===typeof b||ta(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function M(a,b,c,d,f,h,t){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=h;this.removeEmptyString=t}var N={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){N[a]=new M(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];N[b]=new M(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){N[a]=new M(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){N[a]=new M(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){N[a]=new M(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){N[a]=new M(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){N[a]=new M(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){N[a]=new M(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){N[a]=new M(a,5,!1,a.toLowerCase(),null,!1,!1)});var va=/[\\-:]([a-z])/g;function wa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(va,\nwa);N[b]=new M(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!1,!1)});\nN.xlinkHref=new M(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!0,!0)});var xa=/[\"'&<>]/;\nfunction O(a){if(\"boolean\"===typeof a||\"number\"===typeof a)return\"\"+a;a=\"\"+a;var b=xa.exec(a);if(b){var c=\"\",d,f=0;for(d=b.index;dV))throw Error(p(301));if(a===P)if(T=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Ja(){}\nvar X=null,Ka={readContext:function(a){var b=X.threadID;I(a,b);return a[b]},useContext:function(a){W();var b=X.threadID;I(a,b);return a[b]},useMemo:Ia,useReducer:Ga,useRef:function(a){P=W();R=Ca();var b=R.memoizedState;return null===b?(a={current:a},R.memoizedState=a):b},useState:function(a){return Ga(Fa,a)},useLayoutEffect:function(){},useCallback:function(a,b){return Ia(function(){return a},b)},useImperativeHandle:Ja,useEffect:Ja,useDebugValue:Ja,useDeferredValue:function(a){W();return a},useTransition:function(){W();\nreturn[function(a){a()},!1]},useOpaqueIdentifier:function(){return(X.identifierPrefix||\"\")+\"R:\"+(X.uniqueID++).toString(36)},useMutableSource:function(a,b){W();return b(a._source)}},La={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};function Ma(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}\nvar Na={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Oa=l({menuitem:!0},Na),Y={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,\ngridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pa=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(Y).forEach(function(a){Pa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a]})});\nvar Qa=/([A-Z])/g,Ra=/^ms-/,Z=m.Children.toArray,Sa=la.ReactCurrentDispatcher,Ta={listing:!0,pre:!0,textarea:!0},Ua=/^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/,Va={},Wa={};function Xa(a){if(void 0===a||null===a)return a;var b=\"\";m.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Ya=Object.prototype.hasOwnProperty,Za={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function $a(a,b){if(void 0===a)throw Error(p(152,F(b)||\"Component\"));}\nfunction ab(a,b,c){function d(d,h){var e=h.prototype&&h.prototype.isReactComponent,f=na(h,b,c,e),t=[],g=!1,n={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===t)return null},enqueueReplaceState:function(a,c){g=!0;t=[c]},enqueueSetState:function(a,c){if(null===t)return null;t.push(c)}};if(e){if(e=new h(d.props,f,n),\"function\"===typeof h.getDerivedStateFromProps){var k=h.getDerivedStateFromProps.call(null,d.props,e.state);null!=k&&(e.state=l({},e.state,k))}}else if(P={},e=h(d.props,\nf,n),e=Da(h,d.props,e,f),null==e||null==e.render){a=e;$a(a,h);return}e.props=d.props;e.context=f;e.updater=n;n=e.state;void 0===n&&(e.state=n=null);if(\"function\"===typeof e.UNSAFE_componentWillMount||\"function\"===typeof e.componentWillMount)if(\"function\"===typeof e.componentWillMount&&\"function\"!==typeof h.getDerivedStateFromProps&&e.componentWillMount(),\"function\"===typeof e.UNSAFE_componentWillMount&&\"function\"!==typeof h.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),t.length){n=t;var v=\ng;t=null;g=!1;if(v&&1===n.length)e.state=n[0];else{k=v?n[0]:e.state;var H=!0;for(v=v?1:0;v=g))throw Error(p(304));var e=new Uint16Array(g);e.set(d);J=e;J[0]=c+1;for(d=c;d=e.children.length){var L=e.footer;\"\"!==L&&(this.previousWasTextNode=!1);this.stack.pop();if(\"select\"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===B)this.popProvider(e.type);else if(e.type===D){this.suspenseDepth--;var G=h.pop();if(t){t=!1;var C=e.fallbackFrame;if(!C)throw Error(p(303));this.stack.push(C);h[this.suspenseDepth]+=\"\\x3c!--$!--\\x3e\";continue}else h[this.suspenseDepth]+=\nG}h[this.suspenseDepth]+=L}else{var n=e.children[e.childIndex++],k=\"\";try{k+=this.render(n,e.context,e.domNamespace)}catch(v){if(null!=v&&\"function\"===typeof v.then)throw Error(p(294));throw v;}finally{}h.length<=this.suspenseDepth&&h.push(\"\");h[this.suspenseDepth]+=k}}return h[0]}finally{Sa.current=c,X=b,Ea()}};b.render=function(a,b,f){if(\"string\"===typeof a||\"number\"===typeof a){f=\"\"+a;if(\"\"===f)return\"\";if(this.makeStaticMarkup)return O(f);if(this.previousWasTextNode)return\"\\x3c!-- --\\x3e\"+O(f);\nthis.previousWasTextNode=!0;return O(f)}b=ab(a,b,this.threadID);a=b.child;b=b.context;if(null===a||!1===a)return\"\";if(!m.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===q)throw Error(p(257));throw Error(p(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:\"\"});return\"\"}var c=a.type;if(\"string\"===typeof c)return this.renderDOM(a,b,f);switch(c){case ka:case ja:case u:case z:case ca:case r:return a=Z(a.props.children),this.stack.push({type:null,\ndomNamespace:f,children:a,childIndex:0,context:b,footer:\"\"}),\"\";case D:throw Error(p(294));case ia:throw Error(p(343));}if(\"object\"===typeof c&&null!==c)switch(c.$$typeof){case ba:P={};var d=c.render(a.props,a.ref);d=Da(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:\"\"});return\"\";case da:return a=[m.createElement(c.type,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:\"\"}),\n\"\";case B:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:\"\"},this.pushProvider(a),this.stack.push(f),\"\";case aa:c=a.type;d=a.props;var g=this.threadID;I(c,g);c=Z(d.children(c[g]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:\"\"});return\"\";case ha:throw Error(p(338));case ea:return c=a.type,d=c._init,c=d(c._payload),a=[m.createElement(c,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,\ncontext:b,footer:\"\"}),\"\"}throw Error(p(130,null==c?c:typeof c,\"\"));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();f===La.html&&Ma(c);if(!Va.hasOwnProperty(c)){if(!Ua.test(c))throw Error(p(65,c));Va[c]=!0}var d=a.props;if(\"input\"===c)d=l({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if(\"textarea\"===c){var g=d.value;if(null==g){g=d.defaultValue;var e=d.children;if(null!=e){if(null!=\ng)throw Error(p(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(p(93));e=e[0]}g=\"\"+e}null==g&&(g=\"\")}d=l({},d,{value:void 0,children:\"\"+g})}else if(\"select\"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=l({},d,{value:void 0});else if(\"option\"===c){e=this.currentSelectValue;var L=Xa(d.children);if(null!=e){var G=null!=d.value?d.value+\"\":L;g=!1;if(Array.isArray(e))for(var C=0;C\":(w+=\">\",g=\"\");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,\"string\"===typeof e||\"number\"===typeof e){e=O(e);break a}e=null}null!=e?(d=[],Ta.hasOwnProperty(c)&&\"\\n\"===e.charAt(0)&&(w+=\"\\n\"),w+=e):d=Z(d.children);a=a.type;f=null==f||\"http://www.w3.org/1999/xhtml\"===f?Ma(a):\"http://www.w3.org/2000/svg\"===\nf&&\"foreignObject\"===a?\"http://www.w3.org/1999/xhtml\":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:g});this.previousWasTextNode=!1;return w};return a}();exports.renderToNodeStream=function(){throw Error(p(207));};exports.renderToStaticMarkup=function(a,b){a=new bb(a,!0,b);try{return a.read(Infinity)}finally{a.destroy()}};exports.renderToStaticNodeStream=function(){throw Error(p(208));};exports.renderToString=function(a,b){a=new bb(a,!1,b);try{return a.read(Infinity)}finally{a.destroy()}};\nexports.version=\"17.0.2\";\n","/** @license React v17.0.2\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),m=require(\"object-assign\"),r=require(\"scheduler\");function y(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(oa,\npa);D[b]=new B(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});\nD.xlinkHref=new B(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2h||e[g]!==f[h])return\"\\n\"+e[g].replace(\" at new \",\" at \");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Na(a):\"\"}\nfunction Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na(\"Lazy\");case 13:return Na(\"Suspense\");case 19:return Na(\"SuspenseList\");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return\"\"}}\nfunction Ra(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ua:return\"Fragment\";case ta:return\"Portal\";case xa:return\"Profiler\";case wa:return\"StrictMode\";case Ba:return\"Suspense\";case Ca:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case za:return(a.displayName||\"Context\")+\".Consumer\";case ya:return(a._context.displayName||\"Context\")+\".Provider\";case Aa:var b=a.render;b=b.displayName||b.name||\"\";\nreturn a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\"ForwardRef\");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,\"checked\",b,!1)}\nfunction ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?bb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction cb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction bb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function db(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:Sa(c)}}\nfunction ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var kb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction lb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function mb(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?lb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar nb,ob=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||\"innerHTML\"in a)a.innerHTML=b;else{nb=nb||document.createElement(\"div\");nb.innerHTML=\"\"+b.valueOf().toString()+\"\";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(\"\"+b).trim():b+\"px\"}\nfunction tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=sb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(y(62));}}\nfunction wb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;ad?0:1<c;c++)b.push(a);return b}\nfunction $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}\nfunction hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Pe=fa&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;\nfunction Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}\nfunction If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||\"Unknown\",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}\nvar Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};\nfunction eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}\nfunction jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;az?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===\nn.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;zz?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&\nu.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);\nd=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=\nWg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||\"Component\"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);\nfunction dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);\nfunction ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;\nfunction mh(a,b){var c=nh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}\nfunction rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(\"/$\"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else\"$\"!==c&&\"$!\"!==c&&\"$?\"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}\nfunction sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;af))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}\nfunction Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return\"function\"===typeof b?b(a):b}\nfunction Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,\neagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}\nfunction Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=\ne.entanglements,h=a;0c?98:c,function(){a(!0)});gg(97\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case \"dialog\":G(\"cancel\",a);G(\"close\",a);\ne=d;break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eJi&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=\n64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&\"unstable-defer-without-hiding\"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}\nfunction Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}\nfunction Mi(a,b){try{var c=\"\",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e=\"\\nError generating stack: \"+f.message+\"\\n\"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi=\"function\"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}\nfunction Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}var Ui=\"function\"===typeof WeakSet?WeakSet:Set;\nfunction Vi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}\nfunction Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,\nb.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));\nreturn;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}\nfunction aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,\"function\"===typeof d.setProperty?d.setProperty(\"display\",\"none\",\"important\"):d.display=\"none\";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null;d.style.display=sb(\"display\",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?\"\":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===\na)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}\nfunction bj(a,b){if(Mf&&\"function\"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if(\"function\"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,\nf)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,\"\"),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===\nc.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}\nfunction gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}\nfunction hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}\nfunction cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,\n8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}\nfunction ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;ee&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>\nc?4320:1960*nj(c/1960))-c;if(10 component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==V&&(V=2);k=Mi(k,h);p=\ng;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&(\"function\"===typeof K.getDerivedStateFromError||null!==Q&&\"function\"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}\nfunction Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}\nfunction Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});\"function\"===typeof t.focus&&t.focus();for(t=\n0;tO()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;\nck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==\nb?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if(\"object\"===\ntypeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);\na=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));\nd=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n//\n// Define \n//\nvar Draggable = /*#__PURE__*/function (_React$Component) {\n _inherits(Draggable, _React$Component);\n\n var _super = _createSuper(Draggable);\n\n _createClass(Draggable, null, [{\n key: \"getDerivedStateFromProps\",\n // React 16.3+\n // Arity (props, state)\n value: function getDerivedStateFromProps(_ref, _ref2) {\n var position = _ref.position;\n var prevPropsPosition = _ref2.prevPropsPosition;\n\n // Set x/y if a new position is provided in props that is different than the previous.\n if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {\n (0, _log.default)('Draggable: getDerivedStateFromProps %j', {\n position: position,\n prevPropsPosition: prevPropsPosition\n });\n return {\n x: position.x,\n y: position.y,\n prevPropsPosition: _objectSpread({}, position)\n };\n }\n\n return null;\n }\n }]);\n\n function Draggable(props\n /*: DraggableProps*/\n ) {\n var _this;\n\n _classCallCheck(this, Draggable);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragStart\", function (e, coreData) {\n (0, _log.default)('Draggable: onDragStart: %j', coreData); // Short-circuit if user's callback killed it.\n\n var shouldStart = _this.props.onStart(e, (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData)); // Kills start event on core as well, so move handlers are never bound.\n\n\n if (shouldStart === false) return false;\n\n _this.setState({\n dragging: true,\n dragged: true\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDrag\", function (e, coreData) {\n if (!_this.state.dragging) return false;\n (0, _log.default)('Draggable: onDrag: %j', coreData);\n var uiData = (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData);\n var newState\n /*: $Shape*/\n = {\n x: uiData.x,\n y: uiData.y\n }; // Keep within bounds.\n\n if (_this.props.bounds) {\n // Save original x and y.\n var x = newState.x,\n y = newState.y; // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n\n newState.x += _this.state.slackX;\n newState.y += _this.state.slackY; // Get bound position. This will ceil/floor the x and y within the boundaries.\n\n var _getBoundPosition = (0, _positionFns.getBoundPosition)(_assertThisInitialized(_this), newState.x, newState.y),\n _getBoundPosition2 = _slicedToArray(_getBoundPosition, 2),\n newStateX = _getBoundPosition2[0],\n newStateY = _getBoundPosition2[1];\n\n newState.x = newStateX;\n newState.y = newStateY; // Recalculate slack by noting how much was shaved by the boundPosition handler.\n\n newState.slackX = _this.state.slackX + (x - newState.x);\n newState.slackY = _this.state.slackY + (y - newState.y); // Update the event we fire to reflect what really happened after bounds took effect.\n\n uiData.x = newState.x;\n uiData.y = newState.y;\n uiData.deltaX = newState.x - _this.state.x;\n uiData.deltaY = newState.y - _this.state.y;\n } // Short-circuit if user's callback killed it.\n\n\n var shouldUpdate = _this.props.onDrag(e, uiData);\n\n if (shouldUpdate === false) return false;\n\n _this.setState(newState);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragStop\", function (e, coreData) {\n if (!_this.state.dragging) return false; // Short-circuit if user's callback killed it.\n\n var shouldContinue = _this.props.onStop(e, (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData));\n\n if (shouldContinue === false) return false;\n (0, _log.default)('Draggable: onDragStop: %j', coreData);\n var newState\n /*: $Shape*/\n = {\n dragging: false,\n slackX: 0,\n slackY: 0\n }; // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n\n var controlled = Boolean(_this.props.position);\n\n if (controlled) {\n var _this$props$position = _this.props.position,\n x = _this$props$position.x,\n y = _this$props$position.y;\n newState.x = x;\n newState.y = y;\n }\n\n _this.setState(newState);\n });\n\n _this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n // Whether or not we have been dragged before.\n dragged: false,\n // Current transform x and y.\n x: props.position ? props.position.x : props.defaultPosition.x,\n y: props.position ? props.position.y : props.defaultPosition.y,\n prevPropsPosition: _objectSpread({}, props.position),\n // Used for compensating for out-of-bounds drags\n slackX: 0,\n slackY: 0,\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n if (props.position && !(props.onDrag || props.onStop)) {\n // eslint-disable-next-line no-console\n console.warn('A `position` was applied to this , without drag handlers. This will make this ' + 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' + '`position` of this element.');\n }\n\n return _this;\n }\n\n _createClass(Draggable, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) {\n this.setState({\n isElementSVG: true\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.setState({\n dragging: false\n }); // prevents invariant if unmounted while dragging\n } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find\n // the underlying DOM node ourselves. See the README for more information.\n\n }, {\n key: \"findDOMNode\",\n value: function findDOMNode()\n /*: ?HTMLElement*/\n {\n return this.props.nodeRef ? this.props.nodeRef.current : _reactDom.default.findDOMNode(this);\n }\n }, {\n key: \"render\",\n value: function render()\n /*: ReactElement*/\n {\n var _classNames;\n\n var _this$props = this.props,\n axis = _this$props.axis,\n bounds = _this$props.bounds,\n children = _this$props.children,\n defaultPosition = _this$props.defaultPosition,\n defaultClassName = _this$props.defaultClassName,\n defaultClassNameDragging = _this$props.defaultClassNameDragging,\n defaultClassNameDragged = _this$props.defaultClassNameDragged,\n position = _this$props.position,\n positionOffset = _this$props.positionOffset,\n scale = _this$props.scale,\n draggableCoreProps = _objectWithoutProperties(_this$props, [\"axis\", \"bounds\", \"children\", \"defaultPosition\", \"defaultClassName\", \"defaultClassNameDragging\", \"defaultClassNameDragged\", \"position\", \"positionOffset\", \"scale\"]);\n\n var style = {};\n var svgTransform = null; // If this is controlled, we don't want to move it - unless it's dragging.\n\n var controlled = Boolean(position);\n var draggable = !controlled || this.state.dragging;\n var validPosition = position || defaultPosition;\n var transformOpts = {\n // Set left if horizontal drag is enabled\n x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x,\n // Set top if vertical drag is enabled\n y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y\n }; // If this element was SVG, we use the `transform` attribute.\n\n if (this.state.isElementSVG) {\n svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset);\n } else {\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset);\n } // Mark with class while dragging\n\n\n var className = (0, _classnames.default)(children.props.className || '', defaultClassName, (_classNames = {}, _defineProperty(_classNames, defaultClassNameDragging, this.state.dragging), _defineProperty(_classNames, defaultClassNameDragged, this.state.dragged), _classNames)); // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n\n return /*#__PURE__*/React.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, {\n onStart: this.onDragStart,\n onDrag: this.onDrag,\n onStop: this.onDragStop\n }), React.cloneElement(React.Children.only(children), {\n className: className,\n style: _objectSpread(_objectSpread({}, children.props.style), style),\n transform: svgTransform\n }));\n }\n }]);\n\n return Draggable;\n}(React.Component);\n\nexports.default = Draggable;\n\n_defineProperty(Draggable, \"displayName\", 'Draggable');\n\n_defineProperty(Draggable, \"propTypes\", _objectSpread(_objectSpread({}, _DraggableCore.default.propTypes), {}, {\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: _propTypes.default.oneOfType([_propTypes.default.shape({\n left: _propTypes.default.number,\n right: _propTypes.default.number,\n top: _propTypes.default.number,\n bottom: _propTypes.default.number\n }), _propTypes.default.string, _propTypes.default.oneOf([false])]),\n defaultClassName: _propTypes.default.string,\n defaultClassNameDragging: _propTypes.default.string,\n defaultClassNameDragged: _propTypes.default.string,\n\n /**\n * `defaultPosition` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n defaultPosition: _propTypes.default.shape({\n x: _propTypes.default.number,\n y: _propTypes.default.number\n }),\n positionOffset: _propTypes.default.shape({\n x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n position: _propTypes.default.shape({\n x: _propTypes.default.number,\n y: _propTypes.default.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: _shims.dontSetMe,\n style: _shims.dontSetMe,\n transform: _shims.dontSetMe\n}));\n\n_defineProperty(Draggable, \"defaultProps\", _objectSpread(_objectSpread({}, _DraggableCore.default.defaultProps), {}, {\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {\n x: 0,\n y: 0\n },\n position: null,\n scale: 1\n}));","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _domFns = require(\"./utils/domFns\");\n\nvar _positionFns = require(\"./utils/positionFns\");\n\nvar _shims = require(\"./utils/shims\");\n\nvar _log = _interopRequireDefault(require(\"./utils/log\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Simple abstraction for dragging events names.\nvar eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n}; // Default to mouse events.\n\nvar dragEventFor = eventsFor.mouse;\n/*:: type DraggableCoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: ?number\n};*/\n\n/*:: export type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};*/\n\n/*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void;*/\n\n/*:: export type ControlPosition = {x: number, y: number};*/\n\n/*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/\n\n/*:: export type DraggableCoreProps = {\n allowAnyClick: boolean,\n cancel: string,\n children: ReactElement,\n disabled: boolean,\n enableUserSelectHack: boolean,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n nodeRef?: ?React.ElementRef,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n scale: number,\n};*/\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\nvar DraggableCore = /*#__PURE__*/function (_React$Component) {\n _inherits(DraggableCore, _React$Component);\n\n var _super = _createSuper(DraggableCore);\n\n function DraggableCore() {\n var _this;\n\n _classCallCheck(this, DraggableCore);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN,\n lastY: NaN,\n touchIdentifier: null\n });\n\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"handleDragStart\", function (e) {\n // Make it possible to attach event handlers on top of this one.\n _this.props.onMouseDown(e); // Only accept left-clicks.\n\n\n if (!_this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false; // Get nodes. Be sure to grab relative document (could be iframed)\n\n var thisNode = _this.findDOMNode();\n\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error(' not mounted on DragStart!');\n }\n\n var ownerDocument = thisNode.ownerDocument; // Short circuit if handle or cancel prop was provided and selector doesn't match.\n\n if (_this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || _this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.handle, thisNode) || _this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.cancel, thisNode)) {\n return;\n } // Prevent scrolling on mobile devices, like ipad/iphone.\n // Important that this is after handle/cancel.\n\n\n if (e.type === 'touchstart') e.preventDefault(); // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n\n var touchIdentifier = (0, _domFns.getTouchIdentifier)(e);\n\n _this.setState({\n touchIdentifier: touchIdentifier\n }); // Get the current drag point from the event. This is used as the offset.\n\n\n var position = (0, _positionFns.getControlPosition)(e, touchIdentifier, _assertThisInitialized(_this));\n if (position == null) return; // not possible but satisfies flow\n\n var x = position.x,\n y = position.y; // Create an event object with all the data parents need to make a decision here.\n\n var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y);\n (0, _log.default)('DraggableCore: handleDragStart: %j', coreEvent); // Call event handler. If it returns explicit false, cancel.\n\n (0, _log.default)('calling', _this.props.onStart);\n\n var shouldUpdate = _this.props.onStart(e, coreEvent);\n\n if (shouldUpdate === false || _this.mounted === false) return; // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n\n if (_this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument); // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n\n _this.setState({\n dragging: true,\n lastX: x,\n lastY: y\n }); // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n\n\n (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, _this.handleDrag);\n (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, _this.handleDragStop);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleDrag\", function (e) {\n // Get the current drag point from the event. This is used as the offset.\n var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this));\n if (position == null) return;\n var x = position.x,\n y = position.y; // Snap to grid if prop has been provided\n\n if (Array.isArray(_this.props.grid)) {\n var deltaX = x - _this.state.lastX,\n deltaY = y - _this.state.lastY;\n\n var _snapToGrid = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY);\n\n var _snapToGrid2 = _slicedToArray(_snapToGrid, 2);\n\n deltaX = _snapToGrid2[0];\n deltaY = _snapToGrid2[1];\n if (!deltaX && !deltaY) return; // skip useless drag\n\n x = _this.state.lastX + deltaX, y = _this.state.lastY + deltaY;\n }\n\n var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y);\n (0, _log.default)('DraggableCore: handleDrag: %j', coreEvent); // Call event handler. If it returns explicit false, trigger end.\n\n var shouldUpdate = _this.props.onDrag(e, coreEvent);\n\n if (shouldUpdate === false || _this.mounted === false) {\n try {\n // $FlowIgnore\n _this.handleDragStop(new MouseEvent('mouseup'));\n } catch (err) {\n // Old browsers\n var event = ((document.createEvent('MouseEvents')\n /*: any*/\n )\n /*: MouseTouchEvent*/\n ); // I see why this insanity was deprecated\n // $FlowIgnore\n\n event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n\n _this.handleDragStop(event);\n }\n\n return;\n }\n\n _this.setState({\n lastX: x,\n lastY: y\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleDragStop\", function (e) {\n if (!_this.state.dragging) return;\n var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this));\n if (position == null) return;\n var x = position.x,\n y = position.y;\n var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y); // Call event handler\n\n var shouldContinue = _this.props.onStop(e, coreEvent);\n\n if (shouldContinue === false || _this.mounted === false) return false;\n\n var thisNode = _this.findDOMNode();\n\n if (thisNode) {\n // Remove user-select hack\n if (_this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument);\n }\n\n (0, _log.default)('DraggableCore: handleDragStop: %j', coreEvent); // Reset the el.\n\n _this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\n });\n\n if (thisNode) {\n // Remove event handlers\n (0, _log.default)('DraggableCore: Removing handlers');\n (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, _this.handleDrag);\n (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, _this.handleDragStop);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onMouseDown\", function (e) {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return _this.handleDragStart(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onMouseUp\", function (e) {\n dragEventFor = eventsFor.mouse;\n return _this.handleDragStop(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onTouchStart\", function (e) {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n return _this.handleDragStart(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onTouchEnd\", function (e) {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n return _this.handleDragStop(e);\n });\n\n return _this;\n }\n\n _createClass(DraggableCore, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.mounted = true; // Touch handlers must be added with {passive: false} to be cancelable.\n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n\n var thisNode = this.findDOMNode();\n\n if (thisNode) {\n (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {\n passive: false\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.mounted = false; // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n\n var thisNode = this.findDOMNode();\n\n if (thisNode) {\n var ownerDocument = thisNode.ownerDocument;\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {\n passive: false\n });\n if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(ownerDocument);\n }\n } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find\n // the underlying DOM node ourselves. See the README for more information.\n\n }, {\n key: \"findDOMNode\",\n value: function findDOMNode()\n /*: ?HTMLElement*/\n {\n return this.props.nodeRef ? this.props.nodeRef.current : _reactDom.default.findDOMNode(this);\n }\n }, {\n key: \"render\",\n value: function render() {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onMouseUp: this.onMouseUp,\n // onTouchStart is added on `componentDidMount` so they can be added with\n // {passive: false}, which allows it to cancel. See \n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n onTouchEnd: this.onTouchEnd\n });\n }\n }]);\n\n return DraggableCore;\n}(React.Component);\n\nexports.default = DraggableCore;\n\n_defineProperty(DraggableCore, \"displayName\", 'DraggableCore');\n\n_defineProperty(DraggableCore, \"propTypes\", {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: _propTypes.default.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: _propTypes.default.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: _propTypes.default.bool,\n\n /**\n * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n * instead of using the parent node.\n */\n offsetParent: function offsetParent(props\n /*: DraggableCoreProps*/\n , propName\n /*: $Keys*/\n ) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: _propTypes.default.arrayOf(_propTypes.default.number),\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
\n *
Click me to drag
\n *
This is some other content
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n handle: _propTypes.default.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * \n *
\n *
You can't drag from here
\n *
Dragging here works fine
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n cancel: _propTypes.default.string,\n\n /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.\n * Unfortunately, in order for to work properly, we need raw access\n * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`\n * as in this example:\n *\n * function MyComponent() {\n * const nodeRef = React.useRef(null);\n * return (\n * \n *
Example Target
\n *
\n * );\n * }\n *\n * This can be used for arbitrarily nested components, so long as the ref ends up\n * pointing to the actual child DOM node and not a custom component.\n */\n nodeRef: _propTypes.default.object,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: _propTypes.default.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: _propTypes.default.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: _propTypes.default.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (as there is internal use of onMouseDown)\n */\n onMouseDown: _propTypes.default.func,\n\n /**\n * `scale`, if set, applies scaling while dragging an element\n */\n scale: _propTypes.default.number,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: _shims.dontSetMe,\n style: _shims.dontSetMe,\n transform: _shims.dontSetMe\n});\n\n_defineProperty(DraggableCore, \"defaultProps\", {\n allowAnyClick: false,\n // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n offsetParent: null,\n handle: null,\n grid: null,\n transform: null,\n onStart: function onStart() {},\n onDrag: function onDrag() {},\n onStop: function onStop() {},\n onMouseDown: function onMouseDown() {},\n scale: 1\n});","\"use strict\";\n\nvar _require = require('./Draggable'),\n Draggable = _require.default,\n DraggableCore = _require.DraggableCore; // Previous versions of this lib exported as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\n\n\nmodule.exports = Draggable;\nmodule.exports.default = Draggable;\nmodule.exports.DraggableCore = DraggableCore;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.matchesSelector = matchesSelector;\nexports.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;\nexports.addEvent = addEvent;\nexports.removeEvent = removeEvent;\nexports.outerHeight = outerHeight;\nexports.outerWidth = outerWidth;\nexports.innerHeight = innerHeight;\nexports.innerWidth = innerWidth;\nexports.offsetXYFromParent = offsetXYFromParent;\nexports.createCSSTransform = createCSSTransform;\nexports.createSVGTransform = createSVGTransform;\nexports.getTranslation = getTranslation;\nexports.getTouch = getTouch;\nexports.getTouchIdentifier = getTouchIdentifier;\nexports.addUserSelectStyles = addUserSelectStyles;\nexports.removeUserSelectStyles = removeUserSelectStyles;\nexports.addClassName = addClassName;\nexports.removeClassName = removeClassName;\n\nvar _shims = require(\"./shims\");\n\nvar _getPrefix = _interopRequireWildcard(require(\"./getPrefix\"));\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar matchesSelectorFunc = '';\n\nfunction matchesSelector(el\n/*: Node*/\n, selector\n/*: string*/\n)\n/*: boolean*/\n{\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = (0, _shims.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) {\n // $FlowIgnore: Doesn't think elements are indexable\n return (0, _shims.isFunction)(el[method]);\n });\n } // Might not be found entirely (not an Element?) - in that case, bail\n // $FlowIgnore: Doesn't think elements are indexable\n\n\n if (!(0, _shims.isFunction)(el[matchesSelectorFunc])) return false; // $FlowIgnore: Doesn't think elements are indexable\n\n return el[matchesSelectorFunc](selector);\n} // Works up the tree to the draggable itself attempting to match selector.\n\n\nfunction matchesSelectorAndParentsTo(el\n/*: Node*/\n, selector\n/*: string*/\n, baseNode\n/*: Node*/\n)\n/*: boolean*/\n{\n var node = el;\n\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n node = node.parentNode;\n } while (node);\n\n return false;\n}\n\nfunction addEvent(el\n/*: ?Node*/\n, event\n/*: string*/\n, handler\n/*: Function*/\n, inputOptions\n/*: Object*/\n)\n/*: void*/\n{\n if (!el) return;\n\n var options = _objectSpread({\n capture: true\n }, inputOptions);\n\n if (el.addEventListener) {\n el.addEventListener(event, handler, options);\n } else if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nfunction removeEvent(el\n/*: ?Node*/\n, event\n/*: string*/\n, handler\n/*: Function*/\n, inputOptions\n/*: Object*/\n)\n/*: void*/\n{\n if (!el) return;\n\n var options = _objectSpread({\n capture: true\n }, inputOptions);\n\n if (el.removeEventListener) {\n el.removeEventListener(event, handler, options);\n } else if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nfunction outerHeight(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n var height = node.clientHeight;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height += (0, _shims.int)(computedStyle.borderTopWidth);\n height += (0, _shims.int)(computedStyle.borderBottomWidth);\n return height;\n}\n\nfunction outerWidth(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n var width = node.clientWidth;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width += (0, _shims.int)(computedStyle.borderLeftWidth);\n width += (0, _shims.int)(computedStyle.borderRightWidth);\n return width;\n}\n\nfunction innerHeight(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n var height = node.clientHeight;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= (0, _shims.int)(computedStyle.paddingTop);\n height -= (0, _shims.int)(computedStyle.paddingBottom);\n return height;\n}\n\nfunction innerWidth(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n var width = node.clientWidth;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= (0, _shims.int)(computedStyle.paddingLeft);\n width -= (0, _shims.int)(computedStyle.paddingRight);\n return width;\n} // Get from offsetParent\n\n\nfunction offsetXYFromParent(evt\n/*: {clientX: number, clientY: number}*/\n, offsetParent\n/*: HTMLElement*/\n, scale\n/*: number*/\n)\n/*: ControlPosition*/\n{\n var isBody = offsetParent === offsetParent.ownerDocument.body;\n var offsetParentRect = isBody ? {\n left: 0,\n top: 0\n } : offsetParent.getBoundingClientRect();\n var x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;\n var y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;\n return {\n x: x,\n y: y\n };\n}\n\nfunction createCSSTransform(controlPos\n/*: ControlPosition*/\n, positionOffset\n/*: PositionOffsetControlPosition*/\n)\n/*: Object*/\n{\n var translation = getTranslation(controlPos, positionOffset, 'px');\n return _defineProperty({}, (0, _getPrefix.browserPrefixToKey)('transform', _getPrefix.default), translation);\n}\n\nfunction createSVGTransform(controlPos\n/*: ControlPosition*/\n, positionOffset\n/*: PositionOffsetControlPosition*/\n)\n/*: string*/\n{\n var translation = getTranslation(controlPos, positionOffset, '');\n return translation;\n}\n\nfunction getTranslation(_ref2, positionOffset\n/*: PositionOffsetControlPosition*/\n, unitSuffix\n/*: string*/\n)\n/*: string*/\n{\n var x = _ref2.x,\n y = _ref2.y;\n var translation = \"translate(\".concat(x).concat(unitSuffix, \",\").concat(y).concat(unitSuffix, \")\");\n\n if (positionOffset) {\n var defaultX = \"\".concat(typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix);\n var defaultY = \"\".concat(typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix);\n translation = \"translate(\".concat(defaultX, \", \").concat(defaultY, \")\") + translation;\n }\n\n return translation;\n}\n\nfunction getTouch(e\n/*: MouseTouchEvent*/\n, identifier\n/*: number*/\n)\n/*: ?{clientX: number, clientY: number}*/\n{\n return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, function (t) {\n return identifier === t.identifier;\n }) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, function (t) {\n return identifier === t.identifier;\n });\n}\n\nfunction getTouchIdentifier(e\n/*: MouseTouchEvent*/\n)\n/*: ?number*/\n{\n if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n} // User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n// Note we're passing `document` b/c we could be iframed\n\n\nfunction addUserSelectStyles(doc\n/*: ?Document*/\n) {\n if (!doc) return;\n var styleEl = doc.getElementById('react-draggable-style-el');\n\n if (!styleEl) {\n styleEl = doc.createElement('style');\n styleEl.type = 'text/css';\n styleEl.id = 'react-draggable-style-el';\n styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\n\nfunction removeUserSelectStyles(doc\n/*: ?Document*/\n) {\n if (!doc) return;\n\n try {\n if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection'); // $FlowIgnore: IE\n\n if (doc.selection) {\n // $FlowIgnore: IE\n doc.selection.empty();\n } else {\n // Remove selection caused by scroll, unless it's a focused input\n // (we use doc.defaultView in case we're in an iframe)\n var selection = (doc.defaultView || window).getSelection();\n\n if (selection && selection.type !== 'Caret') {\n selection.removeAllRanges();\n }\n }\n } catch (e) {// probably IE\n }\n}\n\nfunction addClassName(el\n/*: HTMLElement*/\n, className\n/*: string*/\n) {\n if (el.classList) {\n el.classList.add(className);\n } else {\n if (!el.className.match(new RegExp(\"(?:^|\\\\s)\".concat(className, \"(?!\\\\S)\")))) {\n el.className += \" \".concat(className);\n }\n }\n}\n\nfunction removeClassName(el\n/*: HTMLElement*/\n, className\n/*: string*/\n) {\n if (el.classList) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(\"(?:^|\\\\s)\".concat(className, \"(?!\\\\S)\"), 'g'), '');\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getPrefix = getPrefix;\nexports.browserPrefixToKey = browserPrefixToKey;\nexports.browserPrefixToStyle = browserPrefixToStyle;\nexports.default = void 0;\nvar prefixes = ['Moz', 'Webkit', 'O', 'ms'];\n\nfunction getPrefix()\n/*: string*/\n{\n var prop\n /*: string*/\n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform';\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n var style = window.document.documentElement.style;\n if (prop in style) return '';\n\n for (var i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nfunction browserPrefixToKey(prop\n/*: string*/\n, prefix\n/*: string*/\n)\n/*: string*/\n{\n return prefix ? \"\".concat(prefix).concat(kebabToTitleCase(prop)) : prop;\n}\n\nfunction browserPrefixToStyle(prop\n/*: string*/\n, prefix\n/*: string*/\n)\n/*: string*/\n{\n return prefix ? \"-\".concat(prefix.toLowerCase(), \"-\").concat(prop) : prop;\n}\n\nfunction kebabToTitleCase(str\n/*: string*/\n)\n/*: string*/\n{\n var out = '';\n var shouldCapitalize = true;\n\n for (var i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n\n return out;\n} // Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\n\n\nvar _default = getPrefix();\n\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = log;\n\n/*eslint no-console:0*/\nfunction log() {\n var _console;\n\n if (undefined) (_console = console).log.apply(_console, arguments);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getBoundPosition = getBoundPosition;\nexports.snapToGrid = snapToGrid;\nexports.canDragX = canDragX;\nexports.canDragY = canDragY;\nexports.getControlPosition = getControlPosition;\nexports.createCoreData = createCoreData;\nexports.createDraggableData = createDraggableData;\n\nvar _shims = require(\"./shims\");\n\nvar _domFns = require(\"./domFns\");\n\nfunction getBoundPosition(draggable\n/*: Draggable*/\n, x\n/*: number*/\n, y\n/*: number*/\n)\n/*: [number, number]*/\n{\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y]; // Clone new bounds\n\n var bounds = draggable.props.bounds;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n var node = findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n var ownerDocument = node.ownerDocument;\n var ownerWindow = ownerDocument.defaultView;\n var boundNode;\n\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = ownerDocument.querySelector(bounds);\n }\n\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n\n var nodeStyle = ownerWindow.getComputedStyle(node);\n var boundNodeStyle = ownerWindow.getComputedStyle(boundNode); // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n\n bounds = {\n left: -node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft),\n top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop),\n right: (0, _domFns.innerWidth)(boundNode) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight),\n bottom: (0, _domFns.innerHeight)(boundNode) - (0, _domFns.outerHeight)(node) - node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom)\n };\n } // Keep x and y below right and bottom limits...\n\n\n if ((0, _shims.isNum)(bounds.right)) x = Math.min(x, bounds.right);\n if ((0, _shims.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom); // But above left and top limits.\n\n if ((0, _shims.isNum)(bounds.left)) x = Math.max(x, bounds.left);\n if ((0, _shims.isNum)(bounds.top)) y = Math.max(y, bounds.top);\n return [x, y];\n}\n\nfunction snapToGrid(grid\n/*: [number, number]*/\n, pendingX\n/*: number*/\n, pendingY\n/*: number*/\n)\n/*: [number, number]*/\n{\n var x = Math.round(pendingX / grid[0]) * grid[0];\n var y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nfunction canDragX(draggable\n/*: Draggable*/\n)\n/*: boolean*/\n{\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nfunction canDragY(draggable\n/*: Draggable*/\n)\n/*: boolean*/\n{\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n} // Get {x, y} positions from event.\n\n\nfunction getControlPosition(e\n/*: MouseTouchEvent*/\n, touchIdentifier\n/*: ?number*/\n, draggableCore\n/*: DraggableCore*/\n)\n/*: ?ControlPosition*/\n{\n var touchObj = typeof touchIdentifier === 'number' ? (0, _domFns.getTouch)(e, touchIdentifier) : null;\n if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n\n var node = findDOMNode(draggableCore); // User can provide an offsetParent if desired.\n\n var offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n return (0, _domFns.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale);\n} // Create an data object exposed by 's events\n\n\nfunction createCoreData(draggable\n/*: DraggableCore*/\n, x\n/*: number*/\n, y\n/*: number*/\n)\n/*: DraggableData*/\n{\n var state = draggable.state;\n var isStart = !(0, _shims.isNum)(state.lastX);\n var node = findDOMNode(draggable);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node: node,\n deltaX: 0,\n deltaY: 0,\n lastX: x,\n lastY: y,\n x: x,\n y: y\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node: node,\n deltaX: x - state.lastX,\n deltaY: y - state.lastY,\n lastX: state.lastX,\n lastY: state.lastY,\n x: x,\n y: y\n };\n }\n} // Create an data exposed by 's events\n\n\nfunction createDraggableData(draggable\n/*: Draggable*/\n, coreData\n/*: DraggableData*/\n)\n/*: DraggableData*/\n{\n var scale = draggable.props.scale;\n return {\n node: coreData.node,\n x: draggable.state.x + coreData.deltaX / scale,\n y: draggable.state.y + coreData.deltaY / scale,\n deltaX: coreData.deltaX / scale,\n deltaY: coreData.deltaY / scale,\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n} // A lot faster than stringify/parse\n\n\nfunction cloneBounds(bounds\n/*: Bounds*/\n)\n/*: Bounds*/\n{\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\nfunction findDOMNode(draggable\n/*: Draggable | DraggableCore*/\n)\n/*: HTMLElement*/\n{\n var node = draggable.findDOMNode();\n\n if (!node) {\n throw new Error(': Unmounted during event!');\n } // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n\n\n return node;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.findInArray = findInArray;\nexports.isFunction = isFunction;\nexports.isNum = isNum;\nexports.int = int;\nexports.dontSetMe = dontSetMe;\n\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nfunction findInArray(array\n/*: Array | TouchList*/\n, callback\n/*: Function*/\n)\n/*: any*/\n{\n for (var i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nfunction isFunction(func\n/*: any*/\n)\n/*: boolean %checks*/\n{\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nfunction isNum(num\n/*: any*/\n)\n/*: boolean %checks*/\n{\n return typeof num === 'number' && !isNaN(num);\n}\n\nfunction int(a\n/*: string*/\n)\n/*: number*/\n{\n return parseInt(a, 10);\n}\n\nfunction dontSetMe(props\n/*: Object*/\n, propName\n/*: string*/\n, componentName\n/*: string*/\n) {\n if (props[propName]) {\n return new Error(\"Invalid prop \".concat(propName, \" passed to \").concat(componentName, \" - do not set this, set it on the child.\"));\n }\n}","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :\n typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ReactErrorBoundary = {}, global.React));\n})(this, (function (exports, React) { 'use strict';\n\n function _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () { return e[k]; }\n });\n }\n });\n }\n n[\"default\"] = e;\n return Object.freeze(n);\n }\n\n var React__namespace = /*#__PURE__*/_interopNamespace(React);\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n }\n\n var changedArray = function changedArray(a, b) {\n if (a === void 0) {\n a = [];\n }\n\n if (b === void 0) {\n b = [];\n }\n\n return a.length !== b.length || a.some(function (item, index) {\n return !Object.is(item, b[index]);\n });\n };\n\n var initialState = {\n error: null\n };\n\n var ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n _this.state = initialState;\n\n _this.resetErrorBoundary = function () {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this.props.onReset == null ? void 0 : (_this$props = _this.props).onReset.apply(_this$props, args);\n\n _this.reset();\n };\n\n return _this;\n }\n\n ErrorBoundary.getDerivedStateFromError = function getDerivedStateFromError(error) {\n return {\n error: error\n };\n };\n\n var _proto = ErrorBoundary.prototype;\n\n _proto.reset = function reset() {\n this.setState(initialState);\n };\n\n _proto.componentDidCatch = function componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n\n (_this$props$onError = (_this$props2 = this.props).onError) == null ? void 0 : _this$props$onError.call(_this$props2, error, info);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n var error = this.state.error;\n var resetKeys = this.props.resetKeys; // There's an edge case where if the thing that triggered the error\n // happens to *also* be in the resetKeys array, we'd end up resetting\n // the error boundary immediately. This would likely trigger a second\n // error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call\n // of cDU after the error is set\n\n if (error !== null && prevState.error !== null && changedArray(prevProps.resetKeys, resetKeys)) {\n var _this$props$onResetKe, _this$props3;\n\n (_this$props$onResetKe = (_this$props3 = this.props).onResetKeysChange) == null ? void 0 : _this$props$onResetKe.call(_this$props3, prevProps.resetKeys, resetKeys);\n this.reset();\n }\n };\n\n _proto.render = function render() {\n var error = this.state.error;\n var _this$props4 = this.props,\n fallbackRender = _this$props4.fallbackRender,\n FallbackComponent = _this$props4.FallbackComponent,\n fallback = _this$props4.fallback;\n\n if (error !== null) {\n var _props = {\n error: error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n\n if ( /*#__PURE__*/React__namespace.isValidElement(fallback)) {\n return fallback;\n } else if (typeof fallbackRender === 'function') {\n return fallbackRender(_props);\n } else if (FallbackComponent) {\n return /*#__PURE__*/React__namespace.createElement(FallbackComponent, _props);\n } else {\n throw new Error('react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop');\n }\n }\n\n return this.props.children;\n };\n\n return ErrorBoundary;\n }(React__namespace.Component);\n\n function withErrorBoundary(Component, errorBoundaryProps) {\n var Wrapped = function Wrapped(props) {\n return /*#__PURE__*/React__namespace.createElement(ErrorBoundary, errorBoundaryProps, /*#__PURE__*/React__namespace.createElement(Component, props));\n }; // Format for display in DevTools\n\n\n var name = Component.displayName || Component.name || 'Unknown';\n Wrapped.displayName = \"withErrorBoundary(\" + name + \")\";\n return Wrapped;\n }\n\n function useErrorHandler(givenError) {\n var _React$useState = React__namespace.useState(null),\n error = _React$useState[0],\n setError = _React$useState[1];\n\n if (givenError != null) throw givenError;\n if (error != null) throw error;\n return setError;\n }\n /*\n eslint\n @typescript-eslint/sort-type-union-intersection-members: \"off\",\n @typescript-eslint/no-throw-literal: \"off\",\n @typescript-eslint/prefer-nullish-coalescing: \"off\"\n */\n\n exports.ErrorBoundary = ErrorBoundary;\n exports.useErrorHandler = useErrorHandler;\n exports.withErrorBoundary = withErrorBoundary;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=react-error-boundary.umd.js.map\n","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.3\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","\"use strict\";var regeneratorRuntime = require(\"regenerator-runtime\");function asyncGeneratorStep(e,r,n,t,o,a,c){try{var s=e[a](c),u=s.value}catch(e){return void n(e)}s.done?r(u):Promise.resolve(u).then(t,o)}function _asyncToGenerator(e){return function(){var r=this,n=arguments;return new Promise(function(t,o){var a=e.apply(r,n);function c(e){asyncGeneratorStep(a,t,o,c,s,\"next\",e)}function s(e){asyncGeneratorStep(a,t,o,c,s,\"throw\",e)}c(void 0)})}}Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.default=void 0;var DEBUG=!1,API_KEY=null,LANGUAGE=\"en\",REGION=null,GOOGLE_API=\"https://maps.google.com/maps/api/geocode/json\";function log(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];DEBUG&&(r?console.warn(e):console.log(e))}function handleUrl(e){return _handleUrl.apply(this,arguments)}function _handleUrl(){return(_handleUrl=_asyncToGenerator(regeneratorRuntime.mark(function e(r){var n,t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r).catch(function(){return Promise.reject(new Error(\"Error fetching data\"))});case 2:return n=e.sent,e.next=5,n.json().catch(function(){return log(\"Error parsing server response\"),Promise.reject(new Error(\"Error parsing server response\"))});case 5:if(\"OK\"!==(t=e.sent).status){e.next=9;break}return log(t),e.abrupt(\"return\",t);case 9:return log(\"\".concat(t.error_message,\".\\nServer returned status code \").concat(t.status),!0),e.abrupt(\"return\",Promise.reject(new Error(\"\".concat(t.error_message,\".\\nServer returned status code \").concat(t.status))));case 11:case\"end\":return e.stop()}},e)}))).apply(this,arguments)}var _default={setApiKey:function(apiKey){API_KEY=apiKey},setLanguage:function(language){LANGUAGE=language},setRegion:function(region){REGION=region},enableDebug:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];DEBUG=e},fromLatLng:function(lat,lng,apiKey,language,region){return _asyncToGenerator(regeneratorRuntime.mark(function a(){var c,s;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(lat&&lng){a.next=3;break}return log(\"Provided coordinates are invalid\",!0),a.abrupt(\"return\",Promise.reject(new Error(\"Provided coordinates are invalid\")));case 3:return c=\"\".concat(lat,\",\").concat(lng),s=\"\".concat(GOOGLE_API,\"?latlng=\").concat(encodeURIComponent(c)),(apiKey||API_KEY)&&(s+=\"&key=\".concat(API_KEY=apiKey||API_KEY)),(language||LANGUAGE)&&(s+=\"&language=\".concat(LANGUAGE=language||LANGUAGE)),(region||REGION)&&(REGION=region||REGION,s+=\"®ion=\".concat(encodeURIComponent(REGION))),a.abrupt(\"return\",handleUrl(s));case 9:case\"end\":return a.stop()}},a)}))()},fromAddress:function(address,apiKey,language,region){return _asyncToGenerator(regeneratorRuntime.mark(function o(){var a;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(address){o.next=3;break}return log(\"Provided address is invalid\",!0),o.abrupt(\"return\",Promise.reject(new Error(\"Provided address is invalid\")));case 3:return a=\"\".concat(GOOGLE_API,\"?address=\").concat(encodeURIComponent(address)),(apiKey||API_KEY)&&(a+=\"&key=\".concat(API_KEY=apiKey||API_KEY)),(language||LANGUAGE)&&(a+=\"&language=\".concat(LANGUAGE=language||LANGUAGE)),(region||REGION)&&(REGION=region||REGION,a+=\"®ion=\".concat(encodeURIComponent(REGION))),o.abrupt(\"return\",handleUrl(a));case 8:case\"end\":return o.stop()}},o)}))()}};exports.default=_default;","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n prevProps,\n prevState\n );\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (\n typeof Component.getDerivedStateFromProps !== 'function' &&\n typeof prototype.getSnapshotBeforeUpdate !== 'function'\n ) {\n return Component;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (\n foundWillMountName !== null ||\n foundWillReceivePropsName !== null ||\n foundWillUpdateName !== null\n ) {\n var componentName = Component.displayName || Component.name;\n var newApiName =\n typeof Component.getDerivedStateFromProps === 'function'\n ? 'getDerivedStateFromProps()'\n : 'getSnapshotBeforeUpdate()';\n\n throw Error(\n 'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n componentName +\n ' uses ' +\n newApiName +\n ' but also contains the following legacy lifecycles:' +\n (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') +\n (foundWillReceivePropsName !== null\n ? '\\n ' + foundWillReceivePropsName\n : '') +\n (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') +\n '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n 'https://fb.me/react-async-component-lifecycle-hooks'\n );\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error(\n 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n );\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n prevProps,\n prevState,\n maybeSnapshot\n ) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag\n ? this.__reactInternalSnapshot\n : maybeSnapshot;\n\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component;\n}\n\nexport { polyfill };\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.bodyOpenClassName = exports.portalClassName = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = require(\"react-dom\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _ModalPortal = require(\"./ModalPortal\");\n\nvar _ModalPortal2 = _interopRequireDefault(_ModalPortal);\n\nvar _ariaAppHider = require(\"../helpers/ariaAppHider\");\n\nvar ariaAppHider = _interopRequireWildcard(_ariaAppHider);\n\nvar _safeHTMLElement = require(\"../helpers/safeHTMLElement\");\n\nvar _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar portalClassName = exports.portalClassName = \"ReactModalPortal\";\nvar bodyOpenClassName = exports.bodyOpenClassName = \"ReactModal__Body--open\";\n\nvar isReact16 = _safeHTMLElement.canUseDOM && _reactDom2.default.createPortal !== undefined;\n\nvar createHTMLElement = function createHTMLElement(name) {\n return document.createElement(name);\n};\n\nvar getCreatePortal = function getCreatePortal() {\n return isReact16 ? _reactDom2.default.createPortal : _reactDom2.default.unstable_renderSubtreeIntoContainer;\n};\n\nfunction getParentElement(parentSelector) {\n return parentSelector();\n}\n\nvar Modal = function (_Component) {\n _inherits(Modal, _Component);\n\n function Modal() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Modal);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Modal.__proto__ || Object.getPrototypeOf(Modal)).call.apply(_ref, [this].concat(args))), _this), _this.removePortal = function () {\n !isReact16 && _reactDom2.default.unmountComponentAtNode(_this.node);\n var parent = getParentElement(_this.props.parentSelector);\n if (parent && parent.contains(_this.node)) {\n parent.removeChild(_this.node);\n } else {\n // eslint-disable-next-line no-console\n console.warn('React-Modal: \"parentSelector\" prop did not returned any DOM ' + \"element. Make sure that the parent element is unmounted to \" + \"avoid any memory leaks.\");\n }\n }, _this.portalRef = function (ref) {\n _this.portal = ref;\n }, _this.renderPortal = function (props) {\n var createPortal = getCreatePortal();\n var portal = createPortal(_this, _react2.default.createElement(_ModalPortal2.default, _extends({ defaultStyles: Modal.defaultStyles }, props)), _this.node);\n _this.portalRef(portal);\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Modal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!_safeHTMLElement.canUseDOM) return;\n\n if (!isReact16) {\n this.node = createHTMLElement(\"div\");\n }\n this.node.className = this.props.portalClassName;\n\n var parent = getParentElement(this.props.parentSelector);\n parent.appendChild(this.node);\n\n !isReact16 && this.renderPortal(this.props);\n }\n }, {\n key: \"getSnapshotBeforeUpdate\",\n value: function getSnapshotBeforeUpdate(prevProps) {\n var prevParent = getParentElement(prevProps.parentSelector);\n var nextParent = getParentElement(this.props.parentSelector);\n return { prevParent: prevParent, nextParent: nextParent };\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, _, snapshot) {\n if (!_safeHTMLElement.canUseDOM) return;\n var _props = this.props,\n isOpen = _props.isOpen,\n portalClassName = _props.portalClassName;\n\n\n if (prevProps.portalClassName !== portalClassName) {\n this.node.className = portalClassName;\n }\n\n var prevParent = snapshot.prevParent,\n nextParent = snapshot.nextParent;\n\n if (nextParent !== prevParent) {\n prevParent.removeChild(this.node);\n nextParent.appendChild(this.node);\n }\n\n // Stop unnecessary renders if modal is remaining closed\n if (!prevProps.isOpen && !isOpen) return;\n\n !isReact16 && this.renderPortal(this.props);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (!_safeHTMLElement.canUseDOM || !this.node || !this.portal) return;\n\n var state = this.portal.state;\n var now = Date.now();\n var closesAt = state.isOpen && this.props.closeTimeoutMS && (state.closesAt || now + this.props.closeTimeoutMS);\n\n if (closesAt) {\n if (!state.beforeClose) {\n this.portal.closeWithTimeout();\n }\n\n setTimeout(this.removePortal, closesAt - now);\n } else {\n this.removePortal();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!_safeHTMLElement.canUseDOM || !isReact16) {\n return null;\n }\n\n if (!this.node && isReact16) {\n this.node = createHTMLElement(\"div\");\n }\n\n var createPortal = getCreatePortal();\n return createPortal(_react2.default.createElement(_ModalPortal2.default, _extends({\n ref: this.portalRef,\n defaultStyles: Modal.defaultStyles\n }, this.props)), this.node);\n }\n }], [{\n key: \"setAppElement\",\n value: function setAppElement(element) {\n ariaAppHider.setElement(element);\n }\n\n /* eslint-disable react/no-unused-prop-types */\n\n /* eslint-enable react/no-unused-prop-types */\n\n }]);\n\n return Modal;\n}(_react.Component);\n\nModal.propTypes = {\n isOpen: _propTypes2.default.bool.isRequired,\n style: _propTypes2.default.shape({\n content: _propTypes2.default.object,\n overlay: _propTypes2.default.object\n }),\n portalClassName: _propTypes2.default.string,\n bodyOpenClassName: _propTypes2.default.string,\n htmlOpenClassName: _propTypes2.default.string,\n className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n base: _propTypes2.default.string.isRequired,\n afterOpen: _propTypes2.default.string.isRequired,\n beforeClose: _propTypes2.default.string.isRequired\n })]),\n overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n base: _propTypes2.default.string.isRequired,\n afterOpen: _propTypes2.default.string.isRequired,\n beforeClose: _propTypes2.default.string.isRequired\n })]),\n appElement: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(_safeHTMLElement2.default), _propTypes2.default.instanceOf(_safeHTMLElement.SafeHTMLCollection), _propTypes2.default.instanceOf(_safeHTMLElement.SafeNodeList), _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_safeHTMLElement2.default))]),\n onAfterOpen: _propTypes2.default.func,\n onRequestClose: _propTypes2.default.func,\n closeTimeoutMS: _propTypes2.default.number,\n ariaHideApp: _propTypes2.default.bool,\n shouldFocusAfterRender: _propTypes2.default.bool,\n shouldCloseOnOverlayClick: _propTypes2.default.bool,\n shouldReturnFocusAfterClose: _propTypes2.default.bool,\n preventScroll: _propTypes2.default.bool,\n parentSelector: _propTypes2.default.func,\n aria: _propTypes2.default.object,\n data: _propTypes2.default.object,\n role: _propTypes2.default.string,\n contentLabel: _propTypes2.default.string,\n shouldCloseOnEsc: _propTypes2.default.bool,\n overlayRef: _propTypes2.default.func,\n contentRef: _propTypes2.default.func,\n id: _propTypes2.default.string,\n overlayElement: _propTypes2.default.func,\n contentElement: _propTypes2.default.func\n};\nModal.defaultProps = {\n isOpen: false,\n portalClassName: portalClassName,\n bodyOpenClassName: bodyOpenClassName,\n role: \"dialog\",\n ariaHideApp: true,\n closeTimeoutMS: 0,\n shouldFocusAfterRender: true,\n shouldCloseOnEsc: true,\n shouldCloseOnOverlayClick: true,\n shouldReturnFocusAfterClose: true,\n preventScroll: false,\n parentSelector: function parentSelector() {\n return document.body;\n },\n overlayElement: function overlayElement(props, contentEl) {\n return _react2.default.createElement(\n \"div\",\n props,\n contentEl\n );\n },\n contentElement: function contentElement(props, children) {\n return _react2.default.createElement(\n \"div\",\n props,\n children\n );\n }\n};\nModal.defaultStyles = {\n overlay: {\n position: \"fixed\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: \"rgba(255, 255, 255, 0.75)\"\n },\n content: {\n position: \"absolute\",\n top: \"40px\",\n left: \"40px\",\n right: \"40px\",\n bottom: \"40px\",\n border: \"1px solid #ccc\",\n background: \"#fff\",\n overflow: \"auto\",\n WebkitOverflowScrolling: \"touch\",\n borderRadius: \"4px\",\n outline: \"none\",\n padding: \"20px\"\n }\n};\n\n\n(0, _reactLifecyclesCompat.polyfill)(Modal);\n\nif (process.env.NODE_ENV !== \"production\") {\n Modal.setCreateHTMLElement = function (fn) {\n return createHTMLElement = fn;\n };\n}\n\nexports.default = Modal;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require(\"react\");\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _focusManager = require(\"../helpers/focusManager\");\n\nvar focusManager = _interopRequireWildcard(_focusManager);\n\nvar _scopeTab = require(\"../helpers/scopeTab\");\n\nvar _scopeTab2 = _interopRequireDefault(_scopeTab);\n\nvar _ariaAppHider = require(\"../helpers/ariaAppHider\");\n\nvar ariaAppHider = _interopRequireWildcard(_ariaAppHider);\n\nvar _classList = require(\"../helpers/classList\");\n\nvar classList = _interopRequireWildcard(_classList);\n\nvar _safeHTMLElement = require(\"../helpers/safeHTMLElement\");\n\nvar _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);\n\nvar _portalOpenInstances = require(\"../helpers/portalOpenInstances\");\n\nvar _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);\n\nrequire(\"../helpers/bodyTrap\");\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// so that our CSS is statically analyzable\nvar CLASS_NAMES = {\n overlay: \"ReactModal__Overlay\",\n content: \"ReactModal__Content\"\n};\n\nvar TAB_KEY = 9;\nvar ESC_KEY = 27;\n\nvar ariaHiddenInstances = 0;\n\nvar ModalPortal = function (_Component) {\n _inherits(ModalPortal, _Component);\n\n function ModalPortal(props) {\n _classCallCheck(this, ModalPortal);\n\n var _this = _possibleConstructorReturn(this, (ModalPortal.__proto__ || Object.getPrototypeOf(ModalPortal)).call(this, props));\n\n _this.setOverlayRef = function (overlay) {\n _this.overlay = overlay;\n _this.props.overlayRef && _this.props.overlayRef(overlay);\n };\n\n _this.setContentRef = function (content) {\n _this.content = content;\n _this.props.contentRef && _this.props.contentRef(content);\n };\n\n _this.afterClose = function () {\n var _this$props = _this.props,\n appElement = _this$props.appElement,\n ariaHideApp = _this$props.ariaHideApp,\n htmlOpenClassName = _this$props.htmlOpenClassName,\n bodyOpenClassName = _this$props.bodyOpenClassName;\n\n // Remove classes.\n\n bodyOpenClassName && classList.remove(document.body, bodyOpenClassName);\n\n htmlOpenClassName && classList.remove(document.getElementsByTagName(\"html\")[0], htmlOpenClassName);\n\n // Reset aria-hidden attribute if all modals have been removed\n if (ariaHideApp && ariaHiddenInstances > 0) {\n ariaHiddenInstances -= 1;\n\n if (ariaHiddenInstances === 0) {\n ariaAppHider.show(appElement);\n }\n }\n\n if (_this.props.shouldFocusAfterRender) {\n if (_this.props.shouldReturnFocusAfterClose) {\n focusManager.returnFocus(_this.props.preventScroll);\n focusManager.teardownScopedFocus();\n } else {\n focusManager.popWithoutFocus();\n }\n }\n\n if (_this.props.onAfterClose) {\n _this.props.onAfterClose();\n }\n\n _portalOpenInstances2.default.deregister(_this);\n };\n\n _this.open = function () {\n _this.beforeOpen();\n if (_this.state.afterOpen && _this.state.beforeClose) {\n clearTimeout(_this.closeTimer);\n _this.setState({ beforeClose: false });\n } else {\n if (_this.props.shouldFocusAfterRender) {\n focusManager.setupScopedFocus(_this.node);\n focusManager.markForFocusLater();\n }\n\n _this.setState({ isOpen: true }, function () {\n _this.openAnimationFrame = requestAnimationFrame(function () {\n _this.setState({ afterOpen: true });\n\n if (_this.props.isOpen && _this.props.onAfterOpen) {\n _this.props.onAfterOpen({\n overlayEl: _this.overlay,\n contentEl: _this.content\n });\n }\n });\n });\n }\n };\n\n _this.close = function () {\n if (_this.props.closeTimeoutMS > 0) {\n _this.closeWithTimeout();\n } else {\n _this.closeWithoutTimeout();\n }\n };\n\n _this.focusContent = function () {\n return _this.content && !_this.contentHasFocus() && _this.content.focus({ preventScroll: true });\n };\n\n _this.closeWithTimeout = function () {\n var closesAt = Date.now() + _this.props.closeTimeoutMS;\n _this.setState({ beforeClose: true, closesAt: closesAt }, function () {\n _this.closeTimer = setTimeout(_this.closeWithoutTimeout, _this.state.closesAt - Date.now());\n });\n };\n\n _this.closeWithoutTimeout = function () {\n _this.setState({\n beforeClose: false,\n isOpen: false,\n afterOpen: false,\n closesAt: null\n }, _this.afterClose);\n };\n\n _this.handleKeyDown = function (event) {\n if (event.keyCode === TAB_KEY) {\n (0, _scopeTab2.default)(_this.content, event);\n }\n\n if (_this.props.shouldCloseOnEsc && event.keyCode === ESC_KEY) {\n event.stopPropagation();\n _this.requestClose(event);\n }\n };\n\n _this.handleOverlayOnClick = function (event) {\n if (_this.shouldClose === null) {\n _this.shouldClose = true;\n }\n\n if (_this.shouldClose && _this.props.shouldCloseOnOverlayClick) {\n if (_this.ownerHandlesClose()) {\n _this.requestClose(event);\n } else {\n _this.focusContent();\n }\n }\n _this.shouldClose = null;\n };\n\n _this.handleContentOnMouseUp = function () {\n _this.shouldClose = false;\n };\n\n _this.handleOverlayOnMouseDown = function (event) {\n if (!_this.props.shouldCloseOnOverlayClick && event.target == _this.overlay) {\n event.preventDefault();\n }\n };\n\n _this.handleContentOnClick = function () {\n _this.shouldClose = false;\n };\n\n _this.handleContentOnMouseDown = function () {\n _this.shouldClose = false;\n };\n\n _this.requestClose = function (event) {\n return _this.ownerHandlesClose() && _this.props.onRequestClose(event);\n };\n\n _this.ownerHandlesClose = function () {\n return _this.props.onRequestClose;\n };\n\n _this.shouldBeClosed = function () {\n return !_this.state.isOpen && !_this.state.beforeClose;\n };\n\n _this.contentHasFocus = function () {\n return document.activeElement === _this.content || _this.content.contains(document.activeElement);\n };\n\n _this.buildClassName = function (which, additional) {\n var classNames = (typeof additional === \"undefined\" ? \"undefined\" : _typeof(additional)) === \"object\" ? additional : {\n base: CLASS_NAMES[which],\n afterOpen: CLASS_NAMES[which] + \"--after-open\",\n beforeClose: CLASS_NAMES[which] + \"--before-close\"\n };\n var className = classNames.base;\n if (_this.state.afterOpen) {\n className = className + \" \" + classNames.afterOpen;\n }\n if (_this.state.beforeClose) {\n className = className + \" \" + classNames.beforeClose;\n }\n return typeof additional === \"string\" && additional ? className + \" \" + additional : className;\n };\n\n _this.attributesFromObject = function (prefix, items) {\n return Object.keys(items).reduce(function (acc, name) {\n acc[prefix + \"-\" + name] = items[name];\n return acc;\n }, {});\n };\n\n _this.state = {\n afterOpen: false,\n beforeClose: false\n };\n\n _this.shouldClose = null;\n _this.moveFromContentToOverlay = null;\n return _this;\n }\n\n _createClass(ModalPortal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.isOpen) {\n this.open();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n if (process.env.NODE_ENV !== \"production\") {\n if (prevProps.bodyOpenClassName !== this.props.bodyOpenClassName) {\n // eslint-disable-next-line no-console\n console.warn('React-Modal: \"bodyOpenClassName\" prop has been modified. ' + \"This may cause unexpected behavior when multiple modals are open.\");\n }\n if (prevProps.htmlOpenClassName !== this.props.htmlOpenClassName) {\n // eslint-disable-next-line no-console\n console.warn('React-Modal: \"htmlOpenClassName\" prop has been modified. ' + \"This may cause unexpected behavior when multiple modals are open.\");\n }\n }\n\n if (this.props.isOpen && !prevProps.isOpen) {\n this.open();\n } else if (!this.props.isOpen && prevProps.isOpen) {\n this.close();\n }\n\n // Focus only needs to be set once when the modal is being opened\n if (this.props.shouldFocusAfterRender && this.state.isOpen && !prevState.isOpen) {\n this.focusContent();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.isOpen) {\n this.afterClose();\n }\n clearTimeout(this.closeTimer);\n cancelAnimationFrame(this.openAnimationFrame);\n }\n }, {\n key: \"beforeOpen\",\n value: function beforeOpen() {\n var _props = this.props,\n appElement = _props.appElement,\n ariaHideApp = _props.ariaHideApp,\n htmlOpenClassName = _props.htmlOpenClassName,\n bodyOpenClassName = _props.bodyOpenClassName;\n\n // Add classes.\n\n bodyOpenClassName && classList.add(document.body, bodyOpenClassName);\n\n htmlOpenClassName && classList.add(document.getElementsByTagName(\"html\")[0], htmlOpenClassName);\n\n if (ariaHideApp) {\n ariaHiddenInstances += 1;\n ariaAppHider.hide(appElement);\n }\n\n _portalOpenInstances2.default.register(this);\n }\n\n // Don't steal focus from inner elements\n\n }, {\n key: \"render\",\n value: function render() {\n var _props2 = this.props,\n id = _props2.id,\n className = _props2.className,\n overlayClassName = _props2.overlayClassName,\n defaultStyles = _props2.defaultStyles,\n children = _props2.children;\n\n var contentStyles = className ? {} : defaultStyles.content;\n var overlayStyles = overlayClassName ? {} : defaultStyles.overlay;\n\n if (this.shouldBeClosed()) {\n return null;\n }\n\n var overlayProps = {\n ref: this.setOverlayRef,\n className: this.buildClassName(\"overlay\", overlayClassName),\n style: _extends({}, overlayStyles, this.props.style.overlay),\n onClick: this.handleOverlayOnClick,\n onMouseDown: this.handleOverlayOnMouseDown\n };\n\n var contentProps = _extends({\n id: id,\n ref: this.setContentRef,\n style: _extends({}, contentStyles, this.props.style.content),\n className: this.buildClassName(\"content\", className),\n tabIndex: \"-1\",\n onKeyDown: this.handleKeyDown,\n onMouseDown: this.handleContentOnMouseDown,\n onMouseUp: this.handleContentOnMouseUp,\n onClick: this.handleContentOnClick,\n role: this.props.role,\n \"aria-label\": this.props.contentLabel\n }, this.attributesFromObject(\"aria\", _extends({ modal: true }, this.props.aria)), this.attributesFromObject(\"data\", this.props.data || {}), {\n \"data-testid\": this.props.testId\n });\n\n var contentElement = this.props.contentElement(contentProps, children);\n return this.props.overlayElement(overlayProps, contentElement);\n }\n }]);\n\n return ModalPortal;\n}(_react.Component);\n\nModalPortal.defaultProps = {\n style: {\n overlay: {},\n content: {}\n },\n defaultStyles: {}\n};\nModalPortal.propTypes = {\n isOpen: _propTypes2.default.bool.isRequired,\n defaultStyles: _propTypes2.default.shape({\n content: _propTypes2.default.object,\n overlay: _propTypes2.default.object\n }),\n style: _propTypes2.default.shape({\n content: _propTypes2.default.object,\n overlay: _propTypes2.default.object\n }),\n className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),\n overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),\n bodyOpenClassName: _propTypes2.default.string,\n htmlOpenClassName: _propTypes2.default.string,\n ariaHideApp: _propTypes2.default.bool,\n appElement: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(_safeHTMLElement2.default), _propTypes2.default.instanceOf(_safeHTMLElement.SafeHTMLCollection), _propTypes2.default.instanceOf(_safeHTMLElement.SafeNodeList), _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_safeHTMLElement2.default))]),\n onAfterOpen: _propTypes2.default.func,\n onAfterClose: _propTypes2.default.func,\n onRequestClose: _propTypes2.default.func,\n closeTimeoutMS: _propTypes2.default.number,\n shouldFocusAfterRender: _propTypes2.default.bool,\n shouldCloseOnOverlayClick: _propTypes2.default.bool,\n shouldReturnFocusAfterClose: _propTypes2.default.bool,\n preventScroll: _propTypes2.default.bool,\n role: _propTypes2.default.string,\n contentLabel: _propTypes2.default.string,\n aria: _propTypes2.default.object,\n data: _propTypes2.default.object,\n children: _propTypes2.default.node,\n shouldCloseOnEsc: _propTypes2.default.bool,\n overlayRef: _propTypes2.default.func,\n contentRef: _propTypes2.default.func,\n id: _propTypes2.default.string,\n overlayElement: _propTypes2.default.func,\n contentElement: _propTypes2.default.func,\n testId: _propTypes2.default.string\n};\nexports.default = ModalPortal;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.resetState = resetState;\nexports.log = log;\nexports.assertNodeList = assertNodeList;\nexports.setElement = setElement;\nexports.validateElement = validateElement;\nexports.hide = hide;\nexports.show = show;\nexports.documentNotReadyOrSSRTesting = documentNotReadyOrSSRTesting;\n\nvar _warning = require(\"warning\");\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _safeHTMLElement = require(\"./safeHTMLElement\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar globalElement = null;\n\n/* eslint-disable no-console */\n/* istanbul ignore next */\nfunction resetState() {\n if (globalElement) {\n if (globalElement.removeAttribute) {\n globalElement.removeAttribute(\"aria-hidden\");\n } else if (globalElement.length != null) {\n globalElement.forEach(function (element) {\n return element.removeAttribute(\"aria-hidden\");\n });\n } else {\n document.querySelectorAll(globalElement).forEach(function (element) {\n return element.removeAttribute(\"aria-hidden\");\n });\n }\n }\n globalElement = null;\n}\n\n/* istanbul ignore next */\nfunction log() {\n if (process.env.NODE_ENV !== \"production\") {\n var check = globalElement || {};\n console.log(\"ariaAppHider ----------\");\n console.log(check.nodeName, check.className, check.id);\n console.log(\"end ariaAppHider ----------\");\n }\n}\n/* eslint-enable no-console */\n\nfunction assertNodeList(nodeList, selector) {\n if (!nodeList || !nodeList.length) {\n throw new Error(\"react-modal: No elements were found for selector \" + selector + \".\");\n }\n}\n\nfunction setElement(element) {\n var useElement = element;\n if (typeof useElement === \"string\" && _safeHTMLElement.canUseDOM) {\n var el = document.querySelectorAll(useElement);\n assertNodeList(el, useElement);\n useElement = el;\n }\n globalElement = useElement || globalElement;\n return globalElement;\n}\n\nfunction validateElement(appElement) {\n var el = appElement || globalElement;\n if (el) {\n return Array.isArray(el) || el instanceof HTMLCollection || el instanceof NodeList ? el : [el];\n } else {\n (0, _warning2.default)(false, [\"react-modal: App element is not defined.\", \"Please use `Modal.setAppElement(el)` or set `appElement={el}`.\", \"This is needed so screen readers don't see main content\", \"when modal is opened. It is not recommended, but you can opt-out\", \"by setting `ariaHideApp={false}`.\"].join(\" \"));\n\n return [];\n }\n}\n\nfunction hide(appElement) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = validateElement(appElement)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var el = _step.value;\n\n el.setAttribute(\"aria-hidden\", \"true\");\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n}\n\nfunction show(appElement) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = validateElement(appElement)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var el = _step2.value;\n\n el.removeAttribute(\"aria-hidden\");\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n}\n\nfunction documentNotReadyOrSSRTesting() {\n globalElement = null;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.resetState = resetState;\nexports.log = log;\n\nvar _portalOpenInstances = require(\"./portalOpenInstances\");\n\nvar _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Body focus trap see Issue #742\n\nvar before = void 0,\n after = void 0,\n instances = [];\n\n/* eslint-disable no-console */\n/* istanbul ignore next */\nfunction resetState() {\n var _arr = [before, after];\n\n for (var _i = 0; _i < _arr.length; _i++) {\n var item = _arr[_i];\n if (!item) continue;\n item.parentNode && item.parentNode.removeChild(item);\n }\n before = after = null;\n instances = [];\n}\n\n/* istanbul ignore next */\nfunction log() {\n console.log(\"bodyTrap ----------\");\n console.log(instances.length);\n var _arr2 = [before, after];\n for (var _i2 = 0; _i2 < _arr2.length; _i2++) {\n var item = _arr2[_i2];\n var check = item || {};\n console.log(check.nodeName, check.className, check.id);\n }\n console.log(\"edn bodyTrap ----------\");\n}\n/* eslint-enable no-console */\n\nfunction focusContent() {\n if (instances.length === 0) {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\"React-Modal: Open instances > 0 expected\");\n }\n return;\n }\n instances[instances.length - 1].focusContent();\n}\n\nfunction bodyTrap(eventType, openInstances) {\n if (!before && !after) {\n before = document.createElement(\"div\");\n before.setAttribute(\"data-react-modal-body-trap\", \"\");\n before.style.position = \"absolute\";\n before.style.opacity = \"0\";\n before.setAttribute(\"tabindex\", \"0\");\n before.addEventListener(\"focus\", focusContent);\n after = before.cloneNode();\n after.addEventListener(\"focus\", focusContent);\n }\n\n instances = openInstances;\n\n if (instances.length > 0) {\n // Add focus trap\n if (document.body.firstChild !== before) {\n document.body.insertBefore(before, document.body.firstChild);\n }\n if (document.body.lastChild !== after) {\n document.body.appendChild(after);\n }\n } else {\n // Remove focus trap\n if (before.parentElement) {\n before.parentElement.removeChild(before);\n }\n if (after.parentElement) {\n after.parentElement.removeChild(after);\n }\n }\n}\n\n_portalOpenInstances2.default.subscribe(bodyTrap);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.resetState = resetState;\nexports.log = log;\nvar htmlClassList = {};\nvar docBodyClassList = {};\n\n/* eslint-disable no-console */\n/* istanbul ignore next */\nfunction removeClass(at, cls) {\n at.classList.remove(cls);\n}\n\n/* istanbul ignore next */\nfunction resetState() {\n var htmlElement = document.getElementsByTagName(\"html\")[0];\n for (var cls in htmlClassList) {\n removeClass(htmlElement, htmlClassList[cls]);\n }\n\n var body = document.body;\n for (var _cls in docBodyClassList) {\n removeClass(body, docBodyClassList[_cls]);\n }\n\n htmlClassList = {};\n docBodyClassList = {};\n}\n\n/* istanbul ignore next */\nfunction log() {\n if (process.env.NODE_ENV !== \"production\") {\n var classes = document.getElementsByTagName(\"html\")[0].className;\n var buffer = \"Show tracked classes:\\n\\n\";\n\n buffer += \" (\" + classes + \"):\\n \";\n for (var x in htmlClassList) {\n buffer += \" \" + x + \" \" + htmlClassList[x] + \"\\n \";\n }\n\n classes = document.body.className;\n\n buffer += \"\\n\\ndoc.body (\" + classes + \"):\\n \";\n for (var _x in docBodyClassList) {\n buffer += \" \" + _x + \" \" + docBodyClassList[_x] + \"\\n \";\n }\n\n buffer += \"\\n\";\n\n console.log(buffer);\n }\n}\n/* eslint-enable no-console */\n\n/**\n * Track the number of reference of a class.\n * @param {object} poll The poll to receive the reference.\n * @param {string} className The class name.\n * @return {string}\n */\nvar incrementReference = function incrementReference(poll, className) {\n if (!poll[className]) {\n poll[className] = 0;\n }\n poll[className] += 1;\n return className;\n};\n\n/**\n * Drop the reference of a class.\n * @param {object} poll The poll to receive the reference.\n * @param {string} className The class name.\n * @return {string}\n */\nvar decrementReference = function decrementReference(poll, className) {\n if (poll[className]) {\n poll[className] -= 1;\n }\n return className;\n};\n\n/**\n * Track a class and add to the given class list.\n * @param {Object} classListRef A class list of an element.\n * @param {Object} poll The poll to be used.\n * @param {Array} classes The list of classes to be tracked.\n */\nvar trackClass = function trackClass(classListRef, poll, classes) {\n classes.forEach(function (className) {\n incrementReference(poll, className);\n classListRef.add(className);\n });\n};\n\n/**\n * Untrack a class and remove from the given class list if the reference\n * reaches 0.\n * @param {Object} classListRef A class list of an element.\n * @param {Object} poll The poll to be used.\n * @param {Array} classes The list of classes to be untracked.\n */\nvar untrackClass = function untrackClass(classListRef, poll, classes) {\n classes.forEach(function (className) {\n decrementReference(poll, className);\n poll[className] === 0 && classListRef.remove(className);\n });\n};\n\n/**\n * Public inferface to add classes to the document.body.\n * @param {string} bodyClass The class string to be added.\n * It may contain more then one class\n * with ' ' as separator.\n */\nvar add = exports.add = function add(element, classString) {\n return trackClass(element.classList, element.nodeName.toLowerCase() == \"html\" ? htmlClassList : docBodyClassList, classString.split(\" \"));\n};\n\n/**\n * Public inferface to remove classes from the document.body.\n * @param {string} bodyClass The class string to be added.\n * It may contain more then one class\n * with ' ' as separator.\n */\nvar remove = exports.remove = function remove(element, classString) {\n return untrackClass(element.classList, element.nodeName.toLowerCase() == \"html\" ? htmlClassList : docBodyClassList, classString.split(\" \"));\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.resetState = resetState;\nexports.log = log;\nexports.handleBlur = handleBlur;\nexports.handleFocus = handleFocus;\nexports.markForFocusLater = markForFocusLater;\nexports.returnFocus = returnFocus;\nexports.popWithoutFocus = popWithoutFocus;\nexports.setupScopedFocus = setupScopedFocus;\nexports.teardownScopedFocus = teardownScopedFocus;\n\nvar _tabbable = require(\"../helpers/tabbable\");\n\nvar _tabbable2 = _interopRequireDefault(_tabbable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar focusLaterElements = [];\nvar modalElement = null;\nvar needToFocus = false;\n\n/* eslint-disable no-console */\n/* istanbul ignore next */\nfunction resetState() {\n focusLaterElements = [];\n}\n\n/* istanbul ignore next */\nfunction log() {\n if (process.env.NODE_ENV !== \"production\") {\n console.log(\"focusManager ----------\");\n focusLaterElements.forEach(function (f) {\n var check = f || {};\n console.log(check.nodeName, check.className, check.id);\n });\n console.log(\"end focusManager ----------\");\n }\n}\n/* eslint-enable no-console */\n\nfunction handleBlur() {\n needToFocus = true;\n}\n\nfunction handleFocus() {\n if (needToFocus) {\n needToFocus = false;\n if (!modalElement) {\n return;\n }\n // need to see how jQuery shims document.on('focusin') so we don't need the\n // setTimeout, firefox doesn't support focusin, if it did, we could focus\n // the element outside of a setTimeout. Side-effect of this implementation\n // is that the document.body gets focus, and then we focus our element right\n // after, seems fine.\n setTimeout(function () {\n if (modalElement.contains(document.activeElement)) {\n return;\n }\n var el = (0, _tabbable2.default)(modalElement)[0] || modalElement;\n el.focus();\n }, 0);\n }\n}\n\nfunction markForFocusLater() {\n focusLaterElements.push(document.activeElement);\n}\n\n/* eslint-disable no-console */\nfunction returnFocus() {\n var preventScroll = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var toFocus = null;\n try {\n if (focusLaterElements.length !== 0) {\n toFocus = focusLaterElements.pop();\n toFocus.focus({ preventScroll: preventScroll });\n }\n return;\n } catch (e) {\n console.warn([\"You tried to return focus to\", toFocus, \"but it is not in the DOM anymore\"].join(\" \"));\n }\n}\n/* eslint-enable no-console */\n\nfunction popWithoutFocus() {\n focusLaterElements.length > 0 && focusLaterElements.pop();\n}\n\nfunction setupScopedFocus(element) {\n modalElement = element;\n\n if (window.addEventListener) {\n window.addEventListener(\"blur\", handleBlur, false);\n document.addEventListener(\"focus\", handleFocus, true);\n } else {\n window.attachEvent(\"onBlur\", handleBlur);\n document.attachEvent(\"onFocus\", handleFocus);\n }\n}\n\nfunction teardownScopedFocus() {\n modalElement = null;\n\n if (window.addEventListener) {\n window.removeEventListener(\"blur\", handleBlur);\n document.removeEventListener(\"focus\", handleFocus);\n } else {\n window.detachEvent(\"onBlur\", handleBlur);\n document.detachEvent(\"onFocus\", handleFocus);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.log = log;\nexports.resetState = resetState;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// Tracks portals that are open and emits events to subscribers\n\nvar PortalOpenInstances = function PortalOpenInstances() {\n var _this = this;\n\n _classCallCheck(this, PortalOpenInstances);\n\n this.register = function (openInstance) {\n if (_this.openInstances.indexOf(openInstance) !== -1) {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\"React-Modal: Cannot register modal instance that's already open\");\n }\n return;\n }\n _this.openInstances.push(openInstance);\n _this.emit(\"register\");\n };\n\n this.deregister = function (openInstance) {\n var index = _this.openInstances.indexOf(openInstance);\n if (index === -1) {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\"React-Modal: Unable to deregister \" + openInstance + \" as \" + \"it was never registered\");\n }\n return;\n }\n _this.openInstances.splice(index, 1);\n _this.emit(\"deregister\");\n };\n\n this.subscribe = function (callback) {\n _this.subscribers.push(callback);\n };\n\n this.emit = function (eventType) {\n _this.subscribers.forEach(function (subscriber) {\n return subscriber(eventType,\n // shallow copy to avoid accidental mutation\n _this.openInstances.slice());\n });\n };\n\n this.openInstances = [];\n this.subscribers = [];\n};\n\nvar portalOpenInstances = new PortalOpenInstances();\n\n/* eslint-disable no-console */\n/* istanbul ignore next */\nfunction log() {\n console.log(\"portalOpenInstances ----------\");\n console.log(portalOpenInstances.openInstances.length);\n portalOpenInstances.openInstances.forEach(function (p) {\n return console.log(p);\n });\n console.log(\"end portalOpenInstances ----------\");\n}\n\n/* istanbul ignore next */\nfunction resetState() {\n portalOpenInstances = new PortalOpenInstances();\n}\n/* eslint-enable no-console */\n\nexports.default = portalOpenInstances;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.canUseDOM = exports.SafeNodeList = exports.SafeHTMLCollection = undefined;\n\nvar _exenv = require(\"exenv\");\n\nvar _exenv2 = _interopRequireDefault(_exenv);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar EE = _exenv2.default;\n\nvar SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {};\n\nvar SafeHTMLCollection = exports.SafeHTMLCollection = EE.canUseDOM ? window.HTMLCollection : {};\n\nvar SafeNodeList = exports.SafeNodeList = EE.canUseDOM ? window.NodeList : {};\n\nvar canUseDOM = exports.canUseDOM = EE.canUseDOM;\n\nexports.default = SafeHTMLElement;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = scopeTab;\n\nvar _tabbable = require(\"./tabbable\");\n\nvar _tabbable2 = _interopRequireDefault(_tabbable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getActiveElement() {\n var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n\n return el.activeElement.shadowRoot ? getActiveElement(el.activeElement.shadowRoot) : el.activeElement;\n}\n\nfunction scopeTab(node, event) {\n var tabbable = (0, _tabbable2.default)(node);\n\n if (!tabbable.length) {\n // Do nothing, since there are no elements that can receive focus.\n event.preventDefault();\n return;\n }\n\n var target = void 0;\n\n var shiftKey = event.shiftKey;\n var head = tabbable[0];\n var tail = tabbable[tabbable.length - 1];\n var activeElement = getActiveElement();\n\n // proceed with default browser behavior on tab.\n // Focus on last element on shift + tab.\n if (node === activeElement) {\n if (!shiftKey) return;\n target = tail;\n }\n\n if (tail === activeElement && !shiftKey) {\n target = head;\n }\n\n if (head === activeElement && shiftKey) {\n target = tail;\n }\n\n if (target) {\n event.preventDefault();\n target.focus();\n return;\n }\n\n // Safari radio issue.\n //\n // Safari does not move the focus to the radio button,\n // so we need to force it to really walk through all elements.\n //\n // This is very error prone, since we are trying to guess\n // if it is a safari browser from the first occurence between\n // chrome or safari.\n //\n // The chrome user agent contains the first ocurrence\n // as the 'chrome/version' and later the 'safari/version'.\n var checkSafari = /(\\bChrome\\b|\\bSafari\\b)\\//.exec(navigator.userAgent);\n var isSafariDesktop = checkSafari != null && checkSafari[1] != \"Chrome\" && /\\biPod\\b|\\biPad\\b/g.exec(navigator.userAgent) == null;\n\n // If we are not in safari desktop, let the browser control\n // the focus\n if (!isSafariDesktop) return;\n\n var x = tabbable.indexOf(activeElement);\n\n if (x > -1) {\n x += shiftKey ? -1 : 1;\n }\n\n target = tabbable[x];\n\n // If the tabbable element does not exist,\n // focus head/tail based on shiftKey\n if (typeof target === \"undefined\") {\n event.preventDefault();\n target = shiftKey ? tail : head;\n target.focus();\n return;\n }\n\n event.preventDefault();\n\n target.focus();\n}\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = findTabbableDescendants;\n/*!\n * Adapted from jQuery UI core\n *\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n */\n\nvar tabbableNode = /input|select|textarea|button|object/;\n\nfunction hidesContents(element) {\n var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;\n\n // If the node is empty, this is good enough\n if (zeroSize && !element.innerHTML) return true;\n\n try {\n // Otherwise we need to check some styles\n var style = window.getComputedStyle(element);\n return zeroSize ? style.getPropertyValue(\"overflow\") !== \"visible\" ||\n // if 'overflow: visible' set, check if there is actually any overflow\n element.scrollWidth <= 0 && element.scrollHeight <= 0 : style.getPropertyValue(\"display\") == \"none\";\n } catch (exception) {\n // eslint-disable-next-line no-console\n console.warn(\"Failed to inspect element style\");\n return false;\n }\n}\n\nfunction visible(element) {\n var parentElement = element;\n var rootNode = element.getRootNode && element.getRootNode();\n while (parentElement) {\n if (parentElement === document.body) break;\n\n // if we are not hidden yet, skip to checking outside the Web Component\n if (rootNode && parentElement === rootNode) parentElement = rootNode.host.parentNode;\n\n if (hidesContents(parentElement)) return false;\n parentElement = parentElement.parentNode;\n }\n return true;\n}\n\nfunction focusable(element, isTabIndexNotNaN) {\n var nodeName = element.nodeName.toLowerCase();\n var res = tabbableNode.test(nodeName) && !element.disabled || (nodeName === \"a\" ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);\n return res && visible(element);\n}\n\nfunction tabbable(element) {\n var tabIndex = element.getAttribute(\"tabindex\");\n if (tabIndex === null) tabIndex = undefined;\n var isTabIndexNaN = isNaN(tabIndex);\n return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN);\n}\n\nfunction findTabbableDescendants(element) {\n var descendants = [].slice.call(element.querySelectorAll(\"*\"), 0).reduce(function (finished, el) {\n return finished.concat(!el.shadowRoot ? [el] : findTabbableDescendants(el.shadowRoot));\n }, []);\n return descendants.filter(tabbable);\n}\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Modal = require(\"./components/Modal\");\n\nvar _Modal2 = _interopRequireDefault(_Modal);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Modal2.default;\nmodule.exports = exports[\"default\"];","import {createElement,Component}from'react';import {findDOMNode}from'react-dom';function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n // Also cover shadowRoot node by checking current.host\n\n\n while (current.parentNode || current.host) {\n // Only check normal node without shadowRoot\n if (current.parentNode && isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode || current.host;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};function autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();var passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = {};\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions.passive = !instance.props.preventDefault;\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n return _temp = _class = /*#__PURE__*/function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a handleClickOutside(event) function for processing outside click events.\");\n };\n\n _this.__getComponentNode = function () {\n var instance = _this.getInstance();\n\n if (config && typeof config.setClickOutsideRef === 'function') {\n return config.setClickOutsideRef()(instance);\n }\n\n if (typeof instance.setClickOutsideRef === 'function') {\n return instance.setClickOutsideRef();\n }\n\n return findDOMNode(instance);\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.componentNode === null) return;\n if (_this.initTimeStamp > event.timeStamp) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.composed && event.composedPath && event.composedPath().shift() || event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_assertThisInitialized(_this), eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_assertThisInitialized(_this), eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n _this.initTimeStamp = performance.now();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (WrappedComponent.prototype && !WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a function for processing outside click events specified by the handleClickOutside config option.\");\n }\n }\n\n this.componentNode = this.__getComponentNode(); // return early so we dont initiate onClickOutside\n\n if (this.props.disableOnClickOutside) return;\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = this.__getComponentNode();\n }\n /**\n * Remove all document's event listeners for this component\n */\n ;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n }\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n ;\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _this$props = this.props;\n _this$props.excludeScrollbar;\n var props = _objectWithoutPropertiesLoose(_this$props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype && WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return createElement(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(Component), _class.displayName = \"OnClickOutside(\" + componentName + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}export default onClickOutsideHOC;export{IGNORE_CLASS_NAME};","import {createElement,Component}from'react';import {findDOMNode}from'react-dom';function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n // Also cover shadowRoot node by checking current.host\n\n\n while (current.parentNode || current.host) {\n // Only check normal node without shadowRoot\n if (current.parentNode && isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode || current.host;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};function autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();var passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = {};\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions.passive = !instance.props.preventDefault;\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n return _temp = _class = /*#__PURE__*/function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a handleClickOutside(event) function for processing outside click events.\");\n };\n\n _this.__getComponentNode = function () {\n var instance = _this.getInstance();\n\n if (config && typeof config.setClickOutsideRef === 'function') {\n return config.setClickOutsideRef()(instance);\n }\n\n if (typeof instance.setClickOutsideRef === 'function') {\n return instance.setClickOutsideRef();\n }\n\n return findDOMNode(instance);\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.componentNode === null) return;\n if (_this.initTimeStamp > event.timeStamp) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.composed && event.composedPath && event.composedPath().shift() || event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_assertThisInitialized(_this), eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_assertThisInitialized(_this), eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n _this.initTimeStamp = performance.now();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (WrappedComponent.prototype && !WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a function for processing outside click events specified by the handleClickOutside config option.\");\n }\n }\n\n this.componentNode = this.__getComponentNode(); // return early so we dont initiate onClickOutside\n\n if (this.props.disableOnClickOutside) return;\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = this.__getComponentNode();\n }\n /**\n * Remove all document's event listeners for this component\n */\n ;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n }\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n ;\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _this$props = this.props;\n _this$props.excludeScrollbar;\n var props = _objectWithoutPropertiesLoose(_this$props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype && WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return createElement(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(Component), _class.displayName = \"OnClickOutside(\" + componentName + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}export default onClickOutsideHOC;export{IGNORE_CLASS_NAME};","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n// As defined on the list of supported events: https://reactjs.org/docs/events.html\nexport var clipboardEvents = ['onCopy', 'onCut', 'onPaste'];\nexport var compositionEvents = [\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n];\nexport var focusEvents = ['onFocus', 'onBlur'];\nexport var formEvents = ['onInput', 'onInvalid', 'onReset', 'onSubmit'];\nexport var imageEvents = ['onLoad', 'onError'];\nexport var keyboardEvents = ['onKeyDown', 'onKeyPress', 'onKeyUp'];\nexport var mediaEvents = [\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onError',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n];\nexport var mouseEvents = [\n 'onClick',\n 'onContextMenu',\n 'onDoubleClick',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n];\nexport var dragEvents = [\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n];\nexport var selectionEvents = ['onSelect'];\nexport var touchEvents = ['onTouchCancel', 'onTouchEnd', 'onTouchMove', 'onTouchStart'];\nexport var pointerEvents = [\n 'onPointerDown',\n 'onPointerMove',\n 'onPointerUp',\n 'onPointerCancel',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerOver',\n 'onPointerOut',\n];\nexport var uiEvents = ['onScroll'];\nexport var wheelEvents = ['onWheel'];\nexport var animationEvents = [\n 'onAnimationStart',\n 'onAnimationEnd',\n 'onAnimationIteration',\n];\nexport var transitionEvents = ['onTransitionEnd'];\nexport var otherEvents = ['onToggle'];\nexport var changeEvents = ['onChange'];\nexport var allEvents = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], clipboardEvents, true), compositionEvents, true), focusEvents, true), formEvents, true), imageEvents, true), keyboardEvents, true), mediaEvents, true), mouseEvents, true), dragEvents, true), selectionEvents, true), touchEvents, true), pointerEvents, true), uiEvents, true), wheelEvents, true), animationEvents, true), transitionEvents, true), changeEvents, true), otherEvents, true);\n/**\n * Returns an object with on-event callback props curried with provided args.\n * @param {Object} props Props passed to a component.\n * @param {Function=} getArgs A function that returns argument(s) on-event callbacks\n * shall be curried with.\n */\nexport default function makeEventProps(props, getArgs) {\n var eventProps = {};\n allEvents.forEach(function (eventName) {\n var eventHandler = props[eventName];\n if (!eventHandler) {\n return;\n }\n if (getArgs) {\n eventProps[eventName] = (function (event) {\n return eventHandler(event, getArgs(eventName));\n });\n }\n else {\n eventProps[eventName] = eventHandler;\n }\n });\n return eventProps;\n}\n","export default function makeCancellablePromise(promise) {\n var isCancelled = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise\n .then(function (value) { return !isCancelled && resolve(value); })\n .catch(function (error) { return !isCancelled && reject(error); });\n });\n return {\n promise: wrappedPromise,\n cancel: function () {\n isCancelled = true;\n },\n };\n}\n","export default function mergeClassNames() {\n return Array.prototype.slice.call(arguments).reduce(function (classList, arg) {\n return classList.concat(arg);\n }, []).filter(function (arg) {\n return typeof arg === 'string';\n }).join(' ');\n}","var isProduction = process.env.NODE_ENV === 'production';\nfunction warning(condition, message) {\n if (!isProduction) {\n if (condition) {\n return;\n }\n\n var text = \"Warning: \" + message;\n\n if (typeof console !== 'undefined') {\n console.warn(text);\n }\n\n try {\n throw Error(text);\n } catch (x) {}\n }\n}\n\nexport default warning;\n","import { createContext } from 'react';\nexport default /*#__PURE__*/createContext(null);","import React from 'react';\nimport PropTypes from 'prop-types';\nexport default function Message(_ref) {\n var children = _ref.children,\n type = _ref.type;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"react-pdf__message react-pdf__message--\".concat(type)\n }, children);\n}\nMessage.propTypes = {\n children: PropTypes.node,\n type: PropTypes.oneOf(['error', 'loading', 'no-data']).isRequired\n};","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\n\n/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport invariant from 'tiny-invariant';\nvar DEFAULT_LINK_REL = 'noopener noreferrer nofollow';\n\nvar LinkService = /*#__PURE__*/function () {\n function LinkService() {\n _classCallCheck(this, LinkService);\n\n this.externalLinkTarget = null;\n this.externalLinkRel = null;\n }\n\n _createClass(LinkService, [{\n key: \"setDocument\",\n value: function setDocument(pdfDocument) {\n this.pdfDocument = pdfDocument;\n }\n }, {\n key: \"setViewer\",\n value: function setViewer(pdfViewer) {\n this.pdfViewer = pdfViewer;\n }\n }, {\n key: \"setExternalLinkRel\",\n value: function setExternalLinkRel(externalLinkRel) {\n this.externalLinkRel = externalLinkRel;\n }\n }, {\n key: \"setExternalLinkTarget\",\n value: function setExternalLinkTarget(externalLinkTarget) {\n this.externalLinkTarget = externalLinkTarget;\n }\n }, {\n key: \"setHistory\",\n value: function setHistory() {}\n }, {\n key: \"pagesCount\",\n get: function get() {\n return this.pdfDocument ? this.pdfDocument.numPages : 0;\n }\n }, {\n key: \"page\",\n get: function get() {\n return this.pdfViewer.currentPageNumber;\n },\n set: function set(value) {\n this.pdfViewer.currentPageNumber = value;\n }\n }, {\n key: \"rotation\",\n get: function get() {\n return 0;\n },\n set: function set(value) {}\n }, {\n key: \"goToDestination\",\n value: function goToDestination(dest) {\n var _this = this;\n\n new Promise(function (resolve) {\n if (typeof dest === 'string') {\n _this.pdfDocument.getDestination(dest).then(resolve);\n } else if (Array.isArray(dest)) {\n resolve(dest);\n } else {\n dest.then(resolve);\n }\n }).then(function (explicitDest) {\n invariant(Array.isArray(explicitDest), \"\\\"\".concat(explicitDest, \"\\\" is not a valid destination array.\"));\n var destRef = explicitDest[0];\n new Promise(function (resolve) {\n if (destRef instanceof Object) {\n _this.pdfDocument.getPageIndex(destRef).then(function (pageIndex) {\n resolve(pageIndex);\n })[\"catch\"](function () {\n invariant(false, \"\\\"\".concat(destRef, \"\\\" is not a valid page reference.\"));\n });\n } else if (typeof destRef === 'number') {\n resolve(destRef);\n } else {\n invariant(false, \"\\\"\".concat(destRef, \"\\\" is not a valid destination reference.\"));\n }\n }).then(function (pageIndex) {\n var pageNumber = pageIndex + 1;\n invariant(pageNumber >= 1 && pageNumber <= _this.pagesCount, \"\\\"\".concat(pageNumber, \"\\\" is not a valid page number.\"));\n\n _this.pdfViewer.scrollPageIntoView({\n dest: dest,\n pageIndex: pageIndex,\n pageNumber: pageNumber\n });\n });\n });\n }\n }, {\n key: \"navigateTo\",\n value: function navigateTo(dest) {\n this.goToDestination(dest);\n }\n }, {\n key: \"goToPage\",\n value: function goToPage() {}\n }, {\n key: \"addLinkAttributes\",\n value: function addLinkAttributes(link, url, newWindow) {\n link.href = url;\n link.rel = this.externalLinkRel || DEFAULT_LINK_REL;\n link.target = newWindow ? '_blank' : this.externalLinkTarget || '';\n }\n }, {\n key: \"getDestinationHash\",\n value: function getDestinationHash() {\n return '#';\n }\n }, {\n key: \"getAnchorUrl\",\n value: function getAnchorUrl() {\n return '#';\n }\n }, {\n key: \"setHash\",\n value: function setHash() {}\n }, {\n key: \"executeNamedAction\",\n value: function executeNamedAction() {}\n }, {\n key: \"cachePageRef\",\n value: function cachePageRef() {}\n }, {\n key: \"isPageVisible\",\n value: function isPageVisible() {\n return true;\n }\n }, {\n key: \"isPageCached\",\n value: function isPageCached() {\n return true;\n }\n }]);\n\n return LinkService;\n}();\n\nexport { LinkService as default };","// As defined in https://github.com/mozilla/pdf.js/blob/d9fac3459609a807be6506fb3441b5da4b154d14/src/shared/util.js#L371-L374\nvar PasswordResponses = {\n NEED_PASSWORD: 1,\n INCORRECT_PASSWORD: 2\n};\nexport default PasswordResponses;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\n/**\n * Checks if we're running in a browser environment.\n */\n\nexport var isBrowser = typeof window !== 'undefined';\n/**\n * Checks whether we're running from a local file system.\n */\n\nexport var isLocalFileSystem = isBrowser && window.location.protocol === 'file:';\n/**\n * Checks whether a variable is defined.\n *\n * @param {*} variable Variable to check\n */\n\nexport function isDefined(variable) {\n return typeof variable !== 'undefined';\n}\n/**\n * Checks whether a variable is defined and not null.\n *\n * @param {*} variable Variable to check\n */\n\nexport function isProvided(variable) {\n return isDefined(variable) && variable !== null;\n}\n/**\n * Checkes whether a variable provided is a string.\n *\n * @param {*} variable Variable to check\n */\n\nexport function isString(variable) {\n return typeof variable === 'string';\n}\n/**\n * Checks whether a variable provided is an ArrayBuffer.\n *\n * @param {*} variable Variable to check\n */\n\nexport function isArrayBuffer(variable) {\n return variable instanceof ArrayBuffer;\n}\n/**\n * Checkes whether a variable provided is a Blob.\n *\n * @param {*} variable Variable to check\n */\n\nexport function isBlob(variable) {\n invariant(isBrowser, 'isBlob can only be used in a browser environment');\n return variable instanceof Blob;\n}\n/**\n * Checkes whether a variable provided is a File.\n *\n * @param {*} variable Variable to check\n */\n\nexport function isFile(variable) {\n invariant(isBrowser, 'isFile can only be used in a browser environment');\n return variable instanceof File;\n}\n/**\n * Checks whether a string provided is a data URI.\n *\n * @param {string} str String to check\n */\n\nexport function isDataURI(str) {\n return isString(str) && /^data:/.test(str);\n}\nexport function dataURItoByteString(dataURI) {\n invariant(isDataURI(dataURI), 'Invalid data URI.');\n\n var _dataURI$split = dataURI.split(','),\n _dataURI$split2 = _slicedToArray(_dataURI$split, 2),\n headersString = _dataURI$split2[0],\n dataString = _dataURI$split2[1];\n\n var headers = headersString.split(';');\n\n if (headers.indexOf('base64') !== -1) {\n return atob(dataString);\n }\n\n return unescape(dataString);\n}\nexport function getPixelRatio() {\n return isBrowser && window.devicePixelRatio || 1;\n}\nvar allowFileAccessFromFilesTip = 'On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.';\nexport function displayCORSWarning() {\n warning(!isLocalFileSystem, \"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. \".concat(allowFileAccessFromFilesTip));\n}\nexport function displayWorkerWarning() {\n warning(!isLocalFileSystem, \"Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. \".concat(allowFileAccessFromFilesTip));\n}\nexport function cancelRunningTask(runningTask) {\n if (runningTask && runningTask.cancel) runningTask.cancel();\n}\nexport function makePageCallback(page, scale) {\n Object.defineProperty(page, 'width', {\n get: function get() {\n return this.view[2] * scale;\n },\n configurable: true\n });\n Object.defineProperty(page, 'height', {\n get: function get() {\n return this.view[3] * scale;\n },\n configurable: true\n });\n Object.defineProperty(page, 'originalWidth', {\n get: function get() {\n return this.view[2];\n },\n configurable: true\n });\n Object.defineProperty(page, 'originalHeight', {\n get: function get() {\n return this.view[3];\n },\n configurable: true\n });\n return page;\n}\nexport function isCancelException(error) {\n return error.name === 'RenderingCancelledException';\n}\nexport function loadFromFile(file) {\n return new Promise(function (resolve, reject) {\n var reader = new FileReader();\n\n reader.onload = function () {\n return resolve(new Uint8Array(reader.result));\n };\n\n reader.onerror = function (event) {\n switch (event.target.error.code) {\n case event.target.error.NOT_FOUND_ERR:\n return reject(new Error('Error while reading a file: File not found.'));\n\n case event.target.error.NOT_READABLE_ERR:\n return reject(new Error('Error while reading a file: File not readable.'));\n\n case event.target.error.SECURITY_ERR:\n return reject(new Error('Error while reading a file: Security error.'));\n\n case event.target.error.ABORT_ERR:\n return reject(new Error('Error while reading a file: Aborted.'));\n\n default:\n return reject(new Error('Error while reading a file.'));\n }\n };\n\n reader.readAsArrayBuffer(file);\n return null;\n });\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport PropTypes from 'prop-types';\nimport { mouseEvents, touchEvents, keyboardEvents } from 'make-event-props';\nimport { isDefined } from './utils';\nimport LinkService from '../LinkService';\nexport var eventProps = function () {\n var result = {};\n [].concat(_toConsumableArray(mouseEvents), _toConsumableArray(touchEvents), _toConsumableArray(keyboardEvents)).forEach(function (eventName) {\n result[eventName] = PropTypes.func;\n });\n return result;\n}();\nvar fileTypes = [PropTypes.string, PropTypes.instanceOf(ArrayBuffer), PropTypes.shape({\n data: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n httpHeaders: PropTypes.object,\n range: PropTypes.object,\n url: PropTypes.string,\n withCredentials: PropTypes.bool\n})];\n\nif (typeof File !== 'undefined') {\n fileTypes.push(PropTypes.instanceOf(File));\n}\n\nif (typeof Blob !== 'undefined') {\n fileTypes.push(PropTypes.instanceOf(Blob));\n}\n\nexport var isClassName = PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]);\nexport var isFile = PropTypes.oneOfType(fileTypes);\nexport var isLinkService = PropTypes.instanceOf(LinkService);\nexport var isLinkTarget = PropTypes.oneOf(['_self', '_blank', '_parent', '_top']);\nexport var isPage = PropTypes.shape({\n _transport: PropTypes.shape({\n fontLoader: PropTypes.object.isRequired\n }).isRequired,\n commonObjs: PropTypes.shape({\n _objs: PropTypes.object.isRequired\n }).isRequired,\n getAnnotations: PropTypes.func.isRequired,\n getTextContent: PropTypes.func.isRequired,\n getViewport: PropTypes.func.isRequired,\n render: PropTypes.func.isRequired\n});\nexport var isPageIndex = function isPageIndex(props, propName, componentName) {\n var pageIndex = props[propName],\n pageNumber = props.pageNumber,\n pdf = props.pdf;\n\n if (!isDefined(pdf)) {\n return null;\n }\n\n if (isDefined(pageIndex)) {\n if (typeof pageIndex !== 'number') {\n return new Error(\"`\".concat(propName, \"` of type `\").concat(_typeof(pageIndex), \"` supplied to `\").concat(componentName, \"`, expected `number`.\"));\n }\n\n if (pageIndex < 0) {\n return new Error(\"Expected `\".concat(propName, \"` to be greater or equal to 0.\"));\n }\n\n var numPages = pdf.numPages;\n\n if (pageIndex + 1 > numPages) {\n return new Error(\"Expected `\".concat(propName, \"` to be less or equal to \").concat(numPages - 1, \".\"));\n }\n } else if (!isDefined(pageNumber)) {\n return new Error(\"`\".concat(propName, \"` not supplied. Either pageIndex or pageNumber must be supplied to `\").concat(componentName, \"`.\"));\n } // Everything is fine\n\n\n return null;\n};\nexport var isPageNumber = function isPageNumber(props, propName, componentName) {\n var pageNumber = props[propName],\n pageIndex = props.pageIndex,\n pdf = props.pdf;\n\n if (!isDefined(pdf)) {\n return null;\n }\n\n if (isDefined(pageNumber)) {\n if (typeof pageNumber !== 'number') {\n return new Error(\"`\".concat(propName, \"` of type `\").concat(_typeof(pageNumber), \"` supplied to `\").concat(componentName, \"`, expected `number`.\"));\n }\n\n if (pageNumber < 1) {\n return new Error(\"Expected `\".concat(propName, \"` to be greater or equal to 1.\"));\n }\n\n var numPages = pdf.numPages;\n\n if (pageNumber > numPages) {\n return new Error(\"Expected `\".concat(propName, \"` to be less or equal to \").concat(numPages, \".\"));\n }\n } else if (!isDefined(pageIndex)) {\n return new Error(\"`\".concat(propName, \"` not supplied. Either pageIndex or pageNumber must be supplied to `\").concat(componentName, \"`.\"));\n } // Everything is fine\n\n\n return null;\n};\nexport var isPdf = PropTypes.oneOfType([PropTypes.shape({\n getDestination: PropTypes.func.isRequired,\n getOutline: PropTypes.func.isRequired,\n getPage: PropTypes.func.isRequired,\n numPages: PropTypes.number.isRequired\n}), PropTypes.bool]);\nexport var isRef = PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.any\n})]);\nexport var isRenderMode = PropTypes.oneOf(['canvas', 'none', 'svg']);\nexport var isRotate = PropTypes.oneOf([0, 90, 180, 270]);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar _excluded = [\"url\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n/**\n * Loads a PDF document. Passes it to all children.\n */\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport makeEventProps from 'make-event-props';\nimport makeCancellable from 'make-cancellable-promise';\nimport mergeClassNames from 'merge-class-names';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport * as pdfjs from 'pdfjs-dist/legacy/build/pdf';\nimport DocumentContext from './DocumentContext';\nimport Message from './Message';\nimport LinkService from './LinkService';\nimport PasswordResponses from './PasswordResponses';\nimport { cancelRunningTask, dataURItoByteString, displayCORSWarning, isArrayBuffer, isBlob, isBrowser, isDataURI, isFile, loadFromFile } from './shared/utils';\nimport { eventProps, isClassName, isFile as isFileProp, isRef } from './shared/propTypes';\nvar PDFDataRangeTransport = pdfjs.PDFDataRangeTransport;\n\nvar Document = /*#__PURE__*/function (_PureComponent) {\n _inherits(Document, _PureComponent);\n\n var _super = _createSuper(Document);\n\n function Document() {\n var _this;\n\n _classCallCheck(this, Document);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n pdf: null\n });\n\n _defineProperty(_assertThisInitialized(_this), \"viewer\", {\n scrollPageIntoView: function scrollPageIntoView(_ref) {\n var dest = _ref.dest,\n pageIndex = _ref.pageIndex,\n pageNumber = _ref.pageNumber;\n // Handling jumping to internal links target\n var onItemClick = _this.props.onItemClick; // First, check if custom handling of onItemClick was provided\n\n if (onItemClick) {\n onItemClick({\n dest: dest,\n pageIndex: pageIndex,\n pageNumber: pageNumber\n });\n return;\n } // If not, try to look for target page within the .\n\n\n var page = _this.pages[pageIndex];\n\n if (page) {\n // Scroll to the page automatically\n page.scrollIntoView();\n return;\n }\n\n warning(false, \"An internal link leading to page \".concat(pageNumber, \" was clicked, but neither was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to and handle navigating by yourself or ensure that all pages are rendered within .\"));\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"linkService\", new LinkService());\n\n _defineProperty(_assertThisInitialized(_this), \"loadDocument\", function () {\n // If another rendering is in progress, let's cancel it\n cancelRunningTask(_this.runningTask); // If another loading is in progress, let's destroy it\n\n if (_this.loadingTask) _this.loadingTask.destroy();\n var cancellable = makeCancellable(_this.findDocumentSource());\n _this.runningTask = cancellable;\n cancellable.promise.then(function (source) {\n _this.onSourceSuccess();\n\n if (!source) {\n return;\n }\n\n _this.setState(function (prevState) {\n if (!prevState.pdf) {\n return null;\n }\n\n return {\n pdf: null\n };\n });\n\n var _this$props = _this.props,\n options = _this$props.options,\n onLoadProgress = _this$props.onLoadProgress,\n onPassword = _this$props.onPassword;\n _this.loadingTask = pdfjs.getDocument(_objectSpread(_objectSpread({}, source), options));\n _this.loadingTask.onPassword = onPassword;\n\n if (onLoadProgress) {\n _this.loadingTask.onProgress = onLoadProgress;\n }\n\n var cancellable = makeCancellable(_this.loadingTask.promise);\n _this.runningTask = cancellable;\n cancellable.promise.then(function (pdf) {\n _this.setState(function (prevState) {\n if (prevState.pdf && prevState.pdf.fingerprint === pdf.fingerprint) {\n return null;\n }\n\n return {\n pdf: pdf\n };\n }, _this.onLoadSuccess);\n })[\"catch\"](function (error) {\n _this.onLoadError(error);\n });\n })[\"catch\"](function (error) {\n _this.onSourceError(error);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setupLinkService\", function () {\n var _this$props2 = _this.props,\n externalLinkRel = _this$props2.externalLinkRel,\n externalLinkTarget = _this$props2.externalLinkTarget;\n\n _this.linkService.setViewer(_this.viewer);\n\n _this.linkService.setExternalLinkRel(externalLinkRel);\n\n _this.linkService.setExternalLinkTarget(externalLinkTarget);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onSourceSuccess\", function () {\n var onSourceSuccess = _this.props.onSourceSuccess;\n if (onSourceSuccess) onSourceSuccess();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onSourceError\", function (error) {\n warning(error);\n var onSourceError = _this.props.onSourceError;\n if (onSourceError) onSourceError(error);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onLoadSuccess\", function () {\n var onLoadSuccess = _this.props.onLoadSuccess;\n var pdf = _this.state.pdf;\n if (onLoadSuccess) onLoadSuccess(pdf);\n _this.pages = new Array(pdf.numPages);\n\n _this.linkService.setDocument(pdf);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onLoadError\", function (error) {\n _this.setState({\n pdf: false\n });\n\n warning(error);\n var onLoadError = _this.props.onLoadError;\n if (onLoadError) onLoadError(error);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"findDocumentSource\", function () {\n return new Promise(function (resolve) {\n var file = _this.props.file;\n\n if (!file) {\n resolve(null);\n } // File is a string\n\n\n if (typeof file === 'string') {\n if (isDataURI(file)) {\n var fileByteString = dataURItoByteString(file);\n resolve({\n data: fileByteString\n });\n }\n\n displayCORSWarning();\n resolve({\n url: file\n });\n } // File is PDFDataRangeTransport\n\n\n if (file instanceof PDFDataRangeTransport) {\n resolve({\n range: file\n });\n } // File is an ArrayBuffer\n\n\n if (isArrayBuffer(file)) {\n resolve({\n data: file\n });\n }\n /**\n * The cases below are browser-only.\n * If you're running on a non-browser environment, these cases will be of no use.\n */\n\n\n if (isBrowser) {\n // File is a Blob\n if (isBlob(file) || isFile(file)) {\n loadFromFile(file).then(function (data) {\n resolve({\n data: data\n });\n });\n return;\n }\n } // At this point, file must be an object\n\n\n invariant(_typeof(file) === 'object', 'Invalid parameter in file, need either Uint8Array, string or a parameter object');\n invariant(file.url || file.data || file.range, 'Invalid parameter object: need either .data, .range or .url'); // File .url is a string\n\n if (typeof file.url === 'string') {\n if (isDataURI(file.url)) {\n var url = file.url,\n otherParams = _objectWithoutProperties(file, _excluded);\n\n var _fileByteString = dataURItoByteString(url);\n\n resolve(_objectSpread({\n data: _fileByteString\n }, otherParams));\n }\n\n displayCORSWarning();\n }\n\n resolve(file);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"registerPage\", function (pageIndex, ref) {\n _this.pages[pageIndex] = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"unregisterPage\", function (pageIndex) {\n delete _this.pages[pageIndex];\n });\n\n return _this;\n }\n\n _createClass(Document, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.loadDocument();\n this.setupLinkService();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var file = this.props.file;\n\n if (file !== prevProps.file) {\n this.loadDocument();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n // If rendering is in progress, let's cancel it\n cancelRunningTask(this.runningTask); // If loading is in progress, let's destroy it\n\n if (this.loadingTask) this.loadingTask.destroy();\n }\n }, {\n key: \"childContext\",\n get: function get() {\n var linkService = this.linkService,\n registerPage = this.registerPage,\n unregisterPage = this.unregisterPage;\n var _this$props3 = this.props,\n imageResourcesPath = _this$props3.imageResourcesPath,\n renderMode = _this$props3.renderMode,\n rotate = _this$props3.rotate;\n var pdf = this.state.pdf;\n return {\n imageResourcesPath: imageResourcesPath,\n linkService: linkService,\n pdf: pdf,\n registerPage: registerPage,\n renderMode: renderMode,\n rotate: rotate,\n unregisterPage: unregisterPage\n };\n }\n }, {\n key: \"eventProps\",\n get: function get() {\n var _this2 = this;\n\n return makeEventProps(this.props, function () {\n return _this2.state.pdf;\n });\n }\n /**\n * Called when a document source is resolved correctly\n */\n\n }, {\n key: \"renderChildren\",\n value: function renderChildren() {\n var children = this.props.children;\n return /*#__PURE__*/React.createElement(DocumentContext.Provider, {\n value: this.childContext\n }, children);\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var file = this.props.file;\n var pdf = this.state.pdf;\n\n if (!file) {\n var noData = this.props.noData;\n return /*#__PURE__*/React.createElement(Message, {\n type: \"no-data\"\n }, typeof noData === 'function' ? noData() : noData);\n }\n\n if (pdf === null) {\n var loading = this.props.loading;\n return /*#__PURE__*/React.createElement(Message, {\n type: \"loading\"\n }, typeof loading === 'function' ? loading() : loading);\n }\n\n if (pdf === false) {\n var error = this.props.error;\n return /*#__PURE__*/React.createElement(Message, {\n type: \"error\"\n }, typeof error === 'function' ? error() : error);\n }\n\n return this.renderChildren();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props4 = this.props,\n className = _this$props4.className,\n inputRef = _this$props4.inputRef;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: mergeClassNames('react-pdf__Document', className),\n ref: inputRef\n }, this.eventProps), this.renderContent());\n }\n }]);\n\n return Document;\n}(PureComponent);\n\nexport { Document as default };\nDocument.defaultProps = {\n error: 'Failed to load PDF file.',\n loading: 'Loading PDF…',\n noData: 'No PDF file specified.',\n onPassword: function onPassword(callback, reason) {\n switch (reason) {\n case PasswordResponses.NEED_PASSWORD:\n {\n // eslint-disable-next-line no-alert\n var password = prompt('Enter the password to open this PDF file.');\n callback(password);\n break;\n }\n\n case PasswordResponses.INCORRECT_PASSWORD:\n {\n // eslint-disable-next-line no-alert\n var _password = prompt('Invalid password. Please try again.');\n\n callback(_password);\n break;\n }\n\n default:\n }\n }\n};\nvar isFunctionOrNode = PropTypes.oneOfType([PropTypes.func, PropTypes.node]);\nDocument.propTypes = _objectSpread(_objectSpread({}, eventProps), {}, {\n children: PropTypes.node,\n className: isClassName,\n error: isFunctionOrNode,\n externalLinkRel: PropTypes.string,\n externalLinkTarget: PropTypes.string,\n file: isFileProp,\n imageResourcesPath: PropTypes.string,\n inputRef: isRef,\n loading: isFunctionOrNode,\n noData: isFunctionOrNode,\n onItemClick: PropTypes.func,\n onLoadError: PropTypes.func,\n onLoadProgress: PropTypes.func,\n onLoadSuccess: PropTypes.func,\n onPassword: PropTypes.func,\n onSourceError: PropTypes.func,\n onSourceSuccess: PropTypes.func,\n rotate: PropTypes.number\n});","import { createContext } from 'react';\nexport default /*#__PURE__*/createContext(null);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\n\nvar Ref = /*#__PURE__*/function () {\n function Ref(_ref) {\n var num = _ref.num,\n gen = _ref.gen;\n\n _classCallCheck(this, Ref);\n\n this.num = num;\n this.gen = gen;\n }\n\n _createClass(Ref, [{\n key: \"toString\",\n value: function toString() {\n var str = \"\".concat(this.num, \"R\");\n\n if (this.gen !== 0) {\n str += this.gen;\n }\n\n return str;\n }\n }]);\n\n return Ref;\n}();\n\nexport { Ref as default };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar _excluded = [\"item\"];\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport DocumentContext from './DocumentContext';\nimport OutlineContext from './OutlineContext';\nimport Ref from './Ref';\nimport { isDefined } from './shared/utils';\nimport { isPdf } from './shared/propTypes';\nexport var OutlineItemInternal = /*#__PURE__*/function (_PureComponent) {\n _inherits(OutlineItemInternal, _PureComponent);\n\n var _super = _createSuper(OutlineItemInternal);\n\n function OutlineItemInternal() {\n var _this;\n\n _classCallCheck(this, OutlineItemInternal);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"getDestination\", function () {\n return new Promise(function (resolve, reject) {\n var _this$props = _this.props,\n item = _this$props.item,\n pdf = _this$props.pdf;\n\n if (!isDefined(_this.destination)) {\n if (typeof item.dest === 'string') {\n pdf.getDestination(item.dest).then(resolve)[\"catch\"](reject);\n } else {\n resolve(item.dest);\n }\n }\n\n return _this.destination;\n }).then(function (destination) {\n _this.destination = destination;\n return destination;\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getPageIndex\", function () {\n return new Promise(function (resolve, reject) {\n var pdf = _this.props.pdf;\n\n if (isDefined(_this.pageIndex)) {\n resolve(_this.pageIndex);\n }\n\n _this.getDestination().then(function (destination) {\n if (!destination) {\n return;\n }\n\n var _destination = _slicedToArray(destination, 1),\n ref = _destination[0];\n\n pdf.getPageIndex(new Ref(ref)).then(resolve)[\"catch\"](reject);\n });\n }).then(function (pageIndex) {\n _this.pageIndex = pageIndex;\n return _this.pageIndex;\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getPageNumber\", function () {\n return new Promise(function (resolve, reject) {\n if (isDefined(_this.pageNumber)) {\n resolve(_this.pageNumber);\n }\n\n _this.getPageIndex().then(function (pageIndex) {\n resolve(pageIndex + 1);\n })[\"catch\"](reject);\n }).then(function (pageNumber) {\n _this.pageNumber = pageNumber;\n return pageNumber;\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n var onClick = _this.props.onClick;\n event.preventDefault();\n\n if (!onClick) {\n return false;\n }\n\n return Promise.all([_this.getDestination(), _this.getPageIndex(), _this.getPageNumber()]).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n dest = _ref2[0],\n pageIndex = _ref2[1],\n pageNumber = _ref2[2];\n\n onClick({\n dest: dest,\n pageIndex: pageIndex,\n pageNumber: pageNumber\n });\n });\n });\n\n return _this;\n }\n\n _createClass(OutlineItemInternal, [{\n key: \"renderSubitems\",\n value: function renderSubitems() {\n var _this$props2 = this.props,\n item = _this$props2.item,\n otherProps = _objectWithoutProperties(_this$props2, _excluded);\n\n if (!item.items || !item.items.length) {\n return null;\n }\n\n var subitems = item.items;\n return /*#__PURE__*/React.createElement(\"ul\", null, subitems.map(function (subitem, subitemIndex) {\n return /*#__PURE__*/React.createElement(OutlineItemInternal, _extends({\n key: typeof subitem.destination === 'string' ? subitem.destination : subitemIndex,\n item: subitem\n }, otherProps));\n }));\n }\n }, {\n key: \"render\",\n value: function render() {\n var item = this.props.item;\n return /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"a\", {\n href: \"#\",\n onClick: this.onClick\n }, item.title), this.renderSubitems());\n }\n }]);\n\n return OutlineItemInternal;\n}(PureComponent);\nvar isDestination = PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.any)]);\nOutlineItemInternal.propTypes = {\n item: PropTypes.shape({\n dest: isDestination,\n items: PropTypes.arrayOf(PropTypes.shape({\n dest: isDestination,\n title: PropTypes.string\n })),\n title: PropTypes.string\n }).isRequired,\n onClick: PropTypes.func,\n pdf: isPdf.isRequired\n};\n\nvar OutlineItem = function OutlineItem(props) {\n return /*#__PURE__*/React.createElement(DocumentContext.Consumer, null, function (documentContext) {\n return /*#__PURE__*/React.createElement(OutlineContext.Consumer, null, function (outlineContext) {\n return /*#__PURE__*/React.createElement(OutlineItemInternal, _extends({}, documentContext, outlineContext, props));\n });\n });\n};\n\nexport default OutlineItem;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport makeCancellable from 'make-cancellable-promise';\nimport makeEventProps from 'make-event-props';\nimport mergeClassNames from 'merge-class-names';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport DocumentContext from './DocumentContext';\nimport OutlineContext from './OutlineContext';\nimport OutlineItem from './OutlineItem';\nimport { cancelRunningTask } from './shared/utils';\nimport { eventProps, isClassName, isPdf, isRef } from './shared/propTypes';\nexport var OutlineInternal = /*#__PURE__*/function (_PureComponent) {\n _inherits(OutlineInternal, _PureComponent);\n\n var _super = _createSuper(OutlineInternal);\n\n function OutlineInternal() {\n var _this;\n\n _classCallCheck(this, OutlineInternal);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n outline: null\n });\n\n _defineProperty(_assertThisInitialized(_this), \"loadOutline\", function () {\n var pdf = _this.props.pdf;\n\n _this.setState(function (prevState) {\n if (!prevState.outline) {\n return null;\n }\n\n return {\n outline: null\n };\n });\n\n var cancellable = makeCancellable(pdf.getOutline());\n _this.runningTask = cancellable;\n cancellable.promise.then(function (outline) {\n _this.setState({\n outline: outline\n }, _this.onLoadSuccess);\n })[\"catch\"](function (error) {\n _this.onLoadError(error);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onLoadSuccess\", function () {\n var onLoadSuccess = _this.props.onLoadSuccess;\n var outline = _this.state.outline;\n if (onLoadSuccess) onLoadSuccess(outline);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onLoadError\", function (error) {\n _this.setState({\n outline: false\n });\n\n warning(error);\n var onLoadError = _this.props.onLoadError;\n if (onLoadError) onLoadError(error);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onItemClick\", function (_ref) {\n var dest = _ref.dest,\n pageIndex = _ref.pageIndex,\n pageNumber = _ref.pageNumber;\n var onItemClick = _this.props.onItemClick;\n\n if (onItemClick) {\n onItemClick({\n dest: dest,\n pageIndex: pageIndex,\n pageNumber: pageNumber\n });\n }\n });\n\n return _this;\n }\n\n _createClass(OutlineInternal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var pdf = this.props.pdf;\n invariant(pdf, 'Attempted to load an outline, but no document was specified.');\n this.loadOutline();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var pdf = this.props.pdf;\n\n if (prevProps.pdf && pdf !== prevProps.pdf) {\n this.loadOutline();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n cancelRunningTask(this.runningTask);\n }\n }, {\n key: \"childContext\",\n get: function get() {\n return {\n onClick: this.onItemClick\n };\n }\n }, {\n key: \"eventProps\",\n get: function get() {\n var _this2 = this;\n\n return makeEventProps(this.props, function () {\n return _this2.state.outline;\n });\n }\n /**\n * Called when an outline is read successfully\n */\n\n }, {\n key: \"renderOutline\",\n value: function renderOutline() {\n var outline = this.state.outline;\n return /*#__PURE__*/React.createElement(\"ul\", null, outline.map(function (item, itemIndex) {\n return /*#__PURE__*/React.createElement(OutlineItem, {\n key: typeof item.destination === 'string' ? item.destination : itemIndex,\n item: item\n });\n }));\n }\n }, {\n key: \"render\",\n value: function render() {\n var pdf = this.props.pdf;\n var outline = this.state.outline;\n\n if (!pdf || !outline) {\n return null;\n }\n\n var _this$props = this.props,\n className = _this$props.className,\n inputRef = _this$props.inputRef;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: mergeClassNames('react-pdf__Outline', className),\n ref: inputRef\n }, this.eventProps), /*#__PURE__*/React.createElement(OutlineContext.Provider, {\n value: this.childContext\n }, this.renderOutline()));\n }\n }]);\n\n return OutlineInternal;\n}(PureComponent);\nOutlineInternal.propTypes = _objectSpread({\n className: isClassName,\n inputRef: isRef,\n onItemClick: PropTypes.func,\n onLoadError: PropTypes.func,\n onLoadSuccess: PropTypes.func,\n pdf: isPdf\n}, eventProps);\n\nfunction Outline(props, ref) {\n return /*#__PURE__*/React.createElement(DocumentContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(OutlineInternal, _extends({\n ref: ref\n }, context, props));\n });\n}\n\nexport default /*#__PURE__*/React.forwardRef(Outline);","/**\n * A function that merges React refs into one.\n * Supports both functions and ref objects created using createRef() and useRef().\n *\n * Usage:\n * ```tsx\n *
\n * ```\n *\n * @param {(React.Ref | undefined)[]} inputRefs Array of refs\n * @returns {React.Ref | React.RefCallback} Merged refs\n */\nexport default function mergeRefs() {\n var inputRefs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n inputRefs[_i] = arguments[_i];\n }\n var filteredInputRefs = inputRefs.filter(Boolean);\n if (filteredInputRefs.length <= 1) {\n var firstRef = filteredInputRefs[0];\n return firstRef || null;\n }\n return function mergedRefs(ref) {\n filteredInputRefs.forEach(function (inputRef) {\n if (typeof inputRef === 'function') {\n inputRef(ref);\n }\n else if (inputRef) {\n inputRef.current = ref;\n }\n });\n };\n}\n","import { createContext } from 'react';\nexport default /*#__PURE__*/createContext(null);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nimport React, { createRef, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport mergeRefs from 'merge-refs';\nimport warning from 'tiny-warning';\nimport * as pdfjs from 'pdfjs-dist/legacy/build/pdf';\nimport PageContext from '../PageContext';\nimport { getPixelRatio, isCancelException, makePageCallback } from '../shared/utils';\nimport { isPage, isRef, isRotate } from '../shared/propTypes';\nvar ANNOTATION_MODE = pdfjs.AnnotationMode;\nexport var PageCanvasInternal = /*#__PURE__*/function (_PureComponent) {\n _inherits(PageCanvasInternal, _PureComponent);\n\n var _super = _createSuper(PageCanvasInternal);\n\n function PageCanvasInternal() {\n var _this;\n\n _classCallCheck(this, PageCanvasInternal);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"canvasElement\", /*#__PURE__*/createRef());\n\n _defineProperty(_assertThisInitialized(_this), \"onRenderSuccess\", function () {\n _this.renderer = null;\n var _this$props = _this.props,\n onRenderSuccess = _this$props.onRenderSuccess,\n page = _this$props.page,\n scale = _this$props.scale;\n if (onRenderSuccess) onRenderSuccess(makePageCallback(page, scale));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onRenderError\", function (error) {\n if (isCancelException(error)) {\n return;\n }\n\n warning(error);\n var onRenderError = _this.props.onRenderError;\n if (onRenderError) onRenderError(error);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"drawPageOnCanvas\", function () {\n var canvas = _this.canvasElement.current;\n\n if (!canvas) {\n return null;\n }\n\n var _assertThisInitialize = _assertThisInitialized(_this),\n renderViewport = _assertThisInitialize.renderViewport,\n viewport = _assertThisInitialize.viewport;\n\n var _this$props2 = _this.props,\n canvasBackground = _this$props2.canvasBackground,\n page = _this$props2.page,\n renderForms = _this$props2.renderForms;\n canvas.width = renderViewport.width;\n canvas.height = renderViewport.height;\n canvas.style.width = \"\".concat(Math.floor(viewport.width), \"px\");\n canvas.style.height = \"\".concat(Math.floor(viewport.height), \"px\");\n var renderContext = {\n annotationMode: renderForms ? ANNOTATION_MODE.ENABLE_FORMS : ANNOTATION_MODE.ENABLE,\n\n get canvasContext() {\n return canvas.getContext('2d');\n },\n\n viewport: renderViewport\n };\n\n if (canvasBackground) {\n renderContext.background = canvasBackground;\n } // If another render is in progress, let's cancel it\n\n\n _this.cancelRenderingTask();\n\n _this.renderer = page.render(renderContext);\n return _this.renderer.promise.then(_this.onRenderSuccess)[\"catch\"](_this.onRenderError);\n });\n\n return _this;\n }\n\n _createClass(PageCanvasInternal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.drawPageOnCanvas();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props3 = this.props,\n canvasBackground = _this$props3.canvasBackground,\n page = _this$props3.page,\n renderForms = _this$props3.renderForms;\n\n if (canvasBackground !== prevProps.canvasBackground || renderForms !== prevProps.renderForms) {\n // Ensures the canvas will be re-rendered from scratch. Otherwise all form data will stay.\n page.cleanup();\n this.drawPageOnCanvas();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelRenderingTask();\n var canvas = this.canvasElement.current;\n /**\n * Zeroing the width and height cause most browsers to release graphics\n * resources immediately, which can greatly reduce memory consumption.\n */\n\n if (canvas) {\n canvas.width = 0;\n canvas.height = 0;\n }\n }\n }, {\n key: \"cancelRenderingTask\",\n value: function cancelRenderingTask() {\n if (this.renderer) {\n this.renderer.cancel();\n this.renderer = null;\n }\n }\n /**\n * Called when a page is rendered successfully.\n */\n\n }, {\n key: \"renderViewport\",\n get: function get() {\n var _this$props4 = this.props,\n page = _this$props4.page,\n rotate = _this$props4.rotate,\n scale = _this$props4.scale;\n var pixelRatio = getPixelRatio();\n return page.getViewport({\n scale: scale * pixelRatio,\n rotation: rotate\n });\n }\n }, {\n key: \"viewport\",\n get: function get() {\n var _this$props5 = this.props,\n page = _this$props5.page,\n rotate = _this$props5.rotate,\n scale = _this$props5.scale;\n return page.getViewport({\n scale: scale,\n rotation: rotate\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var canvasRef = this.props.canvasRef;\n return /*#__PURE__*/React.createElement(\"canvas\", {\n className: \"react-pdf__Page__canvas\",\n dir: \"ltr\",\n ref: mergeRefs(canvasRef, this.canvasElement),\n style: {\n display: 'block',\n userSelect: 'none'\n }\n });\n }\n }]);\n\n return PageCanvasInternal;\n}(PureComponent);\nPageCanvasInternal.propTypes = {\n canvasBackground: PropTypes.string,\n canvasRef: isRef,\n onRenderError: PropTypes.func,\n onRenderSuccess: PropTypes.func,\n page: isPage.isRequired,\n renderForms: PropTypes.bool,\n rotate: isRotate,\n scale: PropTypes.number.isRequired\n};\nexport default function PageCanvas(props) {\n return /*#__PURE__*/React.createElement(PageContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(PageCanvasInternal, _extends({}, context, props));\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport warning from 'tiny-warning';\nimport * as pdfjs from 'pdfjs-dist/legacy/build/pdf';\nimport PageContext from '../PageContext';\nimport { isCancelException, makePageCallback } from '../shared/utils';\nimport { isPage, isRotate } from '../shared/propTypes';\nexport var PageSVGInternal = /*#__PURE__*/function (_PureComponent) {\n _inherits(PageSVGInternal, _PureComponent);\n\n var _super = _createSuper(PageSVGInternal);\n\n function PageSVGInternal() {\n var _this;\n\n _classCallCheck(this, PageSVGInternal);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n svg: null\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onRenderSuccess\", function () {\n _this.renderer = null;\n var _this$props = _this.props,\n onRenderSuccess = _this$props.onRenderSuccess,\n page = _this$props.page,\n scale = _this$props.scale;\n if (onRenderSuccess) onRenderSuccess(makePageCallback(page, scale));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onRenderError\", function (error) {\n if (isCancelException(error)) {\n return;\n }\n\n warning(error);\n var onRenderError = _this.props.onRenderError;\n if (onRenderError) onRenderError(error);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"renderSVG\", function () {\n var page = _this.props.page;\n _this.renderer = page.getOperatorList();\n return _this.renderer.then(function (operatorList) {\n var svgGfx = new pdfjs.SVGGraphics(page.commonObjs, page.objs);\n _this.renderer = svgGfx.getSVG(operatorList, _this.viewport).then(function (svg) {\n _this.setState({\n svg: svg\n }, _this.onRenderSuccess);\n })[\"catch\"](_this.onRenderError);\n })[\"catch\"](_this.onRenderError);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"drawPageOnContainer\", function (element) {\n var svg = _this.state.svg;\n\n if (!element || !svg) {\n return;\n } // Append SVG element to the main container, if this hasn't been done already\n\n\n if (!element.firstElementChild) {\n element.appendChild(svg);\n }\n\n var _this$viewport = _this.viewport,\n width = _this$viewport.width,\n height = _this$viewport.height;\n svg.setAttribute('width', width);\n svg.setAttribute('height', height);\n });\n\n return _this;\n }\n\n _createClass(PageSVGInternal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.renderSVG();\n }\n /**\n * Called when a page is rendered successfully.\n */\n\n }, {\n key: \"viewport\",\n get: function get() {\n var _this$props2 = this.props,\n page = _this$props2.page,\n rotate = _this$props2.rotate,\n scale = _this$props2.scale;\n return page.getViewport({\n scale: scale,\n rotation: rotate\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$viewport2 = this.viewport,\n width = _this$viewport2.width,\n height = _this$viewport2.height;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"react-pdf__Page__svg\" // Note: This cannot be shortened, as we need this function to be called with each render.\n ,\n ref: function ref(_ref) {\n return _this2.drawPageOnContainer(_ref);\n },\n style: {\n display: 'block',\n backgroundColor: 'white',\n overflow: 'hidden',\n width: width,\n height: height,\n userSelect: 'none'\n }\n });\n }\n }]);\n\n return PageSVGInternal;\n}(PureComponent);\nPageSVGInternal.propTypes = {\n onRenderError: PropTypes.func,\n onRenderSuccess: PropTypes.func,\n page: isPage.isRequired,\n rotate: isRotate,\n scale: PropTypes.number.isRequired\n};\nexport default function PageSVG(props) {\n return /*#__PURE__*/React.createElement(PageContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(PageSVGInternal, _extends({}, context, props));\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nimport React, { createRef, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport PageContext from '../PageContext';\nimport { isPage, isRotate } from '../shared/propTypes';\nexport var TextLayerItemInternal = /*#__PURE__*/function (_PureComponent) {\n _inherits(TextLayerItemInternal, _PureComponent);\n\n var _super = _createSuper(TextLayerItemInternal);\n\n function TextLayerItemInternal() {\n var _this;\n\n _classCallCheck(this, TextLayerItemInternal);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"itemElement\", /*#__PURE__*/createRef());\n\n _defineProperty(_assertThisInitialized(_this), \"getElementWidth\", function (element) {\n var _assertThisInitialize = _assertThisInitialized(_this),\n sideways = _assertThisInitialize.sideways;\n\n return element.getBoundingClientRect()[sideways ? 'height' : 'width'];\n });\n\n return _this;\n }\n\n _createClass(TextLayerItemInternal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.alignTextItem();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.alignTextItem();\n }\n }, {\n key: \"unrotatedViewport\",\n get: function get() {\n var _this$props = this.props,\n page = _this$props.page,\n scale = _this$props.scale;\n return page.getViewport({\n scale: scale\n });\n }\n /**\n * It might happen that the page is rotated by default. In such cases, we shouldn't rotate\n * text content.\n */\n\n }, {\n key: \"rotate\",\n get: function get() {\n var _this$props2 = this.props,\n page = _this$props2.page,\n rotate = _this$props2.rotate;\n return rotate - page.rotate;\n }\n }, {\n key: \"sideways\",\n get: function get() {\n var rotate = this.rotate;\n return rotate % 180 !== 0;\n }\n }, {\n key: \"defaultSideways\",\n get: function get() {\n var rotation = this.unrotatedViewport.rotation;\n return rotation % 180 !== 0;\n }\n }, {\n key: \"fontSize\",\n get: function get() {\n var transform = this.props.transform;\n var defaultSideways = this.defaultSideways;\n\n var _transform = _slicedToArray(transform, 2),\n fontHeightPx = _transform[0],\n fontWidthPx = _transform[1];\n\n return defaultSideways ? fontWidthPx : fontHeightPx;\n }\n }, {\n key: \"top\",\n get: function get() {\n var transform = this.props.transform;\n var viewport = this.unrotatedViewport,\n defaultSideways = this.defaultSideways;\n\n var _transform2 = _slicedToArray(transform, 6),\n\n /* fontHeightPx */\n\n /* fontWidthPx */\n offsetX = _transform2[2],\n offsetY = _transform2[3],\n x = _transform2[4],\n y = _transform2[5];\n\n var _viewport$viewBox = _slicedToArray(viewport.viewBox, 4),\n\n /* xMin */\n yMin\n /* xMax */\n = _viewport$viewBox[1],\n yMax = _viewport$viewBox[3];\n\n return defaultSideways ? x + offsetX + yMin : yMax - (y + offsetY);\n }\n }, {\n key: \"left\",\n get: function get() {\n var transform = this.props.transform;\n var viewport = this.unrotatedViewport,\n defaultSideways = this.defaultSideways;\n\n var _transform3 = _slicedToArray(transform, 6),\n\n /* fontHeightPx */\n\n /* fontWidthPx */\n\n /* offsetX */\n\n /* offsetY */\n x = _transform3[4],\n y = _transform3[5];\n\n var _viewport$viewBox2 = _slicedToArray(viewport.viewBox, 1),\n xMin = _viewport$viewBox2[0];\n\n return defaultSideways ? y - xMin : x - xMin;\n }\n }, {\n key: \"getFontData\",\n value: function getFontData(fontName) {\n var page = this.props.page;\n return new Promise(function (resolve) {\n page.commonObjs.get(fontName, resolve);\n });\n }\n }, {\n key: \"alignTextItem\",\n value: function alignTextItem() {\n var _this2 = this;\n\n var element = this.itemElement.current;\n\n if (!element) {\n return;\n }\n\n element.style.transform = '';\n var _this$props3 = this.props,\n fontName = _this$props3.fontName,\n scale = _this$props3.scale,\n width = _this$props3.width;\n element.style.fontFamily = \"\".concat(fontName, \", sans-serif\");\n this.getFontData(fontName).then(function (fontData) {\n var fallbackFontName = fontData ? fontData.fallbackName : 'sans-serif';\n element.style.fontFamily = \"\".concat(fontName, \", \").concat(fallbackFontName);\n var targetWidth = width * scale;\n\n var actualWidth = _this2.getElementWidth(element);\n\n var transform = \"scaleX(\".concat(targetWidth / actualWidth, \")\");\n var ascent = fontData ? fontData.ascent : 0;\n\n if (ascent) {\n transform += \" translateY(\".concat((1 - ascent) * 100, \"%)\");\n }\n\n element.style.transform = transform;\n element.style.WebkitTransform = transform;\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var fontSize = this.fontSize,\n top = this.top,\n left = this.left;\n var _this$props4 = this.props,\n customTextRenderer = _this$props4.customTextRenderer,\n scale = _this$props4.scale,\n text = _this$props4.str;\n return /*#__PURE__*/React.createElement(\"span\", {\n ref: this.itemElement,\n style: {\n height: '1em',\n fontFamily: 'sans-serif',\n fontSize: \"\".concat(fontSize * scale, \"px\"),\n position: 'absolute',\n top: \"\".concat(top * scale, \"px\"),\n left: \"\".concat(left * scale, \"px\"),\n transformOrigin: 'left bottom',\n whiteSpace: 'pre',\n pointerEvents: 'all'\n }\n }, customTextRenderer ? customTextRenderer(this.props) : text);\n }\n }]);\n\n return TextLayerItemInternal;\n}(PureComponent);\nTextLayerItemInternal.propTypes = {\n customTextRenderer: PropTypes.func,\n fontName: PropTypes.string.isRequired,\n itemIndex: PropTypes.number.isRequired,\n page: isPage.isRequired,\n rotate: isRotate,\n scale: PropTypes.number,\n str: PropTypes.string.isRequired,\n transform: PropTypes.arrayOf(PropTypes.number).isRequired,\n width: PropTypes.number.isRequired\n};\nexport default function TextLayerItem(props) {\n return /*#__PURE__*/React.createElement(PageContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(TextLayerItemInternal, _extends({}, context, props));\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport makeCancellable from 'make-cancellable-promise';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport PageContext from '../PageContext';\nimport TextLayerItem from './TextLayerItem';\nimport { cancelRunningTask } from '../shared/utils';\nimport { isPage, isRotate } from '../shared/propTypes';\nexport var TextLayerInternal = /*#__PURE__*/function (_PureComponent) {\n _inherits(TextLayerInternal, _PureComponent);\n\n var _super = _createSuper(TextLayerInternal);\n\n function TextLayerInternal() {\n var _this;\n\n _classCallCheck(this, TextLayerInternal);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n textItems: null\n });\n\n _defineProperty(_assertThisInitialized(_this), \"loadTextItems\", function () {\n var page = _this.props.page;\n var cancellable = makeCancellable(page.getTextContent());\n _this.runningTask = cancellable;\n cancellable.promise.then(function (_ref) {\n var textItems = _ref.items;\n\n _this.setState({\n textItems: textItems\n }, _this.onLoadSuccess);\n })[\"catch\"](function (error) {\n _this.onLoadError(error);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onLoadSuccess\", function () {\n var onGetTextSuccess = _this.props.onGetTextSuccess;\n var textItems = _this.state.textItems;\n if (onGetTextSuccess) onGetTextSuccess(textItems);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onLoadError\", function (error) {\n _this.setState({\n textItems: false\n });\n\n warning(error);\n var onGetTextError = _this.props.onGetTextError;\n if (onGetTextError) onGetTextError(error);\n });\n\n return _this;\n }\n\n _createClass(TextLayerInternal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var page = this.props.page;\n invariant(page, 'Attempted to load page text content, but no page was specified.');\n this.loadTextItems();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var page = this.props.page;\n\n if (prevProps.page && page !== prevProps.page) {\n this.loadTextItems();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n cancelRunningTask(this.runningTask);\n }\n }, {\n key: \"unrotatedViewport\",\n get: function get() {\n var _this$props = this.props,\n page = _this$props.page,\n scale = _this$props.scale;\n return page.getViewport({\n scale: scale\n });\n }\n /**\n * It might happen that the page is rotated by default. In such cases, we shouldn't rotate\n * text content.\n */\n\n }, {\n key: \"rotate\",\n get: function get() {\n var _this$props2 = this.props,\n page = _this$props2.page,\n rotate = _this$props2.rotate;\n return rotate - page.rotate;\n }\n }, {\n key: \"renderTextItems\",\n value: function renderTextItems() {\n var textItems = this.state.textItems;\n\n if (!textItems) {\n return null;\n }\n\n return textItems.map(function (textItem, itemIndex) {\n return /*#__PURE__*/React.createElement(TextLayerItem // eslint-disable-next-line react/no-array-index-key\n , _extends({\n key: itemIndex,\n itemIndex: itemIndex\n }, textItem));\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var viewport = this.unrotatedViewport,\n rotate = this.rotate;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"react-pdf__Page__textContent\",\n style: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n width: \"\".concat(viewport.width, \"px\"),\n height: \"\".concat(viewport.height, \"px\"),\n color: 'transparent',\n transform: \"translate(-50%, -50%) rotate(\".concat(rotate, \"deg)\"),\n WebkitTransform: \"translate(-50%, -50%) rotate(\".concat(rotate, \"deg)\"),\n pointerEvents: 'none'\n }\n }, this.renderTextItems());\n }\n }]);\n\n return TextLayerInternal;\n}(PureComponent);\nTextLayerInternal.propTypes = {\n onGetTextError: PropTypes.func,\n onGetTextSuccess: PropTypes.func,\n page: isPage.isRequired,\n rotate: isRotate,\n scale: PropTypes.number\n};\nexport default function TextLayer(props) {\n return /*#__PURE__*/React.createElement(PageContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(TextLayerInternal, _extends({}, context, props));\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nimport React, { createRef, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport makeCancellable from 'make-cancellable-promise';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport * as pdfjs from 'pdfjs-dist/legacy/build/pdf';\nimport DocumentContext from '../DocumentContext';\nimport PageContext from '../PageContext';\nimport { cancelRunningTask } from '../shared/utils';\nimport { isLinkService, isPage, isRotate } from '../shared/propTypes';\nexport var AnnotationLayerInternal = /*#__PURE__*/function (_PureComponent) {\n _inherits(AnnotationLayerInternal, _PureComponent);\n\n var _super = _createSuper(AnnotationLayerInternal);\n\n function AnnotationLayerInternal() {\n var _this;\n\n _classCallCheck(this, AnnotationLayerInternal);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n annotations: null\n });\n\n _defineProperty(_assertThisInitialized(_this), \"layerElement\", /*#__PURE__*/createRef());\n\n _defineProperty(_assertThisInitialized(_this), \"loadAnnotations\", function () {\n var page = _this.props.page;\n var cancellable = makeCancellable(page.getAnnotations());\n _this.runningTask = cancellable;\n cancellable.promise.then(function (annotations) {\n _this.setState({\n annotations: annotations\n }, _this.onLoadSuccess);\n })[\"catch\"](function (error) {\n _this.onLoadError(error);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onLoadSuccess\", function () {\n var onGetAnnotationsSuccess = _this.props.onGetAnnotationsSuccess;\n var annotations = _this.state.annotations;\n if (onGetAnnotationsSuccess) onGetAnnotationsSuccess(annotations);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onLoadError\", function (error) {\n _this.setState({\n annotations: false\n });\n\n warning(error);\n var onGetAnnotationsError = _this.props.onGetAnnotationsError;\n if (onGetAnnotationsError) onGetAnnotationsError(error);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onRenderSuccess\", function () {\n var onRenderAnnotationLayerSuccess = _this.props.onRenderAnnotationLayerSuccess;\n if (onRenderAnnotationLayerSuccess) onRenderAnnotationLayerSuccess();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onRenderError\", function (error) {\n warning(error);\n var onRenderAnnotationLayerError = _this.props.onRenderAnnotationLayerError;\n if (onRenderAnnotationLayerError) onRenderAnnotationLayerError(error);\n });\n\n return _this;\n }\n\n _createClass(AnnotationLayerInternal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var page = this.props.page;\n invariant(page, 'Attempted to load page annotations, but no page was specified.');\n this.loadAnnotations();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props = this.props,\n page = _this$props.page,\n renderForms = _this$props.renderForms;\n\n if (prevProps.page && page !== prevProps.page || renderForms !== prevProps.renderForms) {\n this.loadAnnotations();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n cancelRunningTask(this.runningTask);\n }\n }, {\n key: \"viewport\",\n get: function get() {\n var _this$props2 = this.props,\n page = _this$props2.page,\n rotate = _this$props2.rotate,\n scale = _this$props2.scale;\n return page.getViewport({\n scale: scale,\n rotation: rotate\n });\n }\n }, {\n key: \"renderAnnotationLayer\",\n value: function renderAnnotationLayer() {\n var annotations = this.state.annotations;\n\n if (!annotations) {\n return;\n }\n\n var _this$props3 = this.props,\n imageResourcesPath = _this$props3.imageResourcesPath,\n linkService = _this$props3.linkService,\n page = _this$props3.page,\n renderForms = _this$props3.renderForms;\n var viewport = this.viewport.clone({\n dontFlip: true\n });\n var parameters = {\n annotations: annotations,\n div: this.layerElement.current,\n imageResourcesPath: imageResourcesPath,\n linkService: linkService,\n page: page,\n renderForms: renderForms,\n viewport: viewport\n };\n this.layerElement.current.innerHTML = '';\n\n try {\n pdfjs.AnnotationLayer.render(parameters);\n this.onRenderSuccess();\n } catch (error) {\n this.onRenderError(error);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"react-pdf__Page__annotations annotationLayer\",\n ref: this.layerElement\n }, this.renderAnnotationLayer());\n }\n }]);\n\n return AnnotationLayerInternal;\n}(PureComponent);\nAnnotationLayerInternal.propTypes = {\n imageResourcesPath: PropTypes.string,\n linkService: isLinkService.isRequired,\n onGetAnnotationsError: PropTypes.func,\n onGetAnnotationsSuccess: PropTypes.func,\n onRenderAnnotationLayerError: PropTypes.func,\n onRenderAnnotationLayerSuccess: PropTypes.func,\n page: isPage,\n renderForms: PropTypes.bool,\n rotate: isRotate,\n scale: PropTypes.number\n};\n\nvar AnnotationLayer = function AnnotationLayer(props) {\n return /*#__PURE__*/React.createElement(DocumentContext.Consumer, null, function (documentContext) {\n return /*#__PURE__*/React.createElement(PageContext.Consumer, null, function (pageContext) {\n return /*#__PURE__*/React.createElement(AnnotationLayerInternal, _extends({}, documentContext, pageContext, props));\n });\n });\n};\n\nexport default AnnotationLayer;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nimport React, { createRef, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport makeCancellable from 'make-cancellable-promise';\nimport makeEventProps from 'make-event-props';\nimport mergeClassNames from 'merge-class-names';\nimport mergeRefs from 'merge-refs';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport DocumentContext from './DocumentContext';\nimport PageContext from './PageContext';\nimport Message from './Message';\nimport PageCanvas from './Page/PageCanvas';\nimport PageSVG from './Page/PageSVG';\nimport TextLayer from './Page/TextLayer';\nimport AnnotationLayer from './Page/AnnotationLayer';\nimport { cancelRunningTask, isProvided, makePageCallback } from './shared/utils';\nimport { eventProps, isClassName, isPageIndex, isPageNumber, isPdf, isRef, isRenderMode, isRotate } from './shared/propTypes';\nvar defaultScale = 1;\nexport var PageInternal = /*#__PURE__*/function (_PureComponent) {\n _inherits(PageInternal, _PureComponent);\n\n var _super = _createSuper(PageInternal);\n\n function PageInternal() {\n var _this;\n\n _classCallCheck(this, PageInternal);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n page: null\n });\n\n _defineProperty(_assertThisInitialized(_this), \"pageElement\", /*#__PURE__*/createRef());\n\n _defineProperty(_assertThisInitialized(_this), \"onLoadSuccess\", function () {\n var _this$props = _this.props,\n onLoadSuccess = _this$props.onLoadSuccess,\n registerPage = _this$props.registerPage;\n var page = _this.state.page;\n if (onLoadSuccess) onLoadSuccess(makePageCallback(page, _this.scale));\n if (registerPage) registerPage(_this.pageIndex, _this.pageElement.current);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onLoadError\", function (error) {\n _this.setState({\n page: false\n });\n\n warning(error);\n var onLoadError = _this.props.onLoadError;\n if (onLoadError) onLoadError(error);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"loadPage\", function () {\n var pdf = _this.props.pdf;\n\n var pageNumber = _this.getPageNumber();\n\n if (!pageNumber) {\n return;\n }\n\n _this.setState(function (prevState) {\n if (!prevState.page) {\n return null;\n }\n\n return {\n page: null\n };\n });\n\n var cancellable = makeCancellable(pdf.getPage(pageNumber));\n _this.runningTask = cancellable;\n cancellable.promise.then(function (page) {\n _this.setState({\n page: page\n }, _this.onLoadSuccess);\n })[\"catch\"](function (error) {\n _this.onLoadError(error);\n });\n });\n\n return _this;\n }\n\n _createClass(PageInternal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var pdf = this.props.pdf;\n invariant(pdf, 'Attempted to load a page, but no document was specified.');\n this.loadPage();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var pdf = this.props.pdf;\n\n if (prevProps.pdf && pdf !== prevProps.pdf || this.getPageNumber() !== this.getPageNumber(prevProps)) {\n var unregisterPage = this.props.unregisterPage;\n if (unregisterPage) unregisterPage(this.getPageIndex(prevProps));\n this.loadPage();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var unregisterPage = this.props.unregisterPage;\n if (unregisterPage) unregisterPage(this.pageIndex);\n cancelRunningTask(this.runningTask);\n }\n }, {\n key: \"childContext\",\n get: function get() {\n var page = this.state.page;\n\n if (!page) {\n return {};\n }\n\n var _this$props2 = this.props,\n canvasBackground = _this$props2.canvasBackground,\n customTextRenderer = _this$props2.customTextRenderer,\n onGetAnnotationsError = _this$props2.onGetAnnotationsError,\n onGetAnnotationsSuccess = _this$props2.onGetAnnotationsSuccess,\n onGetTextError = _this$props2.onGetTextError,\n onGetTextSuccess = _this$props2.onGetTextSuccess,\n onRenderAnnotationLayerError = _this$props2.onRenderAnnotationLayerError,\n onRenderAnnotationLayerSuccess = _this$props2.onRenderAnnotationLayerSuccess,\n onRenderError = _this$props2.onRenderError,\n onRenderSuccess = _this$props2.onRenderSuccess,\n renderForms = _this$props2.renderForms,\n renderInteractiveForms = _this$props2.renderInteractiveForms;\n return {\n canvasBackground: canvasBackground,\n customTextRenderer: customTextRenderer,\n onGetAnnotationsError: onGetAnnotationsError,\n onGetAnnotationsSuccess: onGetAnnotationsSuccess,\n onGetTextError: onGetTextError,\n onGetTextSuccess: onGetTextSuccess,\n onRenderAnnotationLayerError: onRenderAnnotationLayerError,\n onRenderAnnotationLayerSuccess: onRenderAnnotationLayerSuccess,\n onRenderError: onRenderError,\n onRenderSuccess: onRenderSuccess,\n page: page,\n renderForms: renderForms !== null && renderForms !== void 0 ? renderForms : renderInteractiveForms,\n // For backward compatibility\n rotate: this.rotate,\n scale: this.scale\n };\n }\n /**\n * Called when a page is loaded successfully\n */\n\n }, {\n key: \"getPageIndex\",\n value: function getPageIndex() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n\n if (isProvided(props.pageNumber)) {\n return props.pageNumber - 1;\n }\n\n if (isProvided(props.pageIndex)) {\n return props.pageIndex;\n }\n\n return null;\n }\n }, {\n key: \"getPageNumber\",\n value: function getPageNumber() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n\n if (isProvided(props.pageNumber)) {\n return props.pageNumber;\n }\n\n if (isProvided(props.pageIndex)) {\n return props.pageIndex + 1;\n }\n\n return null;\n }\n }, {\n key: \"pageIndex\",\n get: function get() {\n return this.getPageIndex();\n }\n }, {\n key: \"pageNumber\",\n get: function get() {\n return this.getPageNumber();\n }\n }, {\n key: \"rotate\",\n get: function get() {\n var rotate = this.props.rotate;\n\n if (isProvided(rotate)) {\n return rotate;\n }\n\n var page = this.state.page;\n\n if (!page) {\n return null;\n }\n\n return page.rotate;\n }\n }, {\n key: \"scale\",\n get: function get() {\n var page = this.state.page;\n\n if (!page) {\n return null;\n }\n\n var _this$props3 = this.props,\n scale = _this$props3.scale,\n width = _this$props3.width,\n height = _this$props3.height;\n var rotate = this.rotate; // Be default, we'll render page at 100% * scale width.\n\n var pageScale = 1; // Passing scale explicitly null would cause the page not to render\n\n var scaleWithDefault = scale === null ? defaultScale : scale; // If width/height is defined, calculate the scale of the page so it could be of desired width.\n\n if (width || height) {\n var viewport = page.getViewport({\n scale: 1,\n rotation: rotate\n });\n pageScale = width ? width / viewport.width : height / viewport.height;\n }\n\n return scaleWithDefault * pageScale;\n }\n }, {\n key: \"eventProps\",\n get: function get() {\n var _this2 = this;\n\n return makeEventProps(this.props, function () {\n var page = _this2.state.page;\n\n if (!page) {\n return page;\n }\n\n return makePageCallback(page, _this2.scale);\n });\n }\n }, {\n key: \"pageKey\",\n get: function get() {\n var page = this.state.page;\n return \"\".concat(page.pageIndex, \"@\").concat(this.scale, \"/\").concat(this.rotate);\n }\n }, {\n key: \"pageKeyNoScale\",\n get: function get() {\n var page = this.state.page;\n return \"\".concat(page.pageIndex, \"/\").concat(this.rotate);\n }\n }, {\n key: \"renderMainLayer\",\n value: function renderMainLayer() {\n var _this$props4 = this.props,\n canvasRef = _this$props4.canvasRef,\n renderMode = _this$props4.renderMode;\n\n switch (renderMode) {\n case 'none':\n return null;\n\n case 'svg':\n return /*#__PURE__*/React.createElement(PageSVG, {\n key: \"\".concat(this.pageKeyNoScale, \"_svg\")\n });\n\n case 'canvas':\n default:\n return /*#__PURE__*/React.createElement(PageCanvas, {\n key: \"\".concat(this.pageKey, \"_canvas\"),\n canvasRef: canvasRef\n });\n }\n }\n }, {\n key: \"renderTextLayer\",\n value: function renderTextLayer() {\n var renderTextLayer = this.props.renderTextLayer;\n\n if (!renderTextLayer) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(TextLayer, {\n key: \"\".concat(this.pageKey, \"_text\")\n });\n }\n }, {\n key: \"renderAnnotationLayer\",\n value: function renderAnnotationLayer() {\n var renderAnnotationLayer = this.props.renderAnnotationLayer;\n\n if (!renderAnnotationLayer) {\n return null;\n }\n /**\n * As of now, PDF.js 2.0.943 returns warnings on unimplemented annotations in SVG mode.\n * Therefore, as a fallback, we render \"traditional\" AnnotationLayer component.\n */\n\n\n return /*#__PURE__*/React.createElement(AnnotationLayer, {\n key: \"\".concat(this.pageKey, \"_annotations\")\n });\n }\n }, {\n key: \"renderChildren\",\n value: function renderChildren() {\n var children = this.props.children;\n return /*#__PURE__*/React.createElement(PageContext.Provider, {\n value: this.childContext\n }, this.renderMainLayer(), this.renderTextLayer(), this.renderAnnotationLayer(), children);\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var pageNumber = this.pageNumber;\n var pdf = this.props.pdf;\n var page = this.state.page;\n\n if (!pageNumber) {\n var noData = this.props.noData;\n return /*#__PURE__*/React.createElement(Message, {\n type: \"no-data\"\n }, typeof noData === 'function' ? noData() : noData);\n }\n\n if (pdf === null || page === null) {\n var loading = this.props.loading;\n return /*#__PURE__*/React.createElement(Message, {\n type: \"loading\"\n }, typeof loading === 'function' ? loading() : loading);\n }\n\n if (pdf === false || page === false) {\n var error = this.props.error;\n return /*#__PURE__*/React.createElement(Message, {\n type: \"error\"\n }, typeof error === 'function' ? error() : error);\n }\n\n return this.renderChildren();\n }\n }, {\n key: \"render\",\n value: function render() {\n var pageNumber = this.pageNumber;\n var _this$props5 = this.props,\n className = _this$props5.className,\n inputRef = _this$props5.inputRef;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: mergeClassNames('react-pdf__Page', className),\n \"data-page-number\": pageNumber,\n ref: mergeRefs(inputRef, this.pageElement),\n style: {\n position: 'relative'\n }\n }, this.eventProps), this.renderContent());\n }\n }]);\n\n return PageInternal;\n}(PureComponent);\nPageInternal.defaultProps = {\n error: 'Failed to load the page.',\n loading: 'Loading page…',\n noData: 'No page specified.',\n renderAnnotationLayer: true,\n renderForms: false,\n renderMode: 'canvas',\n renderTextLayer: true,\n scale: defaultScale\n};\nvar isFunctionOrNode = PropTypes.oneOfType([PropTypes.func, PropTypes.node]);\nPageInternal.propTypes = _objectSpread(_objectSpread({}, eventProps), {}, {\n canvasBackground: PropTypes.string,\n children: PropTypes.node,\n className: isClassName,\n customTextRenderer: PropTypes.func,\n error: isFunctionOrNode,\n height: PropTypes.number,\n imageResourcesPath: PropTypes.string,\n inputRef: isRef,\n loading: isFunctionOrNode,\n noData: isFunctionOrNode,\n onGetTextError: PropTypes.func,\n onGetTextSuccess: PropTypes.func,\n onLoadError: PropTypes.func,\n onLoadSuccess: PropTypes.func,\n onRenderError: PropTypes.func,\n onRenderSuccess: PropTypes.func,\n pageIndex: isPageIndex,\n pageNumber: isPageNumber,\n pdf: isPdf,\n registerPage: PropTypes.func,\n renderAnnotationLayer: PropTypes.bool,\n renderForms: PropTypes.bool,\n renderInteractiveForms: PropTypes.bool,\n // For backward compatibility\n renderMode: isRenderMode,\n renderTextLayer: PropTypes.bool,\n rotate: isRotate,\n scale: PropTypes.number,\n unregisterPage: PropTypes.func,\n width: PropTypes.number\n});\n\nfunction Page(props, ref) {\n return /*#__PURE__*/React.createElement(DocumentContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(PageInternal, _extends({\n ref: ref\n }, context, props));\n });\n}\n\nexport default /*#__PURE__*/React.forwardRef(Page);","import * as pdfjs from 'pdfjs-dist/legacy/build/pdf';\nimport Document from './Document';\nimport Outline from './Outline';\nimport Page from './Page';\nimport { displayWorkerWarning } from './shared/utils';\ndisplayWorkerWarning();\npdfjs.GlobalWorkerOptions.workerSrc = 'pdf.worker.js';\nexport { pdfjs, Document, Outline, Page };","import _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport * as React from 'react';\nimport createContext from '@hypnosphi/create-react-context';\nexport var ManagerReferenceNodeContext = createContext();\nexport var ManagerReferenceNodeSetterContext = createContext();\n\nvar Manager =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Manager, _React$Component);\n\n function Manager() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"referenceNode\", void 0);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"setReferenceNode\", function (newReferenceNode) {\n if (newReferenceNode && _this.referenceNode !== newReferenceNode) {\n _this.referenceNode = newReferenceNode;\n\n _this.forceUpdate();\n }\n });\n\n return _this;\n }\n\n var _proto = Manager.prototype;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.referenceNode = null;\n };\n\n _proto.render = function render() {\n return React.createElement(ManagerReferenceNodeContext.Provider, {\n value: this.referenceNode\n }, React.createElement(ManagerReferenceNodeSetterContext.Provider, {\n value: this.setReferenceNode\n }, this.props.children));\n };\n\n return Manager;\n}(React.Component);\n\nexport { Manager as default };","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport deepEqual from \"deep-equal\";\nimport * as React from 'react';\nimport PopperJS from 'popper.js';\nimport { ManagerReferenceNodeContext } from './Manager';\nimport { unwrapArray, setRef, shallowEqual } from './utils';\nvar initialStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n opacity: 0,\n pointerEvents: 'none'\n};\nvar initialArrowStyle = {};\nexport var InnerPopper =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(InnerPopper, _React$Component);\n\n function InnerPopper() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"state\", {\n data: undefined,\n placement: undefined\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"popperInstance\", void 0);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"popperNode\", null);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"arrowNode\", null);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"setPopperNode\", function (popperNode) {\n if (!popperNode || _this.popperNode === popperNode) return;\n setRef(_this.props.innerRef, popperNode);\n _this.popperNode = popperNode;\n\n _this.updatePopperInstance();\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"setArrowNode\", function (arrowNode) {\n _this.arrowNode = arrowNode;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"updateStateModifier\", {\n enabled: true,\n order: 900,\n fn: function fn(data) {\n var placement = data.placement;\n\n _this.setState({\n data: data,\n placement: placement\n });\n\n return data;\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getOptions\", function () {\n return {\n placement: _this.props.placement,\n eventsEnabled: _this.props.eventsEnabled,\n positionFixed: _this.props.positionFixed,\n modifiers: _extends({}, _this.props.modifiers, {\n arrow: _extends({}, _this.props.modifiers && _this.props.modifiers.arrow, {\n enabled: !!_this.arrowNode,\n element: _this.arrowNode\n }),\n applyStyle: {\n enabled: false\n },\n updateStateModifier: _this.updateStateModifier\n })\n };\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getPopperStyle\", function () {\n return !_this.popperNode || !_this.state.data ? initialStyle : _extends({\n position: _this.state.data.offsets.popper.position\n }, _this.state.data.styles);\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getPopperPlacement\", function () {\n return !_this.state.data ? undefined : _this.state.placement;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getArrowStyle\", function () {\n return !_this.arrowNode || !_this.state.data ? initialArrowStyle : _this.state.data.arrowStyles;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getOutOfBoundariesState\", function () {\n return _this.state.data ? _this.state.data.hide : undefined;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"destroyPopperInstance\", function () {\n if (!_this.popperInstance) return;\n\n _this.popperInstance.destroy();\n\n _this.popperInstance = null;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"updatePopperInstance\", function () {\n _this.destroyPopperInstance();\n\n var _assertThisInitialize = _assertThisInitialized(_assertThisInitialized(_this)),\n popperNode = _assertThisInitialize.popperNode;\n\n var referenceElement = _this.props.referenceElement;\n if (!referenceElement || !popperNode) return;\n _this.popperInstance = new PopperJS(referenceElement, popperNode, _this.getOptions());\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"scheduleUpdate\", function () {\n if (_this.popperInstance) {\n _this.popperInstance.scheduleUpdate();\n }\n });\n\n return _this;\n }\n\n var _proto = InnerPopper.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // If the Popper.js options have changed, update the instance (destroy + create)\n if (this.props.placement !== prevProps.placement || this.props.referenceElement !== prevProps.referenceElement || this.props.positionFixed !== prevProps.positionFixed || !deepEqual(this.props.modifiers, prevProps.modifiers, {\n strict: true\n })) {\n // develop only check that modifiers isn't being updated needlessly\n if (process.env.NODE_ENV === \"development\") {\n if (this.props.modifiers !== prevProps.modifiers && this.props.modifiers != null && prevProps.modifiers != null && shallowEqual(this.props.modifiers, prevProps.modifiers)) {\n console.warn(\"'modifiers' prop reference updated even though all values appear the same.\\nConsider memoizing the 'modifiers' object to avoid needless rendering.\");\n }\n }\n\n this.updatePopperInstance();\n } else if (this.props.eventsEnabled !== prevProps.eventsEnabled && this.popperInstance) {\n this.props.eventsEnabled ? this.popperInstance.enableEventListeners() : this.popperInstance.disableEventListeners();\n } // A placement difference in state means popper determined a new placement\n // apart from the props value. By the time the popper element is rendered with\n // the new position Popper has already measured it, if the place change triggers\n // a size change it will result in a misaligned popper. So we schedule an update to be sure.\n\n\n if (prevState.placement !== this.state.placement) {\n this.scheduleUpdate();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n setRef(this.props.innerRef, null);\n this.destroyPopperInstance();\n };\n\n _proto.render = function render() {\n return unwrapArray(this.props.children)({\n ref: this.setPopperNode,\n style: this.getPopperStyle(),\n placement: this.getPopperPlacement(),\n outOfBoundaries: this.getOutOfBoundariesState(),\n scheduleUpdate: this.scheduleUpdate,\n arrowProps: {\n ref: this.setArrowNode,\n style: this.getArrowStyle()\n }\n });\n };\n\n return InnerPopper;\n}(React.Component);\n\n_defineProperty(InnerPopper, \"defaultProps\", {\n placement: 'bottom',\n eventsEnabled: true,\n referenceElement: undefined,\n positionFixed: false\n});\n\nvar placements = PopperJS.placements;\nexport { placements };\nexport default function Popper(_ref) {\n var referenceElement = _ref.referenceElement,\n props = _objectWithoutPropertiesLoose(_ref, [\"referenceElement\"]);\n\n return React.createElement(ManagerReferenceNodeContext.Consumer, null, function (referenceNode) {\n return React.createElement(InnerPopper, _extends({\n referenceElement: referenceElement !== undefined ? referenceElement : referenceNode\n }, props));\n });\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport * as React from 'react';\nimport warning from 'warning';\nimport { ManagerReferenceNodeSetterContext } from './Manager';\nimport { safeInvoke, unwrapArray, setRef } from './utils';\n\nvar InnerReference =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(InnerReference, _React$Component);\n\n function InnerReference() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"refHandler\", function (node) {\n setRef(_this.props.innerRef, node);\n safeInvoke(_this.props.setReferenceNode, node);\n });\n\n return _this;\n }\n\n var _proto = InnerReference.prototype;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n setRef(this.props.innerRef, null);\n };\n\n _proto.render = function render() {\n warning(Boolean(this.props.setReferenceNode), '`Reference` should not be used outside of a `Manager` component.');\n return unwrapArray(this.props.children)({\n ref: this.refHandler\n });\n };\n\n return InnerReference;\n}(React.Component);\n\nexport default function Reference(props) {\n return React.createElement(ManagerReferenceNodeSetterContext.Consumer, null, function (setReferenceNode) {\n return React.createElement(InnerReference, _extends({\n setReferenceNode: setReferenceNode\n }, props));\n });\n}","/**\n * Takes an argument and if it's an array, returns the first item in the array,\n * otherwise returns the argument. Used for Preact compatibility.\n */\nexport var unwrapArray = function unwrapArray(arg) {\n return Array.isArray(arg) ? arg[0] : arg;\n};\n/**\n * Takes a maybe-undefined function and arbitrary args and invokes the function\n * only if it is defined.\n */\n\nexport var safeInvoke = function safeInvoke(fn) {\n if (typeof fn === \"function\") {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return fn.apply(void 0, args);\n }\n};\n/**\n * Does a shallow equality check of two objects by comparing the reference\n * equality of each value.\n */\n\nexport var shallowEqual = function shallowEqual(objA, objB) {\n var aKeys = Object.keys(objA);\n var bKeys = Object.keys(objB);\n\n if (bKeys.length !== aKeys.length) {\n return false;\n }\n\n for (var i = 0; i < bKeys.length; i++) {\n var key = aKeys[i];\n\n if (objA[key] !== objB[key]) {\n return false;\n }\n }\n\n return true;\n};\n/**\n * Sets a ref using either a ref callback or a ref object\n */\n\nexport var setRef = function setRef(ref, node) {\n // if its a function call it\n if (typeof ref === \"function\") {\n return safeInvoke(ref, node);\n } // otherwise we should treat it as a ref object\n else if (ref != null) {\n ref.current = node;\n }\n};","import * as React from 'react';\n\n/**\n * Takes an argument and if it's an array, returns the first item in the array,\n * otherwise returns the argument. Used for Preact compatibility.\n */\nexport var unwrapArray = function unwrapArray(arg) {\n return Array.isArray(arg) ? arg[0] : arg;\n};\n/**\n * Takes a maybe-undefined function and arbitrary args and invokes the function\n * only if it is defined.\n */\n\nexport var safeInvoke = function safeInvoke(fn) {\n if (typeof fn === 'function') {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return fn.apply(void 0, args);\n }\n};\n/**\n * Sets a ref using either a ref callback or a ref object\n */\n\nexport var setRef = function setRef(ref, node) {\n // if its a function call it\n if (typeof ref === 'function') {\n return safeInvoke(ref, node);\n } // otherwise we should treat it as a ref object\n else if (ref != null) {\n ref.current = node;\n }\n};\n/**\n * Simple ponyfill for Object.fromEntries\n */\n\nexport var fromEntries = function fromEntries(entries) {\n return entries.reduce(function (acc, _ref) {\n var key = _ref[0],\n value = _ref[1];\n acc[key] = value;\n return acc;\n }, {});\n};\n/**\n * Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs\n */\n\nexport var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createPopper as defaultCreatePopper } from '@popperjs/core';\nimport isEqual from 'react-fast-compare';\nimport { fromEntries, useIsomorphicLayoutEffect } from './utils';\nvar EMPTY_MODIFIERS = [];\nexport var usePopper = function usePopper(referenceElement, popperElement, options) {\n if (options === void 0) {\n options = {};\n }\n\n var prevOptions = React.useRef(null);\n var optionsWithDefaults = {\n onFirstUpdate: options.onFirstUpdate,\n placement: options.placement || 'bottom',\n strategy: options.strategy || 'absolute',\n modifiers: options.modifiers || EMPTY_MODIFIERS\n };\n\n var _React$useState = React.useState({\n styles: {\n popper: {\n position: optionsWithDefaults.strategy,\n left: '0',\n top: '0'\n },\n arrow: {\n position: 'absolute'\n }\n },\n attributes: {}\n }),\n state = _React$useState[0],\n setState = _React$useState[1];\n\n var updateStateModifier = React.useMemo(function () {\n return {\n name: 'updateState',\n enabled: true,\n phase: 'write',\n fn: function fn(_ref) {\n var state = _ref.state;\n var elements = Object.keys(state.elements);\n ReactDOM.flushSync(function () {\n setState({\n styles: fromEntries(elements.map(function (element) {\n return [element, state.styles[element] || {}];\n })),\n attributes: fromEntries(elements.map(function (element) {\n return [element, state.attributes[element]];\n }))\n });\n });\n },\n requires: ['computeStyles']\n };\n }, []);\n var popperOptions = React.useMemo(function () {\n var newOptions = {\n onFirstUpdate: optionsWithDefaults.onFirstUpdate,\n placement: optionsWithDefaults.placement,\n strategy: optionsWithDefaults.strategy,\n modifiers: [].concat(optionsWithDefaults.modifiers, [updateStateModifier, {\n name: 'applyStyles',\n enabled: false\n }])\n };\n\n if (isEqual(prevOptions.current, newOptions)) {\n return prevOptions.current || newOptions;\n } else {\n prevOptions.current = newOptions;\n return newOptions;\n }\n }, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]);\n var popperInstanceRef = React.useRef();\n useIsomorphicLayoutEffect(function () {\n if (popperInstanceRef.current) {\n popperInstanceRef.current.setOptions(popperOptions);\n }\n }, [popperOptions]);\n useIsomorphicLayoutEffect(function () {\n if (referenceElement == null || popperElement == null) {\n return;\n }\n\n var createPopper = options.createPopper || defaultCreatePopper;\n var popperInstance = createPopper(referenceElement, popperElement, popperOptions);\n popperInstanceRef.current = popperInstance;\n return function () {\n popperInstance.destroy();\n popperInstanceRef.current = null;\n };\n }, [referenceElement, popperElement, options.createPopper]);\n return {\n state: popperInstanceRef.current ? popperInstanceRef.current.state : null,\n styles: state.styles,\n attributes: state.attributes,\n update: popperInstanceRef.current ? popperInstanceRef.current.update : null,\n forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null\n };\n};","import * as React from 'react';\nexport var ManagerReferenceNodeContext = React.createContext();\nexport var ManagerReferenceNodeSetterContext = React.createContext();\nexport function Manager(_ref) {\n var children = _ref.children;\n\n var _React$useState = React.useState(null),\n referenceNode = _React$useState[0],\n setReferenceNode = _React$useState[1];\n\n var hasUnmounted = React.useRef(false);\n React.useEffect(function () {\n return function () {\n hasUnmounted.current = true;\n };\n }, []);\n var handleSetReferenceNode = React.useCallback(function (node) {\n if (!hasUnmounted.current) {\n setReferenceNode(node);\n }\n }, []);\n return /*#__PURE__*/React.createElement(ManagerReferenceNodeContext.Provider, {\n value: referenceNode\n }, /*#__PURE__*/React.createElement(ManagerReferenceNodeSetterContext.Provider, {\n value: handleSetReferenceNode\n }, children));\n}","import * as React from 'react';\n\n/**\n * Takes an argument and if it's an array, returns the first item in the array,\n * otherwise returns the argument. Used for Preact compatibility.\n */\nexport var unwrapArray = function unwrapArray(arg) {\n return Array.isArray(arg) ? arg[0] : arg;\n};\n/**\n * Takes a maybe-undefined function and arbitrary args and invokes the function\n * only if it is defined.\n */\n\nexport var safeInvoke = function safeInvoke(fn) {\n if (typeof fn === 'function') {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return fn.apply(void 0, args);\n }\n};\n/**\n * Sets a ref using either a ref callback or a ref object\n */\n\nexport var setRef = function setRef(ref, node) {\n // if its a function call it\n if (typeof ref === 'function') {\n return safeInvoke(ref, node);\n } // otherwise we should treat it as a ref object\n else if (ref != null) {\n ref.current = node;\n }\n};\n/**\n * Simple ponyfill for Object.fromEntries\n */\n\nexport var fromEntries = function fromEntries(entries) {\n return entries.reduce(function (acc, _ref) {\n var key = _ref[0],\n value = _ref[1];\n acc[key] = value;\n return acc;\n }, {});\n};\n/**\n * Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs\n */\n\nexport var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createPopper as defaultCreatePopper } from '@popperjs/core';\nimport isEqual from 'react-fast-compare';\nimport { fromEntries, useIsomorphicLayoutEffect } from './utils';\nvar EMPTY_MODIFIERS = [];\nexport var usePopper = function usePopper(referenceElement, popperElement, options) {\n if (options === void 0) {\n options = {};\n }\n\n var prevOptions = React.useRef(null);\n var optionsWithDefaults = {\n onFirstUpdate: options.onFirstUpdate,\n placement: options.placement || 'bottom',\n strategy: options.strategy || 'absolute',\n modifiers: options.modifiers || EMPTY_MODIFIERS\n };\n\n var _React$useState = React.useState({\n styles: {\n popper: {\n position: optionsWithDefaults.strategy,\n left: '0',\n top: '0'\n },\n arrow: {\n position: 'absolute'\n }\n },\n attributes: {}\n }),\n state = _React$useState[0],\n setState = _React$useState[1];\n\n var updateStateModifier = React.useMemo(function () {\n return {\n name: 'updateState',\n enabled: true,\n phase: 'write',\n fn: function fn(_ref) {\n var state = _ref.state;\n var elements = Object.keys(state.elements);\n ReactDOM.flushSync(function () {\n setState({\n styles: fromEntries(elements.map(function (element) {\n return [element, state.styles[element] || {}];\n })),\n attributes: fromEntries(elements.map(function (element) {\n return [element, state.attributes[element]];\n }))\n });\n });\n },\n requires: ['computeStyles']\n };\n }, []);\n var popperOptions = React.useMemo(function () {\n var newOptions = {\n onFirstUpdate: optionsWithDefaults.onFirstUpdate,\n placement: optionsWithDefaults.placement,\n strategy: optionsWithDefaults.strategy,\n modifiers: [].concat(optionsWithDefaults.modifiers, [updateStateModifier, {\n name: 'applyStyles',\n enabled: false\n }])\n };\n\n if (isEqual(prevOptions.current, newOptions)) {\n return prevOptions.current || newOptions;\n } else {\n prevOptions.current = newOptions;\n return newOptions;\n }\n }, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]);\n var popperInstanceRef = React.useRef();\n useIsomorphicLayoutEffect(function () {\n if (popperInstanceRef.current) {\n popperInstanceRef.current.setOptions(popperOptions);\n }\n }, [popperOptions]);\n useIsomorphicLayoutEffect(function () {\n if (referenceElement == null || popperElement == null) {\n return;\n }\n\n var createPopper = options.createPopper || defaultCreatePopper;\n var popperInstance = createPopper(referenceElement, popperElement, popperOptions);\n popperInstanceRef.current = popperInstance;\n return function () {\n popperInstance.destroy();\n popperInstanceRef.current = null;\n };\n }, [referenceElement, popperElement, options.createPopper]);\n return {\n state: popperInstanceRef.current ? popperInstanceRef.current.state : null,\n styles: state.styles,\n attributes: state.attributes,\n update: popperInstanceRef.current ? popperInstanceRef.current.update : null,\n forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null\n };\n};","import * as React from 'react';\nimport { ManagerReferenceNodeContext } from './Manager';\nimport { unwrapArray, setRef } from './utils';\nimport { usePopper } from './usePopper';\n\nvar NOOP = function NOOP() {\n return void 0;\n};\n\nvar NOOP_PROMISE = function NOOP_PROMISE() {\n return Promise.resolve(null);\n};\n\nvar EMPTY_MODIFIERS = [];\nexport function Popper(_ref) {\n var _ref$placement = _ref.placement,\n placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,\n _ref$strategy = _ref.strategy,\n strategy = _ref$strategy === void 0 ? 'absolute' : _ref$strategy,\n _ref$modifiers = _ref.modifiers,\n modifiers = _ref$modifiers === void 0 ? EMPTY_MODIFIERS : _ref$modifiers,\n referenceElement = _ref.referenceElement,\n onFirstUpdate = _ref.onFirstUpdate,\n innerRef = _ref.innerRef,\n children = _ref.children;\n var referenceNode = React.useContext(ManagerReferenceNodeContext);\n\n var _React$useState = React.useState(null),\n popperElement = _React$useState[0],\n setPopperElement = _React$useState[1];\n\n var _React$useState2 = React.useState(null),\n arrowElement = _React$useState2[0],\n setArrowElement = _React$useState2[1];\n\n React.useEffect(function () {\n setRef(innerRef, popperElement);\n }, [innerRef, popperElement]);\n var options = React.useMemo(function () {\n return {\n placement: placement,\n strategy: strategy,\n onFirstUpdate: onFirstUpdate,\n modifiers: [].concat(modifiers, [{\n name: 'arrow',\n enabled: arrowElement != null,\n options: {\n element: arrowElement\n }\n }])\n };\n }, [placement, strategy, onFirstUpdate, modifiers, arrowElement]);\n\n var _usePopper = usePopper(referenceElement || referenceNode, popperElement, options),\n state = _usePopper.state,\n styles = _usePopper.styles,\n forceUpdate = _usePopper.forceUpdate,\n update = _usePopper.update;\n\n var childrenProps = React.useMemo(function () {\n return {\n ref: setPopperElement,\n style: styles.popper,\n placement: state ? state.placement : placement,\n hasPopperEscaped: state && state.modifiersData.hide ? state.modifiersData.hide.hasPopperEscaped : null,\n isReferenceHidden: state && state.modifiersData.hide ? state.modifiersData.hide.isReferenceHidden : null,\n arrowProps: {\n style: styles.arrow,\n ref: setArrowElement\n },\n forceUpdate: forceUpdate || NOOP,\n update: update || NOOP_PROMISE\n };\n }, [setPopperElement, setArrowElement, placement, state, styles, update, forceUpdate]);\n return unwrapArray(children)(childrenProps);\n}","import * as React from 'react';\nimport warning from 'warning';\nimport { ManagerReferenceNodeSetterContext } from './Manager';\nimport { safeInvoke, unwrapArray, setRef } from './utils';\nexport function Reference(_ref) {\n var children = _ref.children,\n innerRef = _ref.innerRef;\n var setReferenceNode = React.useContext(ManagerReferenceNodeSetterContext);\n var refHandler = React.useCallback(function (node) {\n setRef(innerRef, node);\n safeInvoke(setReferenceNode, node);\n }, [innerRef, setReferenceNode]); // ran on unmount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n\n React.useEffect(function () {\n return function () {\n return setRef(innerRef, null);\n };\n }, []);\n React.useEffect(function () {\n warning(Boolean(setReferenceNode), '`Reference` should not be used outside of a `Manager` component.');\n }, [setReferenceNode]);\n return unwrapArray(children)({\n ref: refHandler\n });\n}","\"use strict\";\n/*\nReact-Quill\nhttps://github.com/zenoamaro/react-quill\n*/\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar react_1 = __importDefault(require(\"react\"));\nvar react_dom_1 = __importDefault(require(\"react-dom\"));\nvar isEqual_1 = __importDefault(require(\"lodash/isEqual\"));\nvar quill_1 = __importDefault(require(\"quill\"));\nvar ReactQuill = /** @class */ (function (_super) {\n __extends(ReactQuill, _super);\n function ReactQuill(props) {\n var _this = _super.call(this, props) || this;\n /*\n Changing one of these props should cause a full re-render and a\n re-instantiation of the Quill editor.\n */\n _this.dirtyProps = [\n 'modules',\n 'formats',\n 'bounds',\n 'theme',\n 'children',\n ];\n /*\n Changing one of these props should cause a regular update. These are mostly\n props that act on the container, rather than the quillized editing area.\n */\n _this.cleanProps = [\n 'id',\n 'className',\n 'style',\n 'placeholder',\n 'tabIndex',\n 'onChange',\n 'onChangeSelection',\n 'onFocus',\n 'onBlur',\n 'onKeyPress',\n 'onKeyDown',\n 'onKeyUp',\n ];\n _this.state = {\n generation: 0,\n };\n /*\n Tracks the internal selection of the Quill editor\n */\n _this.selection = null;\n _this.onEditorChange = function (eventName, rangeOrDelta, oldRangeOrDelta, source) {\n var _a, _b, _c, _d;\n if (eventName === 'text-change') {\n (_b = (_a = _this).onEditorChangeText) === null || _b === void 0 ? void 0 : _b.call(_a, _this.editor.root.innerHTML, rangeOrDelta, source, _this.unprivilegedEditor);\n }\n else if (eventName === 'selection-change') {\n (_d = (_c = _this).onEditorChangeSelection) === null || _d === void 0 ? void 0 : _d.call(_c, rangeOrDelta, source, _this.unprivilegedEditor);\n }\n };\n var value = _this.isControlled() ? props.value : props.defaultValue;\n _this.value = (value !== null && value !== void 0 ? value : '');\n return _this;\n }\n ReactQuill.prototype.validateProps = function (props) {\n var _a;\n if (react_1.default.Children.count(props.children) > 1)\n throw new Error('The Quill editing area can only be composed of a single React element.');\n if (react_1.default.Children.count(props.children)) {\n var child = react_1.default.Children.only(props.children);\n if (((_a = child) === null || _a === void 0 ? void 0 : _a.type) === 'textarea')\n throw new Error('Quill does not support editing on a