{"version":3,"file":"static/js/shared.e9320d5be44d9756.js","sources":["webpack://kuika-sample-react-app/../../node_modules/@emotion/hash/dist/hash.browser.esm.js","webpack://kuika-sample-react-app/../../node_modules/@emotion/unitless/dist/unitless.browser.esm.js","webpack://kuika-sample-react-app/../../node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js","webpack://kuika-sample-react-app/../../node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js","webpack://kuika-sample-react-app/../../node_modules/@jridgewell/set-array/dist/set-array.umd.js","webpack://kuika-sample-react-app/../../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js","webpack://kuika-sample-react-app/../../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/utils/queueMicroTask.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/utils/freeze.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/ResizeObserverSize.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/utils/element.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/utils/global.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/utils/process.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/utils/queueResizeObserver.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/utils/scheduler.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/ResizeObservation.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/ResizeObserverController.js","webpack://kuika-sample-react-app/../../node_modules/@juggle/resize-observer/lib/ResizeObserver.js","webpack://kuika-sample-react-app/../../node_modules/@mapbox/point-geometry/index.js","webpack://kuika-sample-react-app/../../node_modules/@mapbox/rehype-prism/index.js","webpack://kuika-sample-react-app/../../node_modules/@stripe/stripe-js/dist/pure.js","webpack://kuika-sample-react-app/../../node_modules/@stripe/stripe-js/pure.js","webpack://kuika-sample-react-app/../../node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader.js","webpack://kuika-sample-react-app/../../node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.js","webpack://kuika-sample-react-app/../../node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.js","webpack://kuika-sample-react-app/../../node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.js","webpack://kuika-sample-react-app/../../node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.js","webpack://kuika-sample-react-app/../../node_modules/autosize/dist/autosize.js","webpack://kuika-sample-react-app/../../node_modules/boolbase/index.js","webpack://kuika-sample-react-app/../../node_modules/clsx/dist/clsx.m.js","webpack://kuika-sample-react-app/../../node_modules/css-box-model/dist/css-box-model.esm.js","webpack://kuika-sample-react-app/../../node_modules/css-selector-parser/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/css-selector-parser/lib/parser-context.js","webpack://kuika-sample-react-app/../../node_modules/css-selector-parser/lib/render.js","webpack://kuika-sample-react-app/../../node_modules/css-selector-parser/lib/utils.js","webpack://kuika-sample-react-app/../../node_modules/date-arithmetic/index.js","webpack://kuika-sample-react-app/../../node_modules/deepmerge/dist/cjs.js","webpack://kuika-sample-react-app/../../node_modules/detect-browser/es/index.js","webpack://kuika-sample-react-app/../../node_modules/didi/dist/index.esm.js","webpack://kuika-sample-react-app/../../node_modules/dijkstrajs/dijkstra.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/addClass.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/hasClass.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/animationFrame.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/canUseDOM.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/matches.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/closest.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/contains.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/getScrollAccessor.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/height.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/isWindow.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/isDocument.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/addEventListener.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/removeEventListener.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/listen.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/offset.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/ownerDocument.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/hyphenate.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/hyphenateStyle.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/isTransform.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/css.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/getComputedStyle.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/ownerWindow.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/position.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/offsetParent.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/querySelectorAll.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/removeClass.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/scrollLeft.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/scrollTop.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/scrollbarSize.js","webpack://kuika-sample-react-app/../../node_modules/dom-helpers/esm/width.js","webpack://kuika-sample-react-app/../../node_modules/dompurify/dist/purify.js","webpack://kuika-sample-react-app/../../node_modules/encode-utf8/index.js","webpack://kuika-sample-react-app/../../node_modules/enquire.js/src/MediaQuery.js","webpack://kuika-sample-react-app/../../node_modules/enquire.js/src/MediaQueryDispatch.js","webpack://kuika-sample-react-app/../../node_modules/enquire.js/src/QueryHandler.js","webpack://kuika-sample-react-app/../../node_modules/enquire.js/src/Util.js","webpack://kuika-sample-react-app/../../node_modules/enquire.js/src/index.js","webpack://kuika-sample-react-app/../../node_modules/eventemitter3/index.js","webpack://kuika-sample-react-app/../../node_modules/extend/index.js","webpack://kuika-sample-react-app/../../node_modules/fast-unique-numbers/build/es5/bundle.js","webpack://kuika-sample-react-app/../../node_modules/fecha/lib/fecha.js","webpack://kuika-sample-react-app/../../node_modules/fflate/esm/browser.js","webpack://kuika-sample-react-app/../../node_modules/fmin/build/fmin.js","webpack://kuika-sample-react-app/../../node_modules/focus-options-polyfill/index.js","webpack://kuika-sample-react-app/../../node_modules/get-own-enumerable-property-symbols/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/github-slugger/index.js","webpack://kuika-sample-react-app/../../node_modules/github-slugger/regex.js","webpack://kuika-sample-react-app/../../node_modules/gl-matrix/esm/common.js","webpack://kuika-sample-react-app/../../node_modules/gl-matrix/esm/mat3.js","webpack://kuika-sample-react-app/../../node_modules/gl-matrix/esm/vec2.js","webpack://kuika-sample-react-app/../../node_modules/gl-matrix/esm/vec3.js","webpack://kuika-sample-react-app/../../node_modules/guid-typescript/dist/guid.js","webpack://kuika-sample-react-app/../../node_modules/resolve-pathname/esm/resolve-pathname.js","webpack://kuika-sample-react-app/../../node_modules/value-equal/esm/value-equal.js","webpack://kuika-sample-react-app/../../node_modules/history/esm/history.js","webpack://kuika-sample-react-app/../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack://kuika-sample-react-app/../../node_modules/immutability-helper/index.js","webpack://kuika-sample-react-app/../../node_modules/inherits-browser/dist/index.es.js","webpack://kuika-sample-react-app/../../node_modules/inline-style-parser/index.js","webpack://kuika-sample-react-app/../../node_modules/invariant/browser.js","webpack://kuika-sample-react-app/../../node_modules/is-alphabetical/index.js","webpack://kuika-sample-react-app/../../node_modules/is-alphanumerical/index.js","webpack://kuika-sample-react-app/../../node_modules/is-decimal/index.js","webpack://kuika-sample-react-app/../../node_modules/is-hexadecimal/index.js","webpack://kuika-sample-react-app/../../node_modules/is-obj/index.js","webpack://kuika-sample-react-app/../../node_modules/is-regexp/index.js","webpack://kuika-sample-react-app/../../node_modules/json2mq/index.js","webpack://kuika-sample-react-app/../../node_modules/just-curry-it/index.js","webpack://kuika-sample-react-app/../../node_modules/lines-and-columns/build/index.js","webpack://kuika-sample-react-app/../../node_modules/load-script/index.js","webpack://kuika-sample-react-app/../../node_modules/mdurl/encode.js","webpack://kuika-sample-react-app/../../node_modules/memoize-one/dist/memoize-one.esm.js","webpack://kuika-sample-react-app/../../node_modules/min-dom/dist/index.esm.js","webpack://kuika-sample-react-app/../../node_modules/object-assign/index.js","webpack://kuika-sample-react-app/../../node_modules/object-path/index.js","webpack://kuika-sample-react-app/../../node_modules/object-refs/index.js","webpack://kuika-sample-react-app/../../node_modules/object-refs/lib/collection.js","webpack://kuika-sample-react-app/../../node_modules/object-refs/lib/refs.js","webpack://kuika-sample-react-app/../../node_modules/parse-entities/decode-entity.browser.js","webpack://kuika-sample-react-app/../../node_modules/parse-entities/index.js","webpack://kuika-sample-react-app/../../node_modules/path-intersection/intersect.js","webpack://kuika-sample-react-app/../../node_modules/pdfast/src/helper.js","webpack://kuika-sample-react-app/../../node_modules/pdfast/src/index.js","webpack://kuika-sample-react-app/../../node_modules/performance-now/lib/performance-now.js","webpack://kuika-sample-react-app/../../node_modules/points-cluster/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/points-cluster/lib/utils/createTree.js","webpack://kuika-sample-react-app/../../node_modules/points-cluster/lib/utils/latLng.js","webpack://kuika-sample-react-app/../../node_modules/preact/hooks/dist/hooks.module.js","webpack://kuika-sample-react-app/../../node_modules/preact/compat/dist/compat.module.js","webpack://kuika-sample-react-app/../../node_modules/preact/dist/preact.module.js","webpack://kuika-sample-react-app/../../node_modules/prismjs/components/prism-core.js","webpack://kuika-sample-react-app/../../node_modules/prop-types/factoryWithThrowingShims.js","webpack://kuika-sample-react-app/../../node_modules/prop-types/index.js","webpack://kuika-sample-react-app/../../node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/browser.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/can-promise.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/alignment-pattern.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/alphanumeric-data.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/bit-buffer.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/bit-matrix.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/byte-data.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/error-correction-code.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/error-correction-level.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/finder-pattern.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/format-info.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/galois-field.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/kanji-data.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/mask-pattern.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/mode.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/numeric-data.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/polynomial.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/qrcode.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/reed-solomon-encoder.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/regex.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/segments.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/utils.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/version-check.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/core/version.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/renderer/canvas.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/renderer/svg-tag.js","webpack://kuika-sample-react-app/../../node_modules/qrcode/lib/renderer/utils.js","webpack://kuika-sample-react-app/../../node_modules/querystringify/index.js","webpack://kuika-sample-react-app/../../node_modules/raf-schd/dist/raf-schd.esm.js","webpack://kuika-sample-react-app/../../node_modules/raf/index.js","webpack://kuika-sample-react-app/../../node_modules/rbush/rbush.js","webpack://kuika-sample-react-app/../../node_modules/tinycolor2/esm/tinycolor.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/helpers/alpha.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/helpers/checkboard.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/common/Checkboard.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/common/Alpha.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/common/EditableInput.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/helpers/hue.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/common/Hue.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/common/Raised.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/helpers/saturation.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/common/Saturation.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/helpers/color.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/common/ColorWrap.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/helpers/interaction.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/common/Swatch.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/alpha/Alpha.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/alpha/AlphaPointer.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/block/BlockSwatches.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/block/Block.js","webpack://kuika-sample-react-app/../../node_modules/material-colors/dist/colors.es2015.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/circle/CircleSwatch.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/circle/Circle.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/chrome/ChromeFields.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/chrome/ChromePointer.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/chrome/ChromePointerCircle.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/chrome/Chrome.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/compact/CompactColor.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/compact/CompactFields.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/compact/Compact.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/github/GithubSwatch.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/github/Github.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/hue/Hue.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/hue/HuePointer.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/material/Material.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/photoshop/PhotoshopFields.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/photoshop/PhotoshopPointerCircle.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/photoshop/PhotoshopPointer.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/photoshop/PhotoshopButton.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/photoshop/PhotoshopPreviews.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/photoshop/Photoshop.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/sketch/SketchFields.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/sketch/SketchPresetColors.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/sketch/Sketch.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/slider/SliderSwatch.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/slider/SliderSwatches.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/slider/Slider.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/slider/SliderPointer.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/swatches/SwatchesColor.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/swatches/SwatchesGroup.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/swatches/Swatches.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/twitter/Twitter.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/google/GooglePointerCircle.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/google/GooglePointer.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/google/GoogleFields.js","webpack://kuika-sample-react-app/../../node_modules/react-color/es/components/google/Google.js","webpack://kuika-sample-react-app/../../node_modules/react-color/node_modules/@icons/material/CheckIcon.js","webpack://kuika-sample-react-app/../../node_modules/react-color/node_modules/@icons/material/UnfoldMoreHorizontalIcon.js","webpack://kuika-sample-react-app/../../node_modules/react-error-boundary/dist/react-error-boundary.umd.js","webpack://kuika-sample-react-app/../../node_modules/react-fast-compare/index.js","webpack://kuika-sample-react-app/../../node_modules/react-reconciler/cjs/react-reconciler.production.min.js","webpack://kuika-sample-react-app/../../node_modules/react-reconciler/index.js","webpack://kuika-sample-react-app/../../node_modules/react-resize-detector/lib/esm/lib/utils.js","webpack://kuika-sample-react-app/../../node_modules/react-resize-detector/lib/esm/components/ChildWrapper.js","webpack://kuika-sample-react-app/../../node_modules/react-resize-detector/lib/esm/components/ResizeDetector.js","webpack://kuika-sample-react-app/../../node_modules/react-resize-detector/lib/esm/index.js","webpack://kuika-sample-react-app/../../node_modules/reactcss/lib/autoprefix.js","webpack://kuika-sample-react-app/../../node_modules/reactcss/lib/components/active.js","webpack://kuika-sample-react-app/../../node_modules/reactcss/lib/components/hover.js","webpack://kuika-sample-react-app/../../node_modules/reactcss/lib/flattenNames.js","webpack://kuika-sample-react-app/../../node_modules/reactcss/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/reactcss/lib/loop.js","webpack://kuika-sample-react-app/../../node_modules/reactcss/lib/mergeClasses.js","webpack://kuika-sample-react-app/../../node_modules/reduce-reducers/es/index.js","webpack://kuika-sample-react-app/../../node_modules/rgbcolor/index.js","webpack://kuika-sample-react-app/../../node_modules/saxen/dist/index.esm.js","webpack://kuika-sample-react-app/../../node_modules/scheduler/cjs/scheduler.production.min.js","webpack://kuika-sample-react-app/../../node_modules/scheduler/index.js","webpack://kuika-sample-react-app/../../node_modules/shallowequal/index.js","webpack://kuika-sample-react-app/../../node_modules/signature_pad/dist/signature_pad.js","webpack://kuika-sample-react-app/../../node_modules/size-sensor/lib/constant.js","webpack://kuika-sample-react-app/../../node_modules/size-sensor/lib/debounce.js","webpack://kuika-sample-react-app/../../node_modules/size-sensor/lib/id.js","webpack://kuika-sample-react-app/../../node_modules/size-sensor/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/size-sensor/lib/sensorPool.js","webpack://kuika-sample-react-app/../../node_modules/size-sensor/lib/sensors/index.js","webpack://kuika-sample-react-app/../../node_modules/size-sensor/lib/sensors/object.js","webpack://kuika-sample-react-app/../../node_modules/size-sensor/lib/sensors/resizeObserver.js","webpack://kuika-sample-react-app/../../node_modules/stackblur-canvas/dist/stackblur-es.js","webpack://kuika-sample-react-app/../../node_modules/string-convert/camel2hyphen.js","webpack://kuika-sample-react-app/../../node_modules/stringify-object/index.js","webpack://kuika-sample-react-app/../../node_modules/style-to-object/index.js","webpack://kuika-sample-react-app/../../node_modules/symbol-observable/es/index.js","webpack://kuika-sample-react-app/../../node_modules/symbol-observable/es/ponyfill.js","webpack://kuika-sample-react-app/../../node_modules/tiny-svg/dist/index.esm.js","webpack://kuika-sample-react-app/../../node_modules/to-camel-case/index.js","webpack://kuika-sample-react-app/../../node_modules/to-no-case/index.js","webpack://kuika-sample-react-app/../../node_modules/to-space-case/index.js","webpack://kuika-sample-react-app/../../node_modules/ts-interface-checker/dist/index.js","webpack://kuika-sample-react-app/../../node_modules/ts-interface-checker/dist/types.js","webpack://kuika-sample-react-app/../../node_modules/ts-interface-checker/dist/util.js","webpack://kuika-sample-react-app/../../node_modules/unified/node_modules/is-buffer/index.js","webpack://kuika-sample-react-app/../../node_modules/uuid/lib/bytesToUuid.js","webpack://kuika-sample-react-app/../../node_modules/uuid/lib/rng-browser.js","webpack://kuika-sample-react-app/../../node_modules/uuid/v1.js","webpack://kuika-sample-react-app/../../node_modules/vanilla-masker/lib/vanilla-masker.js","webpack://kuika-sample-react-app/../../node_modules/vfile/node_modules/is-buffer/index.js","webpack://kuika-sample-react-app/../../node_modules/warning/warning.js","webpack://kuika-sample-react-app/../../node_modules/worker-timers/build/es2019/factories/load-or-return-broker.js","webpack://kuika-sample-react-app/../../node_modules/worker-timers-broker/build/es2019/guards/call-notification.js","webpack://kuika-sample-react-app/../../node_modules/worker-timers-broker/build/es2019/guards/clear-response.js","webpack://kuika-sample-react-app/../../node_modules/worker-timers/build/es2019/module.js","webpack://kuika-sample-react-app/../../node_modules/worker-timers-broker/build/es2019/module.js","webpack://kuika-sample-react-app/../../node_modules/worker-timers/build/es2019/worker/worker.js","webpack://kuika-sample-react-app/../../node_modules/xtend/immutable.js","webpack://kuika-sample-react-app/./node_modules/@restart/hooks/esm/useCallbackRef.js","webpack://kuika-sample-react-app/./node_modules/@restart/hooks/esm/useCommittedRef.js","webpack://kuika-sample-react-app/./node_modules/@restart/hooks/esm/useEventCallback.js","webpack://kuika-sample-react-app/./node_modules/@restart/hooks/esm/useMergedRefs.js","webpack://kuika-sample-react-app/./node_modules/@restart/hooks/esm/useSafeState.js","webpack://kuika-sample-react-app/./node_modules/@restart/hooks/esm/useMounted.js","webpack://kuika-sample-react-app/./node_modules/@stripe/react-stripe-js/dist/react-stripe.umd.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/utils/InsertTextAtPosition.js","webpack://kuika-sample-react-app/./node_modules/react-markdown/lib/rehype-filter.js","webpack://kuika-sample-react-app/./node_modules/react-markdown/lib/uri-transformer.js","webpack://kuika-sample-react-app/./node_modules/react-markdown/lib/ast-to-react.js","webpack://kuika-sample-react-app/./node_modules/react-markdown/lib/react-markdown.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-markdown-preview/esm/index.js","webpack://kuika-sample-react-app/./node_modules/react-markdown/index.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/Context.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/components/TextArea/shortcuts.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/components/TextArea/Markdown.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/utils/markdownUtils.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/bold.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/code.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/italic.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/link.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/list.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/quote.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/hr.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/title2.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/title.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/comment.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/divider.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/preview.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/fullscreen.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/image.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/strikeThrough.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/commands/index.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/components/TextArea/handleKeyDown.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/components/TextArea/Textarea.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/components/TextArea/index.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/components/Toolbar/Child.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/components/Toolbar/index.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/components/DragBar/index.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/Editor.js","webpack://kuika-sample-react-app/./node_modules/@uiw/react-md-editor/esm/index.js","webpack://kuika-sample-react-app/./node_modules/classnames/index.js","webpack://kuika-sample-react-app/./node_modules/file-saver/dist/FileSaver.min.js","webpack://kuika-sample-react-app/./node_modules/isarray/index.js","webpack://kuika-sample-react-app/./node_modules/mini-create-react-context/dist/esm/index.js","webpack://kuika-sample-react-app/./node_modules/path-to-regexp/index.js","webpack://kuika-sample-react-app/./node_modules/react-barcode/lib/react-barcode.js","webpack://kuika-sample-react-app/./node_modules/react-fast-marquee/dist/index.js","webpack://kuika-sample-react-app/./node_modules/react-async-script/lib/esm/async-script-loader.js","webpack://kuika-sample-react-app/./node_modules/react-google-recaptcha/lib/esm/recaptcha.js","webpack://kuika-sample-react-app/./node_modules/react-google-recaptcha/lib/esm/recaptcha-wrapper.js","webpack://kuika-sample-react-app/./node_modules/react-google-recaptcha/lib/esm/index.js","webpack://kuika-sample-react-app/./node_modules/react-is/cjs/react-is.production.min.js","webpack://kuika-sample-react-app/./node_modules/react-is/index.js","webpack://kuika-sample-react-app/./node_modules/react-medium-image-zoom/dist/esm/helpers.js","webpack://kuika-sample-react-app/./node_modules/react-medium-image-zoom/dist/esm/Controlled.js","webpack://kuika-sample-react-app/./node_modules/react-resize-detector/build/index.esm.js","webpack://kuika-sample-react-app/./node_modules/react-sortablejs/lib/Sortable.js","webpack://kuika-sample-react-app/./node_modules/react-sortablejs/lib/index.js","webpack://kuika-sample-react-app/./node_modules/react-to-pdf/dist/module.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/actions/BoardActions.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/actions/LaneActions.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/AddCardLink.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/Card.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/Card/Tag.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/Lane/LaneFooter.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/Lane/LaneHeader.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/Lane/LaneHeader/LaneMenu.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/Loader.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/NewCardForm.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/NewLaneForm.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/NewLaneSection.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/components/index.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/controllers/Board.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/controllers/BoardContainer.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/controllers/Lane.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/dnd/Container.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/dnd/Draggable.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/helpers/LaneHelper.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/helpers/createTranslate.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/helpers/deprecationWarnings.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/index.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/locales/index.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/reducers/BoardReducer.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/styles/Base.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/styles/Elements.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/styles/Loader.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/widgets/DeleteButton.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/widgets/EditableLabel.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/widgets/InlineInput.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/widgets/NewLaneTitleEditor.js","webpack://kuika-sample-react-app/./node_modules/react-trello/dist/widgets/index.js","webpack://kuika-sample-react-app/./node_modules/react-trello/node_modules/react-popopo/dist/Popover.js","webpack://kuika-sample-react-app/./node_modules/react-trello/node_modules/react-popopo/dist/PopoverStore.js","webpack://kuika-sample-react-app/./node_modules/react-trello/node_modules/react-popopo/dist/PopoverWrapper.js","webpack://kuika-sample-react-app/./node_modules/react-trello/node_modules/react-popopo/dist/index.js","webpack://kuika-sample-react-app/./node_modules/react-trello/node_modules/react-popopo/dist/styles.js","webpack://kuika-sample-react-app/./node_modules/react-use/lib/misc/util.js","webpack://kuika-sample-react-app/./node_modules/react-use/lib/useEffectOnce.js","webpack://kuika-sample-react-app/./node_modules/react-use/lib/useEvent.js","webpack://kuika-sample-react-app/./node_modules/react-use/lib/usePrevious.js","webpack://kuika-sample-react-app/./node_modules/react-use/lib/useRafState.js","webpack://kuika-sample-react-app/./node_modules/react-use/lib/useUnmount.js","webpack://kuika-sample-react-app/./node_modules/react-use/lib/useWindowSize.js","webpack://kuika-sample-react-app/./node_modules/scheduler/cjs/scheduler.production.min.js","webpack://kuika-sample-react-app/./node_modules/scheduler/index.js","webpack://kuika-sample-react-app/./node_modules/uncontrollable/lib/esm/uncontrollable.js","webpack://kuika-sample-react-app/./node_modules/uncontrollable/lib/esm/utils.js","webpack://kuika-sample-react-app/../../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","webpack://kuika-sample-react-app/./node_modules/use-memo-one/dist/use-memo-one.esm.js","webpack://kuika-sample-react-app/./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","webpack://kuika-sample-react-app/./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","webpack://kuika-sample-react-app/./node_modules/use-sync-external-store/shim/index.js","webpack://kuika-sample-react-app/./node_modules/use-sync-external-store/shim/with-selector.js","webpack://kuika-sample-react-app/../../node_modules/bcp-47-match/index.js","webpack://kuika-sample-react-app/../../node_modules/ccount/index.js","webpack://kuika-sample-react-app/../../node_modules/comma-separated-tokens/index.js","webpack://kuika-sample-react-app/../../node_modules/decode-named-character-reference/index.dom.js","webpack://kuika-sample-react-app/../../node_modules/direction/index.js","webpack://kuika-sample-react-app/../../node_modules/html-void-elements/index.js","webpack://kuika-sample-react-app/../../node_modules/ids/dist/index.modern.js","webpack://kuika-sample-react-app/../../node_modules/is-absolute-url/index.js","webpack://kuika-sample-react-app/../../node_modules/is-relative-url/index.js","webpack://kuika-sample-react-app/../../node_modules/markdown-table/index.js","webpack://kuika-sample-react-app/../../node_modules/nth-check/lib/esm/parse.js","webpack://kuika-sample-react-app/../../node_modules/nth-check/lib/esm/index.js","webpack://kuika-sample-react-app/../../node_modules/nth-check/lib/esm/compile.js","webpack://kuika-sample-react-app/../../node_modules/compute-scroll-into-view/dist/index.js","webpack://kuika-sample-react-app/../../node_modules/scroll-into-view-if-needed/dist/index.js","webpack://kuika-sample-react-app/../../node_modules/space-separated-tokens/index.js","webpack://kuika-sample-react-app/../../node_modules/stringify-entities/lib/util/to-named.js","webpack://kuika-sample-react-app/../../node_modules/stringify-entities/lib/core.js","webpack://kuika-sample-react-app/../../node_modules/stringify-entities/lib/util/to-hexadecimal.js","webpack://kuika-sample-react-app/../../node_modules/stringify-entities/lib/util/to-decimal.js","webpack://kuika-sample-react-app/../../node_modules/stringify-entities/node_modules/character-entities-legacy/index.js","webpack://kuika-sample-react-app/../../node_modules/character-entities-html4/index.js","webpack://kuika-sample-react-app/../../node_modules/stringify-entities/lib/constant/dangerous.js","webpack://kuika-sample-react-app/../../node_modules/stringify-entities/lib/util/format-smart.js","webpack://kuika-sample-react-app/../../node_modules/stringify-entities/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/svg-pathdata/lib/SVGPathData.module.js","webpack://kuika-sample-react-app/../../node_modules/throttle-debounce/esm/index.js","webpack://kuika-sample-react-app/../../node_modules/tiny-invariant/dist/esm/tiny-invariant.js","webpack://kuika-sample-react-app/../../node_modules/tslib/tslib.es6.mjs","webpack://kuika-sample-react-app/../../node_modules/bail/index.js","webpack://kuika-sample-react-app/../../node_modules/is-plain-obj/index.js","webpack://kuika-sample-react-app/../../node_modules/unified/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/trough/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/vfile-location/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/vfile-message/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/vfile/lib/minpath.browser.js","webpack://kuika-sample-react-app/../../node_modules/vfile/lib/minproc.browser.js","webpack://kuika-sample-react-app/../../node_modules/vfile/lib/minurl.shared.js","webpack://kuika-sample-react-app/../../node_modules/vfile/lib/index.js","webpack://kuika-sample-react-app/../../node_modules/vfile/lib/minurl.browser.js","webpack://kuika-sample-react-app/../../node_modules/web-namespaces/index.js","webpack://kuika-sample-react-app/../../node_modules/zwitch/index.js"],"sourcesContent":["/* 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 default murmur2;\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","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/set-array'), require('@jridgewell/sourcemap-codec'), require('@jridgewell/trace-mapping')) :\n typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/set-array', '@jridgewell/sourcemap-codec', '@jridgewell/trace-mapping'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.genMapping = {}, global.setArray, global.sourcemapCodec, global.traceMapping));\n})(this, (function (exports, setArray, sourcemapCodec, traceMapping) { 'use strict';\n\n const COLUMN = 0;\n const SOURCES_INDEX = 1;\n const SOURCE_LINE = 2;\n const SOURCE_COLUMN = 3;\n const NAMES_INDEX = 4;\n\n const NO_NAME = -1;\n /**\n * Provides the state to generate a sourcemap.\n */\n class GenMapping {\n constructor({ file, sourceRoot } = {}) {\n this._names = new setArray.SetArray();\n this._sources = new setArray.SetArray();\n this._sourcesContent = [];\n this._mappings = [];\n this.file = file;\n this.sourceRoot = sourceRoot;\n this._ignoreList = new setArray.SetArray();\n }\n }\n /**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\n function cast(map) {\n return map;\n }\n function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {\n return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);\n }\n function addMapping(map, mapping) {\n return addMappingInternal(false, map, mapping);\n }\n /**\n * Same as `addSegment`, but will only add the segment if it generates useful information in the\n * resulting map. This only works correctly if segments are added **in order**, meaning you should\n * not add a segment with a lower generated line/column than one that came before.\n */\n const maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {\n return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);\n };\n /**\n * Same as `addMapping`, but will only add the mapping if it generates useful information in the\n * resulting map. This only works correctly if mappings are added **in order**, meaning you should\n * not add a mapping with a lower generated line/column than one that came before.\n */\n const maybeAddMapping = (map, mapping) => {\n return addMappingInternal(true, map, mapping);\n };\n /**\n * Adds/removes the content of the source file to the source map.\n */\n function setSourceContent(map, source, content) {\n const { _sources: sources, _sourcesContent: sourcesContent } = cast(map);\n const index = setArray.put(sources, source);\n sourcesContent[index] = content;\n }\n function setIgnore(map, source, ignore = true) {\n const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map);\n const index = setArray.put(sources, source);\n if (index === sourcesContent.length)\n sourcesContent[index] = null;\n if (ignore)\n setArray.put(ignoreList, index);\n else\n setArray.remove(ignoreList, index);\n }\n /**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\n function toDecodedMap(map) {\n const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList, } = cast(map);\n removeEmptyFinalLines(mappings);\n return {\n version: 3,\n file: map.file || undefined,\n names: names.array,\n sourceRoot: map.sourceRoot || undefined,\n sources: sources.array,\n sourcesContent,\n mappings,\n ignoreList: ignoreList.array,\n };\n }\n /**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\n function toEncodedMap(map) {\n const decoded = toDecodedMap(map);\n return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) });\n }\n /**\n * Constructs a new GenMapping, using the already present mappings of the input.\n */\n function fromMap(input) {\n const map = new traceMapping.TraceMap(input);\n const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });\n putAll(cast(gen)._names, map.names);\n putAll(cast(gen)._sources, map.sources);\n cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);\n cast(gen)._mappings = traceMapping.decodedMappings(map);\n if (map.ignoreList)\n putAll(cast(gen)._ignoreList, map.ignoreList);\n return gen;\n }\n /**\n * Returns an array of high-level mapping objects for every recorded segment, which could then be\n * passed to the `source-map` library.\n */\n function allMappings(map) {\n const out = [];\n const { _mappings: mappings, _sources: sources, _names: names } = cast(map);\n for (let i = 0; i < mappings.length; i++) {\n const line = mappings[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const generated = { line: i + 1, column: seg[COLUMN] };\n let source = undefined;\n let original = undefined;\n let name = undefined;\n if (seg.length !== 1) {\n source = sources.array[seg[SOURCES_INDEX]];\n original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };\n if (seg.length === 5)\n name = names.array[seg[NAMES_INDEX]];\n }\n out.push({ generated, source, original, name });\n }\n }\n return out;\n }\n // This split declaration is only so that terser can elminiate the static initialization block.\n function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {\n const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = cast(map);\n const line = getLine(mappings, genLine);\n const index = getColumnIndex(line, genColumn);\n if (!source) {\n if (skipable && skipSourceless(line, index))\n return;\n return insert(line, index, [genColumn]);\n }\n const sourcesIndex = setArray.put(sources, source);\n const namesIndex = name ? setArray.put(names, name) : NO_NAME;\n if (sourcesIndex === sourcesContent.length)\n sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null;\n if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {\n return;\n }\n return insert(line, index, name\n ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]\n : [genColumn, sourcesIndex, sourceLine, sourceColumn]);\n }\n function getLine(mappings, index) {\n for (let i = mappings.length; i <= index; i++) {\n mappings[i] = [];\n }\n return mappings[index];\n }\n function getColumnIndex(line, genColumn) {\n let index = line.length;\n for (let i = index - 1; i >= 0; index = i--) {\n const current = line[i];\n if (genColumn >= current[COLUMN])\n break;\n }\n return index;\n }\n function insert(array, index, value) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n }\n function removeEmptyFinalLines(mappings) {\n const { length } = mappings;\n let len = length;\n for (let i = len - 1; i >= 0; len = i, i--) {\n if (mappings[i].length > 0)\n break;\n }\n if (len < length)\n mappings.length = len;\n }\n function putAll(setarr, array) {\n for (let i = 0; i < array.length; i++)\n setArray.put(setarr, array[i]);\n }\n function skipSourceless(line, index) {\n // The start of a line is already sourceless, so adding a sourceless segment to the beginning\n // doesn't generate any useful information.\n if (index === 0)\n return true;\n const prev = line[index - 1];\n // If the previous segment is also sourceless, then adding another sourceless segment doesn't\n // genrate any new information. Else, this segment will end the source/named segment and point to\n // a sourceless position, which is useful.\n return prev.length === 1;\n }\n function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {\n // A source/named segment at the start of a line gives position at that genColumn\n if (index === 0)\n return false;\n const prev = line[index - 1];\n // If the previous segment is sourceless, then we're transitioning to a source.\n if (prev.length === 1)\n return false;\n // If the previous segment maps to the exact same source position, then this segment doesn't\n // provide any new position information.\n return (sourcesIndex === prev[SOURCES_INDEX] &&\n sourceLine === prev[SOURCE_LINE] &&\n sourceColumn === prev[SOURCE_COLUMN] &&\n namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME));\n }\n function addMappingInternal(skipable, map, mapping) {\n const { generated, source, original, name, content } = mapping;\n if (!source) {\n return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null);\n }\n return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content);\n }\n\n exports.GenMapping = GenMapping;\n exports.addMapping = addMapping;\n exports.addSegment = addSegment;\n exports.allMappings = allMappings;\n exports.fromMap = fromMap;\n exports.maybeAddMapping = maybeAddMapping;\n exports.maybeAddSegment = maybeAddSegment;\n exports.setIgnore = setIgnore;\n exports.setSourceContent = setSourceContent;\n exports.toDecodedMap = toDecodedMap;\n exports.toEncodedMap = toEncodedMap;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=gen-mapping.umd.js.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory());\n})(this, (function () { 'use strict';\n\n // Matches the scheme of a URL, eg \"http://\"\n const schemeRegex = /^[\\w+.-]+:\\/\\//;\n /**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\n const urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n /**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\n const fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n function isAbsoluteUrl(input) {\n return schemeRegex.test(input);\n }\n function isSchemeRelativeUrl(input) {\n return input.startsWith('//');\n }\n function isAbsolutePath(input) {\n return input.startsWith('/');\n }\n function isFileUrl(input) {\n return input.startsWith('file:');\n }\n function isRelative(input) {\n return /^[.?#]/.test(input);\n }\n function parseAbsoluteUrl(input) {\n const match = urlRegex.exec(input);\n return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');\n }\n function parseFileUrl(input) {\n const match = fileRegex.exec(input);\n const path = match[2];\n return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');\n }\n function makeUrl(scheme, user, host, port, path, query, hash) {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: 7 /* Absolute */,\n };\n }\n function parseUrl(input) {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = 6 /* SchemeRelative */;\n return url;\n }\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = 5 /* AbsolutePath */;\n return url;\n }\n if (isFileUrl(input))\n return parseFileUrl(input);\n if (isAbsoluteUrl(input))\n return parseAbsoluteUrl(input);\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? 3 /* Query */\n : input.startsWith('#')\n ? 2 /* Hash */\n : 4 /* RelativePath */\n : 1 /* Empty */;\n return url;\n }\n function stripPathFilename(path) {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..'))\n return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n }\n function mergePaths(url, base) {\n normalizePath(base, base.type);\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n }\n else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n }\n /**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\n function normalizePath(url, type) {\n const rel = type <= 4 /* RelativePath */;\n const pieces = url.path.split('/');\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n // A current directory, which we can always drop.\n if (piece === '.')\n continue;\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n }\n else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n }\n /**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\n function resolve(input, base) {\n if (!input && !base)\n return '';\n const url = parseUrl(input);\n let inputType = url.type;\n if (base && inputType !== 7 /* Absolute */) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n switch (inputType) {\n case 1 /* Empty */:\n url.hash = baseUrl.hash;\n // fall through\n case 2 /* Hash */:\n url.query = baseUrl.query;\n // fall through\n case 3 /* Query */:\n case 4 /* RelativePath */:\n mergePaths(url, baseUrl);\n // fall through\n case 5 /* AbsolutePath */:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n case 6 /* SchemeRelative */:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType)\n inputType = baseType;\n }\n normalizePath(url, inputType);\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n case 2 /* Hash */:\n case 3 /* Query */:\n return queryHash;\n case 4 /* RelativePath */: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n if (!path)\n return queryHash || '.';\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n return path + queryHash;\n }\n case 5 /* AbsolutePath */:\n return url.path + queryHash;\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n }\n\n return resolve;\n\n}));\n//# sourceMappingURL=resolve-uri.umd.js.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.setArray = {}));\n})(this, (function (exports) { 'use strict';\n\n /**\n * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the\n * index of the `key` in the backing array.\n *\n * This is designed to allow synchronizing a second array with the contents of the backing array,\n * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,\n * and there are never duplicates.\n */\n class SetArray {\n constructor() {\n this._indexes = { __proto__: null };\n this.array = [];\n }\n }\n /**\n * Typescript doesn't allow friend access to private fields, so this just casts the set into a type\n * with public access modifiers.\n */\n function cast(set) {\n return set;\n }\n /**\n * Gets the index associated with `key` in the backing array, if it is already present.\n */\n function get(setarr, key) {\n return cast(setarr)._indexes[key];\n }\n /**\n * Puts `key` into the backing array, if it is not already present. Returns\n * the index of the `key` in the backing array.\n */\n function put(setarr, key) {\n // The key may or may not be present. If it is present, it's a number.\n const index = get(setarr, key);\n if (index !== undefined)\n return index;\n const { array, _indexes: indexes } = cast(setarr);\n const length = array.push(key);\n return (indexes[key] = length - 1);\n }\n /**\n * Pops the last added item out of the SetArray.\n */\n function pop(setarr) {\n const { array, _indexes: indexes } = cast(setarr);\n if (array.length === 0)\n return;\n const last = array.pop();\n indexes[last] = undefined;\n }\n /**\n * Removes the key, if it exists in the set.\n */\n function remove(setarr, key) {\n const index = get(setarr, key);\n if (index === undefined)\n return;\n const { array, _indexes: indexes } = cast(setarr);\n for (let i = index + 1; i < array.length; i++) {\n const k = array[i];\n array[i - 1] = k;\n indexes[k]--;\n }\n indexes[key] = undefined;\n array.pop();\n }\n\n exports.SetArray = SetArray;\n exports.get = get;\n exports.pop = pop;\n exports.put = put;\n exports.remove = remove;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=set-array.umd.js.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {}));\n})(this, (function (exports) { 'use strict';\n\n const comma = ','.charCodeAt(0);\n const semicolon = ';'.charCodeAt(0);\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n const intToChar = new Uint8Array(64); // 64 possible chars.\n const charToInt = new Uint8Array(128); // z is 122 in ASCII\n for (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n }\n function decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n return relative + value;\n }\n function encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0)\n clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n }\n function hasMoreVlq(reader, max) {\n if (reader.pos >= max)\n return false;\n return reader.peek() !== comma;\n }\n\n const bufLength = 1024 * 16;\n // Provide a fallback for older environments.\n const td = typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf) {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n class StringWriter {\n constructor() {\n this.pos = 0;\n this.out = '';\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n }\n class StringReader {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n }\n\n const EMPTY = [];\n function decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]);\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n }\n function encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length;) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n }\n function _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0)\n writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6)\n encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length;) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n }\n function decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0);\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n }\n else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0);\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n }\n else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n }\n function encodeGeneratedRanges(ranges) {\n if (ranges.length === 0)\n return '';\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length;) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n }\n function _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n }\n else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n }\n else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1)\n encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length;) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n }\n else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n }\n function catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n }\n\n function decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(';');\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol)\n sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n }\n else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n }\n else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted)\n sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n }\n function sort(line) {\n line.sort(sortComparator);\n }\n function sortComparator(a, b) {\n return a[0] - b[0];\n }\n function encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0)\n writer.write(semicolon);\n if (line.length === 0)\n continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0)\n writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1)\n continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4)\n continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n }\n\n exports.decode = decode;\n exports.decodeGeneratedRanges = decodeGeneratedRanges;\n exports.decodeOriginalScopes = decodeOriginalScopes;\n exports.encode = encode;\n exports.encodeGeneratedRanges = encodeGeneratedRanges;\n exports.encodeOriginalScopes = encodeOriginalScopes;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=sourcemap-codec.umd.js.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) :\n typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI));\n})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict';\n\n function resolve(input, base) {\n // The base is always treated as a directory, if it's not empty.\n // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327\n // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401\n if (base && !base.endsWith('/'))\n base += '/';\n return resolveUri(input, base);\n }\n\n /**\n * Removes everything after the last \"/\", but leaves the slash.\n */\n function stripFilename(path) {\n if (!path)\n return '';\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n }\n\n const COLUMN = 0;\n const SOURCES_INDEX = 1;\n const SOURCE_LINE = 2;\n const SOURCE_COLUMN = 3;\n const NAMES_INDEX = 4;\n const REV_GENERATED_LINE = 1;\n const REV_GENERATED_COLUMN = 2;\n\n function maybeSort(mappings, owned) {\n const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);\n if (unsortedIndex === mappings.length)\n return mappings;\n // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If\n // not, we do not want to modify the consumer's input array.\n if (!owned)\n mappings = mappings.slice();\n for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {\n mappings[i] = sortSegments(mappings[i], owned);\n }\n return mappings;\n }\n function nextUnsortedSegmentLine(mappings, start) {\n for (let i = start; i < mappings.length; i++) {\n if (!isSorted(mappings[i]))\n return i;\n }\n return mappings.length;\n }\n function isSorted(line) {\n for (let j = 1; j < line.length; j++) {\n if (line[j][COLUMN] < line[j - 1][COLUMN]) {\n return false;\n }\n }\n return true;\n }\n function sortSegments(line, owned) {\n if (!owned)\n line = line.slice();\n return line.sort(sortComparator);\n }\n function sortComparator(a, b) {\n return a[COLUMN] - b[COLUMN];\n }\n\n let found = false;\n /**\n * A binary search implementation that returns the index if a match is found.\n * If no match is found, then the left-index (the index associated with the item that comes just\n * before the desired index) is returned. To maintain proper sort order, a splice would happen at\n * the next index:\n *\n * ```js\n * const array = [1, 3];\n * const needle = 2;\n * const index = binarySearch(array, needle, (item, needle) => item - needle);\n *\n * assert.equal(index, 0);\n * array.splice(index + 1, 0, needle);\n * assert.deepEqual(array, [1, 2, 3]);\n * ```\n */\n function binarySearch(haystack, needle, low, high) {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n if (cmp === 0) {\n found = true;\n return mid;\n }\n if (cmp < 0) {\n low = mid + 1;\n }\n else {\n high = mid - 1;\n }\n }\n found = false;\n return low - 1;\n }\n function upperBound(haystack, needle, index) {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle)\n break;\n }\n return index;\n }\n function lowerBound(haystack, needle, index) {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle)\n break;\n }\n return index;\n }\n function memoizedState() {\n return {\n lastKey: -1,\n lastNeedle: -1,\n lastIndex: -1,\n };\n }\n /**\n * This overly complicated beast is just to record the last tested line/column and the resulting\n * index, allowing us to skip a few tests if mappings are monotonically increasing.\n */\n function memoizedBinarySearch(haystack, needle, state, key) {\n const { lastKey, lastNeedle, lastIndex } = state;\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n if (needle >= lastNeedle) {\n // lastIndex may be -1 if the previous needle was not found.\n low = lastIndex === -1 ? 0 : lastIndex;\n }\n else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n return (state.lastIndex = binarySearch(haystack, needle, low, high));\n }\n\n // Rebuilds the original source files, with mappings that are ordered by source line/column instead\n // of generated line/column.\n function buildBySources(decoded, memos) {\n const sources = memos.map(buildNullArray);\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n if (seg.length === 1)\n continue;\n const sourceIndex = seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n const originalSource = sources[sourceIndex];\n const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = []));\n const memo = memos[sourceIndex];\n // The binary search either found a match, or it found the left-index just before where the\n // segment should go. Either way, we want to insert after that. And there may be multiple\n // generated segments associated with an original location, so there may need to move several\n // indexes before we find where we need to insert.\n let index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine));\n memo.lastIndex = ++index;\n insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]);\n }\n }\n return sources;\n }\n function insert(array, index, value) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n }\n // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like\n // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.\n // Numeric properties on objects are magically sorted in ascending order by the engine regardless of\n // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending\n // order when iterating with for-in.\n function buildNullArray() {\n return { __proto__: null };\n }\n\n const AnyMap = function (map, mapUrl) {\n const parsed = parse(map);\n if (!('sections' in parsed)) {\n return new TraceMap(parsed, mapUrl);\n }\n const mappings = [];\n const sources = [];\n const sourcesContent = [];\n const names = [];\n const ignoreList = [];\n recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, ignoreList, 0, 0, Infinity, Infinity);\n const joined = {\n version: 3,\n file: parsed.file,\n names,\n sources,\n sourcesContent,\n mappings,\n ignoreList,\n };\n return presortedDecodedMap(joined);\n };\n function parse(map) {\n return typeof map === 'string' ? JSON.parse(map) : map;\n }\n function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {\n const { sections } = input;\n for (let i = 0; i < sections.length; i++) {\n const { map, offset } = sections[i];\n let sl = stopLine;\n let sc = stopColumn;\n if (i + 1 < sections.length) {\n const nextOffset = sections[i + 1].offset;\n sl = Math.min(stopLine, lineOffset + nextOffset.line);\n if (sl === stopLine) {\n sc = Math.min(stopColumn, columnOffset + nextOffset.column);\n }\n else if (sl < stopLine) {\n sc = columnOffset + nextOffset.column;\n }\n }\n addSection(map, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset + offset.line, columnOffset + offset.column, sl, sc);\n }\n }\n function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {\n const parsed = parse(input);\n if ('sections' in parsed)\n return recurse(...arguments);\n const map = new TraceMap(parsed, mapUrl);\n const sourcesOffset = sources.length;\n const namesOffset = names.length;\n const decoded = decodedMappings(map);\n const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;\n append(sources, resolvedSources);\n append(names, map.names);\n if (contents)\n append(sourcesContent, contents);\n else\n for (let i = 0; i < resolvedSources.length; i++)\n sourcesContent.push(null);\n if (ignores)\n for (let i = 0; i < ignores.length; i++)\n ignoreList.push(ignores[i] + sourcesOffset);\n for (let i = 0; i < decoded.length; i++) {\n const lineI = lineOffset + i;\n // We can only add so many lines before we step into the range that the next section's map\n // controls. When we get to the last line, then we'll start checking the segments to see if\n // they've crossed into the column range. But it may not have any columns that overstep, so we\n // still need to check that we don't overstep lines, too.\n if (lineI > stopLine)\n return;\n // The out line may already exist in mappings (if we're continuing the line started by a\n // previous section). Or, we may have jumped ahead several lines to start this section.\n const out = getLine(mappings, lineI);\n // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the\n // map can be multiple lines), it doesn't.\n const cOffset = i === 0 ? columnOffset : 0;\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const column = cOffset + seg[COLUMN];\n // If this segment steps into the column range that the next section's map controls, we need\n // to stop early.\n if (lineI === stopLine && column >= stopColumn)\n return;\n if (seg.length === 1) {\n out.push([column]);\n continue;\n }\n const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n out.push(seg.length === 4\n ? [column, sourcesIndex, sourceLine, sourceColumn]\n : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]);\n }\n }\n }\n function append(arr, other) {\n for (let i = 0; i < other.length; i++)\n arr.push(other[i]);\n }\n function getLine(arr, index) {\n for (let i = arr.length; i <= index; i++)\n arr[i] = [];\n return arr[index];\n }\n\n const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';\n const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';\n const LEAST_UPPER_BOUND = -1;\n const GREATEST_LOWER_BOUND = 1;\n class TraceMap {\n constructor(map, mapUrl) {\n const isString = typeof map === 'string';\n if (!isString && map._decodedMemo)\n return map;\n const parsed = (isString ? JSON.parse(map) : map);\n const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;\n this.version = version;\n this.file = file;\n this.names = names || [];\n this.sourceRoot = sourceRoot;\n this.sources = sources;\n this.sourcesContent = sourcesContent;\n this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined;\n const from = resolve(sourceRoot || '', stripFilename(mapUrl));\n this.resolvedSources = sources.map((s) => resolve(s || '', from));\n const { mappings } = parsed;\n if (typeof mappings === 'string') {\n this._encoded = mappings;\n this._decoded = undefined;\n }\n else {\n this._encoded = undefined;\n this._decoded = maybeSort(mappings, isString);\n }\n this._decodedMemo = memoizedState();\n this._bySources = undefined;\n this._bySourceMemos = undefined;\n }\n }\n /**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\n function cast(map) {\n return map;\n }\n /**\n * Returns the encoded (VLQ string) form of the SourceMap's mappings field.\n */\n function encodedMappings(map) {\n var _a;\n var _b;\n return ((_a = (_b = cast(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = sourcemapCodec.encode(cast(map)._decoded)));\n }\n /**\n * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.\n */\n function decodedMappings(map) {\n var _a;\n return ((_a = cast(map))._decoded || (_a._decoded = sourcemapCodec.decode(cast(map)._encoded)));\n }\n /**\n * A low-level API to find the segment associated with a generated line/column (think, from a\n * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.\n */\n function traceSegment(map, line, column) {\n const decoded = decodedMappings(map);\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length)\n return null;\n const segments = decoded[line];\n const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, GREATEST_LOWER_BOUND);\n return index === -1 ? null : segments[index];\n }\n /**\n * A higher-level API to find the source/line/column associated with a generated line/column\n * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in\n * `source-map` library.\n */\n function originalPositionFor(map, needle) {\n let { line, column, bias } = needle;\n line--;\n if (line < 0)\n throw new Error(LINE_GTR_ZERO);\n if (column < 0)\n throw new Error(COL_GTR_EQ_ZERO);\n const decoded = decodedMappings(map);\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length)\n return OMapping(null, null, null, null);\n const segments = decoded[line];\n const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);\n if (index === -1)\n return OMapping(null, null, null, null);\n const segment = segments[index];\n if (segment.length === 1)\n return OMapping(null, null, null, null);\n const { names, resolvedSources } = map;\n return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);\n }\n /**\n * Finds the generated line/column position of the provided source/line/column source position.\n */\n function generatedPositionFor(map, needle) {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);\n }\n /**\n * Finds all generated line/column positions of the provided source/line/column source position.\n */\n function allGeneratedPositionsFor(map, needle) {\n const { source, line, column, bias } = needle;\n // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.\n return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);\n }\n /**\n * Iterates each mapping in generated position order.\n */\n function eachMapping(map, cb) {\n const decoded = decodedMappings(map);\n const { names, resolvedSources } = map;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const generatedLine = i + 1;\n const generatedColumn = seg[0];\n let source = null;\n let originalLine = null;\n let originalColumn = null;\n let name = null;\n if (seg.length !== 1) {\n source = resolvedSources[seg[1]];\n originalLine = seg[2] + 1;\n originalColumn = seg[3];\n }\n if (seg.length === 5)\n name = names[seg[4]];\n cb({\n generatedLine,\n generatedColumn,\n source,\n originalLine,\n originalColumn,\n name,\n });\n }\n }\n }\n function sourceIndex(map, source) {\n const { sources, resolvedSources } = map;\n let index = sources.indexOf(source);\n if (index === -1)\n index = resolvedSources.indexOf(source);\n return index;\n }\n /**\n * Retrieves the source content for a particular source, if its found. Returns null if not.\n */\n function sourceContentFor(map, source) {\n const { sourcesContent } = map;\n if (sourcesContent == null)\n return null;\n const index = sourceIndex(map, source);\n return index === -1 ? null : sourcesContent[index];\n }\n /**\n * Determines if the source is marked to ignore by the source map.\n */\n function isIgnored(map, source) {\n const { ignoreList } = map;\n if (ignoreList == null)\n return false;\n const index = sourceIndex(map, source);\n return index === -1 ? false : ignoreList.includes(index);\n }\n /**\n * A helper that skips sorting of the input map's mappings array, which can be expensive for larger\n * maps.\n */\n function presortedDecodedMap(map, mapUrl) {\n const tracer = new TraceMap(clone(map, []), mapUrl);\n cast(tracer)._decoded = map.mappings;\n return tracer;\n }\n /**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\n function decodedMap(map) {\n return clone(map, decodedMappings(map));\n }\n /**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\n function encodedMap(map) {\n return clone(map, encodedMappings(map));\n }\n function clone(map, mappings) {\n return {\n version: map.version,\n file: map.file,\n names: map.names,\n sourceRoot: map.sourceRoot,\n sources: map.sources,\n sourcesContent: map.sourcesContent,\n mappings,\n ignoreList: map.ignoreList || map.x_google_ignoreList,\n };\n }\n function OMapping(source, line, column, name) {\n return { source, line, column, name };\n }\n function GMapping(line, column) {\n return { line, column };\n }\n function traceSegmentInternal(segments, memo, line, column, bias) {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (found) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n }\n else if (bias === LEAST_UPPER_BOUND)\n index++;\n if (index === -1 || index === segments.length)\n return -1;\n return index;\n }\n function sliceGeneratedPositions(segments, memo, line, column, bias) {\n let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);\n // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in\n // insertion order) segment that matched. Even if we did respect the bias when tracing, we would\n // still need to call `lowerBound()` to find the first segment, which is slower than just looking\n // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the\n // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to\n // match LEAST_UPPER_BOUND.\n if (!found && bias === LEAST_UPPER_BOUND)\n min++;\n if (min === -1 || min === segments.length)\n return [];\n // We may have found the segment that started at an earlier column. If this is the case, then we\n // need to slice all generated segments that match _that_ column, because all such segments span\n // to our desired column.\n const matchedColumn = found ? column : segments[min][COLUMN];\n // The binary search is not guaranteed to find the lower bound when a match wasn't found.\n if (!found)\n min = lowerBound(segments, matchedColumn, min);\n const max = upperBound(segments, matchedColumn, min);\n const result = [];\n for (; min <= max; min++) {\n const segment = segments[min];\n result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));\n }\n return result;\n }\n function generatedPosition(map, source, line, column, bias, all) {\n var _a;\n line--;\n if (line < 0)\n throw new Error(LINE_GTR_ZERO);\n if (column < 0)\n throw new Error(COL_GTR_EQ_ZERO);\n const { sources, resolvedSources } = map;\n let sourceIndex = sources.indexOf(source);\n if (sourceIndex === -1)\n sourceIndex = resolvedSources.indexOf(source);\n if (sourceIndex === -1)\n return all ? [] : GMapping(null, null);\n const generated = ((_a = cast(map))._bySources || (_a._bySources = buildBySources(decodedMappings(map), (cast(map)._bySourceMemos = sources.map(memoizedState)))));\n const segments = generated[sourceIndex][line];\n if (segments == null)\n return all ? [] : GMapping(null, null);\n const memo = cast(map)._bySourceMemos[sourceIndex];\n if (all)\n return sliceGeneratedPositions(segments, memo, line, column, bias);\n const index = traceSegmentInternal(segments, memo, line, column, bias);\n if (index === -1)\n return GMapping(null, null);\n const segment = segments[index];\n return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);\n }\n\n exports.AnyMap = AnyMap;\n exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND;\n exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND;\n exports.TraceMap = TraceMap;\n exports.allGeneratedPositionsFor = allGeneratedPositionsFor;\n exports.decodedMap = decodedMap;\n exports.decodedMappings = decodedMappings;\n exports.eachMapping = eachMapping;\n exports.encodedMap = encodedMap;\n exports.encodedMappings = encodedMappings;\n exports.generatedPositionFor = generatedPositionFor;\n exports.isIgnored = isIgnored;\n exports.originalPositionFor = originalPositionFor;\n exports.presortedDecodedMap = presortedDecodedMap;\n exports.sourceContentFor = sourceContentFor;\n exports.traceSegment = traceSegment;\n\n}));\n//# sourceMappingURL=trace-mapping.umd.js.map\n","var resizeObservers = [];\nexport { resizeObservers };\n","var ResizeObserverBoxOptions;\n(function (ResizeObserverBoxOptions) {\n ResizeObserverBoxOptions[\"BORDER_BOX\"] = \"border-box\";\n ResizeObserverBoxOptions[\"CONTENT_BOX\"] = \"content-box\";\n ResizeObserverBoxOptions[\"DEVICE_PIXEL_CONTENT_BOX\"] = \"device-pixel-content-box\";\n})(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));\nexport { ResizeObserverBoxOptions };\n","var trigger;\nvar callbacks = [];\nvar notify = function () { return callbacks.splice(0).forEach(function (cb) { return cb(); }); };\nvar queueMicroTask = function (callback) {\n if (!trigger) {\n var toggle_1 = 0;\n var el_1 = document.createTextNode('');\n var config = { characterData: true };\n new MutationObserver(function () { return notify(); }).observe(el_1, config);\n trigger = function () { el_1.textContent = \"\".concat(toggle_1 ? toggle_1-- : toggle_1++); };\n }\n callbacks.push(callback);\n trigger();\n};\nexport { queueMicroTask };\n","var msg = 'ResizeObserver loop completed with undelivered notifications.';\nvar deliverResizeLoopError = function () {\n var event;\n if (typeof ErrorEvent === 'function') {\n event = new ErrorEvent('error', {\n message: msg\n });\n }\n else {\n event = document.createEvent('Event');\n event.initEvent('error', false, false);\n event.message = msg;\n }\n window.dispatchEvent(event);\n};\nexport { deliverResizeLoopError };\n","export var freeze = function (obj) { return Object.freeze(obj); };\n","import { freeze } from './utils/freeze';\nvar ResizeObserverSize = (function () {\n function ResizeObserverSize(inlineSize, blockSize) {\n this.inlineSize = inlineSize;\n this.blockSize = blockSize;\n freeze(this);\n }\n return ResizeObserverSize;\n}());\nexport { ResizeObserverSize };\n","import { freeze } from './utils/freeze';\nvar DOMRectReadOnly = (function () {\n function DOMRectReadOnly(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.top = this.y;\n this.left = this.x;\n this.bottom = this.top + this.height;\n this.right = this.left + this.width;\n return freeze(this);\n }\n DOMRectReadOnly.prototype.toJSON = function () {\n var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;\n return { x: x, y: y, top: top, right: right, bottom: bottom, left: left, width: width, height: height };\n };\n DOMRectReadOnly.fromRect = function (rectangle) {\n return new DOMRectReadOnly(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n };\n return DOMRectReadOnly;\n}());\nexport { DOMRectReadOnly };\n","var isSVG = function (target) { return target instanceof SVGElement && 'getBBox' in target; };\nvar isHidden = function (target) {\n if (isSVG(target)) {\n var _a = target.getBBox(), width = _a.width, height = _a.height;\n return !width && !height;\n }\n var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;\n return !(offsetWidth || offsetHeight || target.getClientRects().length);\n};\nvar isElement = function (obj) {\n var _a;\n if (obj instanceof Element) {\n return true;\n }\n var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;\n return !!(scope && obj instanceof scope.Element);\n};\nvar isReplacedElement = function (target) {\n switch (target.tagName) {\n case 'INPUT':\n if (target.type !== 'image') {\n break;\n }\n case 'VIDEO':\n case 'AUDIO':\n case 'EMBED':\n case 'OBJECT':\n case 'CANVAS':\n case 'IFRAME':\n case 'IMG':\n return true;\n }\n return false;\n};\nexport { isSVG, isHidden, isElement, isReplacedElement };\n","export var global = typeof window !== 'undefined' ? window : {};\n","import { ResizeObserverBoxOptions } from '../ResizeObserverBoxOptions';\nimport { ResizeObserverSize } from '../ResizeObserverSize';\nimport { DOMRectReadOnly } from '../DOMRectReadOnly';\nimport { isSVG, isHidden } from '../utils/element';\nimport { freeze } from '../utils/freeze';\nimport { global } from '../utils/global';\nvar cache = new WeakMap();\nvar scrollRegexp = /auto|scroll/;\nvar verticalRegexp = /^tb|vertical/;\nvar IE = (/msie|trident/i).test(global.navigator && global.navigator.userAgent);\nvar parseDimension = function (pixel) { return parseFloat(pixel || '0'); };\nvar size = function (inlineSize, blockSize, switchSizes) {\n if (inlineSize === void 0) { inlineSize = 0; }\n if (blockSize === void 0) { blockSize = 0; }\n if (switchSizes === void 0) { switchSizes = false; }\n return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);\n};\nvar zeroBoxes = freeze({\n devicePixelContentBoxSize: size(),\n borderBoxSize: size(),\n contentBoxSize: size(),\n contentRect: new DOMRectReadOnly(0, 0, 0, 0)\n});\nvar calculateBoxSizes = function (target, forceRecalculation) {\n if (forceRecalculation === void 0) { forceRecalculation = false; }\n if (cache.has(target) && !forceRecalculation) {\n return cache.get(target);\n }\n if (isHidden(target)) {\n cache.set(target, zeroBoxes);\n return zeroBoxes;\n }\n var cs = getComputedStyle(target);\n var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();\n var removePadding = !IE && cs.boxSizing === 'border-box';\n var switchSizes = verticalRegexp.test(cs.writingMode || '');\n var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || '');\n var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || '');\n var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);\n var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);\n var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);\n var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);\n var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);\n var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);\n var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);\n var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);\n var horizontalPadding = paddingLeft + paddingRight;\n var verticalPadding = paddingTop + paddingBottom;\n var horizontalBorderArea = borderLeft + borderRight;\n var verticalBorderArea = borderTop + borderBottom;\n var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;\n var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;\n var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;\n var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;\n var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;\n var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;\n var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;\n var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;\n var boxes = freeze({\n devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),\n borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),\n contentBoxSize: size(contentWidth, contentHeight, switchSizes),\n contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)\n });\n cache.set(target, boxes);\n return boxes;\n};\nvar calculateBoxSize = function (target, observedBox, forceRecalculation) {\n var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;\n switch (observedBox) {\n case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:\n return devicePixelContentBoxSize;\n case ResizeObserverBoxOptions.BORDER_BOX:\n return borderBoxSize;\n default:\n return contentBoxSize;\n }\n};\nexport { calculateBoxSize, calculateBoxSizes };\n","import { calculateBoxSizes } from './algorithms/calculateBoxSize';\nimport { freeze } from './utils/freeze';\nvar ResizeObserverEntry = (function () {\n function ResizeObserverEntry(target) {\n var boxes = calculateBoxSizes(target);\n this.target = target;\n this.contentRect = boxes.contentRect;\n this.borderBoxSize = freeze([boxes.borderBoxSize]);\n this.contentBoxSize = freeze([boxes.contentBoxSize]);\n this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);\n }\n return ResizeObserverEntry;\n}());\nexport { ResizeObserverEntry };\n","import { isHidden } from '../utils/element';\nvar calculateDepthForNode = function (node) {\n if (isHidden(node)) {\n return Infinity;\n }\n var depth = 0;\n var parent = node.parentNode;\n while (parent) {\n depth += 1;\n parent = parent.parentNode;\n }\n return depth;\n};\nexport { calculateDepthForNode };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { ResizeObserverEntry } from '../ResizeObserverEntry';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nimport { calculateBoxSize } from './calculateBoxSize';\nvar broadcastActiveObservations = function () {\n var shallowestDepth = Infinity;\n var callbacks = [];\n resizeObservers.forEach(function processObserver(ro) {\n if (ro.activeTargets.length === 0) {\n return;\n }\n var entries = [];\n ro.activeTargets.forEach(function processTarget(ot) {\n var entry = new ResizeObserverEntry(ot.target);\n var targetDepth = calculateDepthForNode(ot.target);\n entries.push(entry);\n ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);\n if (targetDepth < shallowestDepth) {\n shallowestDepth = targetDepth;\n }\n });\n callbacks.push(function resizeObserverCallback() {\n ro.callback.call(ro.observer, entries, ro.observer);\n });\n ro.activeTargets.splice(0, ro.activeTargets.length);\n });\n for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {\n var callback = callbacks_1[_i];\n callback();\n }\n return shallowestDepth;\n};\nexport { broadcastActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nvar gatherActiveObservationsAtDepth = function (depth) {\n resizeObservers.forEach(function processObserver(ro) {\n ro.activeTargets.splice(0, ro.activeTargets.length);\n ro.skippedTargets.splice(0, ro.skippedTargets.length);\n ro.observationTargets.forEach(function processTarget(ot) {\n if (ot.isActive()) {\n if (calculateDepthForNode(ot.target) > depth) {\n ro.activeTargets.push(ot);\n }\n else {\n ro.skippedTargets.push(ot);\n }\n }\n });\n });\n};\nexport { gatherActiveObservationsAtDepth };\n","import { hasActiveObservations } from '../algorithms/hasActiveObservations';\nimport { hasSkippedObservations } from '../algorithms/hasSkippedObservations';\nimport { deliverResizeLoopError } from '../algorithms/deliverResizeLoopError';\nimport { broadcastActiveObservations } from '../algorithms/broadcastActiveObservations';\nimport { gatherActiveObservationsAtDepth } from '../algorithms/gatherActiveObservationsAtDepth';\nvar process = function () {\n var depth = 0;\n gatherActiveObservationsAtDepth(depth);\n while (hasActiveObservations()) {\n depth = broadcastActiveObservations();\n gatherActiveObservationsAtDepth(depth);\n }\n if (hasSkippedObservations()) {\n deliverResizeLoopError();\n }\n return depth > 0;\n};\nexport { process };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasActiveObservations = function () {\n return resizeObservers.some(function (ro) { return ro.activeTargets.length > 0; });\n};\nexport { hasActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasSkippedObservations = function () {\n return resizeObservers.some(function (ro) { return ro.skippedTargets.length > 0; });\n};\nexport { hasSkippedObservations };\n","import { queueMicroTask } from './queueMicroTask';\nvar queueResizeObserver = function (cb) {\n queueMicroTask(function ResizeObserver() {\n requestAnimationFrame(cb);\n });\n};\nexport { queueResizeObserver };\n","import { process } from './process';\nimport { global } from './global';\nimport { queueResizeObserver } from './queueResizeObserver';\nvar watching = 0;\nvar isWatching = function () { return !!watching; };\nvar CATCH_PERIOD = 250;\nvar observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };\nvar events = [\n 'resize',\n 'load',\n 'transitionend',\n 'animationend',\n 'animationstart',\n 'animationiteration',\n 'keyup',\n 'keydown',\n 'mouseup',\n 'mousedown',\n 'mouseover',\n 'mouseout',\n 'blur',\n 'focus'\n];\nvar time = function (timeout) {\n if (timeout === void 0) { timeout = 0; }\n return Date.now() + timeout;\n};\nvar scheduled = false;\nvar Scheduler = (function () {\n function Scheduler() {\n var _this = this;\n this.stopped = true;\n this.listener = function () { return _this.schedule(); };\n }\n Scheduler.prototype.run = function (timeout) {\n var _this = this;\n if (timeout === void 0) { timeout = CATCH_PERIOD; }\n if (scheduled) {\n return;\n }\n scheduled = true;\n var until = time(timeout);\n queueResizeObserver(function () {\n var elementsHaveResized = false;\n try {\n elementsHaveResized = process();\n }\n finally {\n scheduled = false;\n timeout = until - time();\n if (!isWatching()) {\n return;\n }\n if (elementsHaveResized) {\n _this.run(1000);\n }\n else if (timeout > 0) {\n _this.run(timeout);\n }\n else {\n _this.start();\n }\n }\n });\n };\n Scheduler.prototype.schedule = function () {\n this.stop();\n this.run();\n };\n Scheduler.prototype.observe = function () {\n var _this = this;\n var cb = function () { return _this.observer && _this.observer.observe(document.body, observerConfig); };\n document.body ? cb() : global.addEventListener('DOMContentLoaded', cb);\n };\n Scheduler.prototype.start = function () {\n var _this = this;\n if (this.stopped) {\n this.stopped = false;\n this.observer = new MutationObserver(this.listener);\n this.observe();\n events.forEach(function (name) { return global.addEventListener(name, _this.listener, true); });\n }\n };\n Scheduler.prototype.stop = function () {\n var _this = this;\n if (!this.stopped) {\n this.observer && this.observer.disconnect();\n events.forEach(function (name) { return global.removeEventListener(name, _this.listener, true); });\n this.stopped = true;\n }\n };\n return Scheduler;\n}());\nvar scheduler = new Scheduler();\nvar updateCount = function (n) {\n !watching && n > 0 && scheduler.start();\n watching += n;\n !watching && scheduler.stop();\n};\nexport { scheduler, updateCount };\n","import { ResizeObserverBoxOptions } from './ResizeObserverBoxOptions';\nimport { calculateBoxSize } from './algorithms/calculateBoxSize';\nimport { isSVG, isReplacedElement } from './utils/element';\nvar skipNotifyOnElement = function (target) {\n return !isSVG(target)\n && !isReplacedElement(target)\n && getComputedStyle(target).display === 'inline';\n};\nvar ResizeObservation = (function () {\n function ResizeObservation(target, observedBox) {\n this.target = target;\n this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;\n this.lastReportedSize = {\n inlineSize: 0,\n blockSize: 0\n };\n }\n ResizeObservation.prototype.isActive = function () {\n var size = calculateBoxSize(this.target, this.observedBox, true);\n if (skipNotifyOnElement(this.target)) {\n this.lastReportedSize = size;\n }\n if (this.lastReportedSize.inlineSize !== size.inlineSize\n || this.lastReportedSize.blockSize !== size.blockSize) {\n return true;\n }\n return false;\n };\n return ResizeObservation;\n}());\nexport { ResizeObservation };\n","var ResizeObserverDetail = (function () {\n function ResizeObserverDetail(resizeObserver, callback) {\n this.activeTargets = [];\n this.skippedTargets = [];\n this.observationTargets = [];\n this.observer = resizeObserver;\n this.callback = callback;\n }\n return ResizeObserverDetail;\n}());\nexport { ResizeObserverDetail };\n","import { scheduler, updateCount } from './utils/scheduler';\nimport { ResizeObservation } from './ResizeObservation';\nimport { ResizeObserverDetail } from './ResizeObserverDetail';\nimport { resizeObservers } from './utils/resizeObservers';\nvar observerMap = new WeakMap();\nvar getObservationIndex = function (observationTargets, target) {\n for (var i = 0; i < observationTargets.length; i += 1) {\n if (observationTargets[i].target === target) {\n return i;\n }\n }\n return -1;\n};\nvar ResizeObserverController = (function () {\n function ResizeObserverController() {\n }\n ResizeObserverController.connect = function (resizeObserver, callback) {\n var detail = new ResizeObserverDetail(resizeObserver, callback);\n observerMap.set(resizeObserver, detail);\n };\n ResizeObserverController.observe = function (resizeObserver, target, options) {\n var detail = observerMap.get(resizeObserver);\n var firstObservation = detail.observationTargets.length === 0;\n if (getObservationIndex(detail.observationTargets, target) < 0) {\n firstObservation && resizeObservers.push(detail);\n detail.observationTargets.push(new ResizeObservation(target, options && options.box));\n updateCount(1);\n scheduler.schedule();\n }\n };\n ResizeObserverController.unobserve = function (resizeObserver, target) {\n var detail = observerMap.get(resizeObserver);\n var index = getObservationIndex(detail.observationTargets, target);\n var lastObservation = detail.observationTargets.length === 1;\n if (index >= 0) {\n lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);\n detail.observationTargets.splice(index, 1);\n updateCount(-1);\n }\n };\n ResizeObserverController.disconnect = function (resizeObserver) {\n var _this = this;\n var detail = observerMap.get(resizeObserver);\n detail.observationTargets.slice().forEach(function (ot) { return _this.unobserve(resizeObserver, ot.target); });\n detail.activeTargets.splice(0, detail.activeTargets.length);\n };\n return ResizeObserverController;\n}());\nexport { ResizeObserverController };\n","import { ResizeObserverController } from './ResizeObserverController';\nimport { isElement } from './utils/element';\nvar ResizeObserver = (function () {\n function ResizeObserver(callback) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (typeof callback !== 'function') {\n throw new TypeError(\"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.\");\n }\n ResizeObserverController.connect(this, callback);\n }\n ResizeObserver.prototype.observe = function (target, options) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.observe(this, target, options);\n };\n ResizeObserver.prototype.unobserve = function (target) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.unobserve(this, target);\n };\n ResizeObserver.prototype.disconnect = function () {\n ResizeObserverController.disconnect(this);\n };\n ResizeObserver.toString = function () {\n return 'function ResizeObserver () { [polyfill code] }';\n };\n return ResizeObserver;\n}());\nexport { ResizeObserver };\n","'use strict';\n\nmodule.exports = Point;\n\n/**\n * A standalone point geometry with useful accessor, comparison, and\n * modification methods.\n *\n * @class Point\n * @param {Number} x the x-coordinate. this could be longitude or screen\n * pixels, or any other sort of unit.\n * @param {Number} y the y-coordinate. this could be latitude or screen\n * pixels, or any other sort of unit.\n * @example\n * var point = new Point(-77, 38);\n */\nfunction Point(x, y) {\n this.x = x;\n this.y = y;\n}\n\nPoint.prototype = {\n\n /**\n * Clone this point, returning a new point that can be modified\n * without affecting the old one.\n * @return {Point} the clone\n */\n clone: function() { return new Point(this.x, this.y); },\n\n /**\n * Add this point's x & y coordinates to another point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n add: function(p) { return this.clone()._add(p); },\n\n /**\n * Subtract this point's x & y coordinates to from point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n sub: function(p) { return this.clone()._sub(p); },\n\n /**\n * Multiply this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n multByPoint: function(p) { return this.clone()._multByPoint(p); },\n\n /**\n * Divide this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n divByPoint: function(p) { return this.clone()._divByPoint(p); },\n\n /**\n * Multiply this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n mult: function(k) { return this.clone()._mult(k); },\n\n /**\n * Divide this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n div: function(k) { return this.clone()._div(k); },\n\n /**\n * Rotate this point around the 0, 0 origin by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @return {Point} output point\n */\n rotate: function(a) { return this.clone()._rotate(a); },\n\n /**\n * Rotate this point around p point by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @param {Point} p Point to rotate around\n * @return {Point} output point\n */\n rotateAround: function(a,p) { return this.clone()._rotateAround(a,p); },\n\n /**\n * Multiply this point by a 4x1 transformation matrix\n * @param {Array} m transformation matrix\n * @return {Point} output point\n */\n matMult: function(m) { return this.clone()._matMult(m); },\n\n /**\n * Calculate this point but as a unit vector from 0, 0, meaning\n * that the distance from the resulting point to the 0, 0\n * coordinate will be equal to 1 and the angle from the resulting\n * point to the 0, 0 coordinate will be the same as before.\n * @return {Point} unit vector point\n */\n unit: function() { return this.clone()._unit(); },\n\n /**\n * Compute a perpendicular point, where the new y coordinate\n * is the old x coordinate and the new x coordinate is the old y\n * coordinate multiplied by -1\n * @return {Point} perpendicular point\n */\n perp: function() { return this.clone()._perp(); },\n\n /**\n * Return a version of this point with the x & y coordinates\n * rounded to integers.\n * @return {Point} rounded point\n */\n round: function() { return this.clone()._round(); },\n\n /**\n * Return the magitude of this point: this is the Euclidean\n * distance from the 0, 0 coordinate to this point's x and y\n * coordinates.\n * @return {Number} magnitude\n */\n mag: function() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n },\n\n /**\n * Judge whether this point is equal to another point, returning\n * true or false.\n * @param {Point} other the other point\n * @return {boolean} whether the points are equal\n */\n equals: function(other) {\n return this.x === other.x &&\n this.y === other.y;\n },\n\n /**\n * Calculate the distance from this point to another point\n * @param {Point} p the other point\n * @return {Number} distance\n */\n dist: function(p) {\n return Math.sqrt(this.distSqr(p));\n },\n\n /**\n * Calculate the distance from this point to another point,\n * without the square root step. Useful if you're comparing\n * relative distances.\n * @param {Point} p the other point\n * @return {Number} distance\n */\n distSqr: function(p) {\n var dx = p.x - this.x,\n dy = p.y - this.y;\n return dx * dx + dy * dy;\n },\n\n /**\n * Get the angle from the 0, 0 coordinate to this point, in radians\n * coordinates.\n * @return {Number} angle\n */\n angle: function() {\n return Math.atan2(this.y, this.x);\n },\n\n /**\n * Get the angle from this point to another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleTo: function(b) {\n return Math.atan2(this.y - b.y, this.x - b.x);\n },\n\n /**\n * Get the angle between this point and another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleWith: function(b) {\n return this.angleWithSep(b.x, b.y);\n },\n\n /*\n * Find the angle of the two vectors, solving the formula for\n * the cross product a x b = |a||b|sin(θ) for θ.\n * @param {Number} x the x-coordinate\n * @param {Number} y the y-coordinate\n * @return {Number} the angle in radians\n */\n angleWithSep: function(x, y) {\n return Math.atan2(\n this.x * y - this.y * x,\n this.x * x + this.y * y);\n },\n\n _matMult: function(m) {\n var x = m[0] * this.x + m[1] * this.y,\n y = m[2] * this.x + m[3] * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n _add: function(p) {\n this.x += p.x;\n this.y += p.y;\n return this;\n },\n\n _sub: function(p) {\n this.x -= p.x;\n this.y -= p.y;\n return this;\n },\n\n _mult: function(k) {\n this.x *= k;\n this.y *= k;\n return this;\n },\n\n _div: function(k) {\n this.x /= k;\n this.y /= k;\n return this;\n },\n\n _multByPoint: function(p) {\n this.x *= p.x;\n this.y *= p.y;\n return this;\n },\n\n _divByPoint: function(p) {\n this.x /= p.x;\n this.y /= p.y;\n return this;\n },\n\n _unit: function() {\n this._div(this.mag());\n return this;\n },\n\n _perp: function() {\n var y = this.y;\n this.y = this.x;\n this.x = -y;\n return this;\n },\n\n _rotate: function(angle) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = cos * this.x - sin * this.y,\n y = sin * this.x + cos * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n _rotateAround: function(angle, p) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y),\n y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);\n this.x = x;\n this.y = y;\n return this;\n },\n\n _round: function() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n }\n};\n\n/**\n * Construct a point from an array if necessary, otherwise if the input\n * is already a Point, or an unknown type, return it unchanged\n * @param {Array|Point|*} a any kind of input value\n * @return {Point} constructed point, or passed-through value.\n * @example\n * // this\n * var point = Point.convert([0, 1]);\n * // is equivalent to\n * var point = new Point(0, 1);\n */\nPoint.convert = function (a) {\n if (a instanceof Point) {\n return a;\n }\n if (Array.isArray(a)) {\n return new Point(a[0], a[1]);\n }\n return a;\n};\n","'use strict';\n\nconst visit = require('unist-util-visit');\nconst nodeToString = require('hast-util-to-string');\nconst refractor = require('refractor');\n\nmodule.exports = (options) => {\n options = options || {};\n\n if (options.alias) {\n refractor.alias(options.alias);\n }\n\n return (tree) => {\n visit(tree, 'element', visitor);\n };\n\n function visitor(node, index, parent) {\n if (!parent || parent.tagName !== 'pre' || node.tagName !== 'code') {\n return;\n }\n\n const lang = getLanguage(node);\n\n if (lang === null) {\n return;\n }\n\n let result;\n try {\n parent.properties.className = (parent.properties.className || []).concat(\n 'language-' + lang\n );\n result = refractor.highlight(nodeToString(node), lang);\n } catch (err) {\n if (options.ignoreMissing && /Unknown language/.test(err.message)) {\n return;\n }\n throw err;\n }\n\n node.children = result;\n }\n};\n\nfunction getLanguage(node) {\n const className = node.properties.className || [];\n\n for (const classListItem of className) {\n if (classListItem.slice(0, 9) === 'language-') {\n return classListItem.slice(9).toLowerCase();\n }\n }\n\n return null;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nvar V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"1.54.2\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nvar validateLoadParams = function validateLoadParams(params) {\n var errorMessage = \"invalid load parameters; expected object of shape\\n\\n {advancedFraudSignals: boolean}\\n\\nbut received\\n\\n \".concat(JSON.stringify(params), \"\\n\");\n\n if (params === null || _typeof(params) !== 'object') {\n throw new Error(errorMessage);\n }\n\n if (Object.keys(params).length === 1 && typeof params.advancedFraudSignals === 'boolean') {\n return params;\n }\n\n throw new Error(errorMessage);\n};\n\nvar loadParams;\nvar loadStripeCalled = false;\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadStripeCalled = true;\n var startTime = Date.now();\n return loadScript(loadParams).then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nloadStripe.setLoadParameters = function (params) {\n // we won't throw an error if setLoadParameters is called with the same values as before\n if (loadStripeCalled && loadParams) {\n var validatedParams = validateLoadParams(params);\n var parameterKeys = Object.keys(validatedParams);\n var sameParameters = parameterKeys.reduce(function (previousValue, currentValue) {\n var _loadParams;\n\n return previousValue && params[currentValue] === ((_loadParams = loadParams) === null || _loadParams === void 0 ? void 0 : _loadParams[currentValue]);\n }, true);\n\n if (sameParameters) {\n return;\n }\n }\n\n if (loadStripeCalled) {\n throw new Error('You cannot change load parameters after calling loadStripe');\n }\n\n loadParams = validateLoadParams(params);\n};\n\nexports.loadStripe = loadStripe;\n","module.exports = require('./dist/pure.js');\n","/**\n * Copyright (c) 2017-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nimport { uuid } from './Utils';\nvar createState = function () { return ({\n listeners: [],\n scriptId: uuid('tiny-script'),\n scriptLoading: false,\n scriptLoaded: false\n}); };\nvar CreateScriptLoader = function () {\n var state = createState();\n var injectScriptTag = function (scriptId, doc, url, async, defer, callback) {\n var scriptTag = doc.createElement('script');\n scriptTag.referrerPolicy = 'origin';\n scriptTag.type = 'application/javascript';\n scriptTag.id = scriptId;\n scriptTag.src = url;\n scriptTag.async = async;\n scriptTag.defer = defer;\n var handler = function () {\n scriptTag.removeEventListener('load', handler);\n callback();\n };\n scriptTag.addEventListener('load', handler);\n if (doc.head) {\n doc.head.appendChild(scriptTag);\n }\n };\n var load = function (doc, url, async, defer, delay, callback) {\n var scriptTagInjection = function () { return injectScriptTag(state.scriptId, doc, url, async, defer, function () {\n state.listeners.forEach(function (fn) { return fn(); });\n state.scriptLoaded = true;\n }); };\n if (state.scriptLoaded) {\n callback();\n }\n else {\n state.listeners.push(callback);\n if (!state.scriptLoading) {\n state.scriptLoading = true;\n if (delay > 0) {\n setTimeout(scriptTagInjection, delay);\n }\n else {\n scriptTagInjection();\n }\n }\n }\n };\n // Only to be used by tests.\n var reinitialize = function () {\n state = createState();\n };\n return {\n load: load,\n reinitialize: reinitialize\n };\n};\nvar ScriptLoader = CreateScriptLoader();\nexport { ScriptLoader };\n","/**\n * Copyright (c) 2017-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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};\nimport * as React from 'react';\nimport { ScriptLoader } from '../ScriptLoader';\nimport { getTinymce } from '../TinyMCE';\nimport { isFunction, isTextareaOrInput, mergePlugins, uuid, configHandlers, isBeforeInputEventAvailable, isInDoc } from '../Utils';\nimport { EditorPropTypes } from './EditorPropTypes';\nvar changeEvents = function () { var _a, _b, _c; return ((_c = (_b = (_a = getTinymce()) === null || _a === void 0 ? void 0 : _a.Env) === null || _b === void 0 ? void 0 : _b.browser) === null || _c === void 0 ? void 0 : _c.isIE()) ? 'change keyup compositionend setcontent' : 'change input compositionend setcontent'; };\nvar beforeInputEvent = function () { return isBeforeInputEventAvailable() ? 'beforeinput SelectionChange' : 'SelectionChange'; };\nvar Editor = /** @class */ (function (_super) {\n __extends(Editor, _super);\n function Editor(props) {\n var _a, _b, _c;\n var _this = _super.call(this, props) || this;\n _this.rollbackTimer = undefined;\n _this.valueCursor = undefined;\n _this.rollbackChange = function () {\n var editor = _this.editor;\n var value = _this.props.value;\n if (editor && value && value !== _this.currentContent) {\n editor.undoManager.ignore(function () {\n editor.setContent(value);\n // only restore cursor on inline editors when they are focused\n // as otherwise it will cause a focus grab\n if (_this.valueCursor && (!_this.inline || editor.hasFocus())) {\n try {\n editor.selection.moveToBookmark(_this.valueCursor);\n }\n catch (e) { /* ignore */ }\n }\n });\n }\n _this.rollbackTimer = undefined;\n };\n _this.handleBeforeInput = function (_evt) {\n if (_this.props.value !== undefined && _this.props.value === _this.currentContent && _this.editor) {\n if (!_this.inline || _this.editor.hasFocus) {\n try {\n // getBookmark throws exceptions when the editor has not been focused\n // possibly only in inline mode but I'm not taking chances\n _this.valueCursor = _this.editor.selection.getBookmark(3);\n }\n catch (e) { /* ignore */ }\n }\n }\n };\n _this.handleBeforeInputSpecial = function (evt) {\n if (evt.key === 'Enter' || evt.key === 'Backspace' || evt.key === 'Delete') {\n _this.handleBeforeInput(evt);\n }\n };\n _this.handleEditorChange = function (_evt) {\n var editor = _this.editor;\n if (editor && editor.initialized) {\n var newContent = editor.getContent();\n if (_this.props.value !== undefined && _this.props.value !== newContent && _this.props.rollback !== false) {\n // start a timer and revert to the value if not applied in time\n if (!_this.rollbackTimer) {\n _this.rollbackTimer = window.setTimeout(_this.rollbackChange, typeof _this.props.rollback === 'number' ? _this.props.rollback : 200);\n }\n }\n if (newContent !== _this.currentContent) {\n _this.currentContent = newContent;\n if (isFunction(_this.props.onEditorChange)) {\n var format = _this.props.outputFormat;\n var out = format === 'html' ? newContent : editor.getContent({ format: format });\n _this.props.onEditorChange(out, editor);\n }\n }\n }\n };\n _this.handleEditorChangeSpecial = function (evt) {\n if (evt.key === 'Backspace' || evt.key === 'Delete') {\n _this.handleEditorChange(evt);\n }\n };\n _this.initialise = function (attempts) {\n var _a, _b, _c;\n if (attempts === void 0) { attempts = 0; }\n var target = _this.elementRef.current;\n if (!target) {\n return; // Editor has been unmounted\n }\n if (!isInDoc(target)) {\n // this is probably someone trying to help by rendering us offscreen\n // but we can't do that because the editor iframe must be in the document\n // in order to have state\n if (attempts === 0) {\n // we probably just need to wait for the current events to be processed\n setTimeout(function () { return _this.initialise(1); }, 1);\n }\n else if (attempts < 100) {\n // wait for ten seconds, polling every tenth of a second\n setTimeout(function () { return _this.initialise(attempts + 1); }, 100);\n }\n else {\n // give up, at this point it seems that more polling is unlikely to help\n throw new Error('tinymce can only be initialised when in a document');\n }\n return;\n }\n var tinymce = getTinymce();\n if (!tinymce) {\n throw new Error('tinymce should have been loaded into global scope');\n }\n var finalInit = __assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: mergePlugins((_a = _this.props.init) === null || _a === void 0 ? void 0 : _a.plugins, _this.props.plugins), toolbar: (_b = _this.props.toolbar) !== null && _b !== void 0 ? _b : (_c = _this.props.init) === null || _c === void 0 ? void 0 : _c.toolbar, setup: function (editor) {\n _this.editor = editor;\n _this.bindHandlers({});\n // When running in inline mode the editor gets the initial value\n // from the innerHTML of the element it is initialized on.\n // However we don't want to take on the responsibility of sanitizing\n // to remove XSS in the react integration so we have a chicken and egg\n // problem... We avoid it by sneaking in a set content before the first\n // \"official\" setContent and using TinyMCE to do the sanitization.\n if (_this.inline && !isTextareaOrInput(target)) {\n editor.once('PostRender', function (_evt) {\n editor.setContent(_this.getInitialValue(), { no_events: true });\n });\n }\n if (_this.props.init && isFunction(_this.props.init.setup)) {\n _this.props.init.setup(editor);\n }\n }, init_instance_callback: function (editor) {\n var _a, _b;\n // check for changes that happened since tinymce.init() was called\n var initialValue = _this.getInitialValue();\n _this.currentContent = (_a = _this.currentContent) !== null && _a !== void 0 ? _a : editor.getContent();\n if (_this.currentContent !== initialValue) {\n _this.currentContent = initialValue;\n // same as resetContent in TinyMCE 5\n editor.setContent(initialValue);\n editor.undoManager.clear();\n editor.undoManager.add();\n editor.setDirty(false);\n }\n var disabled = (_b = _this.props.disabled) !== null && _b !== void 0 ? _b : false;\n editor.setMode(disabled ? 'readonly' : 'design');\n // ensure existing init_instance_callback is called\n if (_this.props.init && isFunction(_this.props.init.init_instance_callback)) {\n _this.props.init.init_instance_callback(editor);\n }\n } });\n if (!_this.inline) {\n target.style.visibility = '';\n }\n if (isTextareaOrInput(target)) {\n target.value = _this.getInitialValue();\n }\n tinymce.init(finalInit);\n };\n _this.id = _this.props.id || uuid('tiny-react');\n _this.elementRef = React.createRef();\n _this.inline = (_c = (_a = _this.props.inline) !== null && _a !== void 0 ? _a : (_b = _this.props.init) === null || _b === void 0 ? void 0 : _b.inline) !== null && _c !== void 0 ? _c : false;\n _this.boundHandlers = {};\n return _this;\n }\n Editor.prototype.componentDidUpdate = function (prevProps) {\n var _this = this;\n var _a, _b;\n if (this.rollbackTimer) {\n clearTimeout(this.rollbackTimer);\n this.rollbackTimer = undefined;\n }\n if (this.editor) {\n this.bindHandlers(prevProps);\n if (this.editor.initialized) {\n this.currentContent = (_a = this.currentContent) !== null && _a !== void 0 ? _a : this.editor.getContent();\n if (typeof this.props.initialValue === 'string' && this.props.initialValue !== prevProps.initialValue) {\n // same as resetContent in TinyMCE 5\n this.editor.setContent(this.props.initialValue);\n this.editor.undoManager.clear();\n this.editor.undoManager.add();\n this.editor.setDirty(false);\n }\n else if (typeof this.props.value === 'string' && this.props.value !== this.currentContent) {\n var localEditor_1 = this.editor;\n localEditor_1.undoManager.transact(function () {\n // inline editors grab focus when restoring selection\n // so we don't try to keep their selection unless they are currently focused\n var cursor;\n if (!_this.inline || localEditor_1.hasFocus()) {\n try {\n // getBookmark throws exceptions when the editor has not been focused\n // possibly only in inline mode but I'm not taking chances\n cursor = localEditor_1.selection.getBookmark(3);\n }\n catch (e) { /* ignore */ }\n }\n var valueCursor = _this.valueCursor;\n localEditor_1.setContent(_this.props.value);\n if (!_this.inline || localEditor_1.hasFocus()) {\n for (var _i = 0, _a = [cursor, valueCursor]; _i < _a.length; _i++) {\n var bookmark = _a[_i];\n if (bookmark) {\n try {\n localEditor_1.selection.moveToBookmark(bookmark);\n _this.valueCursor = bookmark;\n break;\n }\n catch (e) { /* ignore */ }\n }\n }\n }\n });\n }\n if (this.props.disabled !== prevProps.disabled) {\n var disabled = (_b = this.props.disabled) !== null && _b !== void 0 ? _b : false;\n this.editor.setMode(disabled ? 'readonly' : 'design');\n }\n }\n }\n };\n Editor.prototype.componentDidMount = function () {\n var _a, _b, _c, _d, _e, _f;\n if (getTinymce() !== null) {\n this.initialise();\n }\n else if (this.elementRef.current && this.elementRef.current.ownerDocument) {\n ScriptLoader.load(this.elementRef.current.ownerDocument, this.getScriptSrc(), (_b = (_a = this.props.scriptLoading) === null || _a === void 0 ? void 0 : _a.async) !== null && _b !== void 0 ? _b : false, (_d = (_c = this.props.scriptLoading) === null || _c === void 0 ? void 0 : _c.defer) !== null && _d !== void 0 ? _d : false, (_f = (_e = this.props.scriptLoading) === null || _e === void 0 ? void 0 : _e.delay) !== null && _f !== void 0 ? _f : 0, this.initialise);\n }\n };\n Editor.prototype.componentWillUnmount = function () {\n var _this = this;\n var editor = this.editor;\n if (editor) {\n editor.off(changeEvents(), this.handleEditorChange);\n editor.off(beforeInputEvent(), this.handleBeforeInput);\n editor.off('keypress', this.handleEditorChangeSpecial);\n editor.off('keydown', this.handleBeforeInputSpecial);\n editor.off('NewBlock', this.handleEditorChange);\n Object.keys(this.boundHandlers).forEach(function (eventName) {\n editor.off(eventName, _this.boundHandlers[eventName]);\n });\n this.boundHandlers = {};\n editor.remove();\n this.editor = undefined;\n }\n };\n Editor.prototype.render = function () {\n return this.inline ? this.renderInline() : this.renderIframe();\n };\n Editor.prototype.renderInline = function () {\n var _a = this.props.tagName, tagName = _a === void 0 ? 'div' : _a;\n return React.createElement(tagName, {\n ref: this.elementRef,\n id: this.id\n });\n };\n Editor.prototype.renderIframe = function () {\n return React.createElement('textarea', {\n ref: this.elementRef,\n style: { visibility: 'hidden' },\n name: this.props.textareaName,\n id: this.id\n });\n };\n Editor.prototype.getScriptSrc = function () {\n if (typeof this.props.tinymceScriptSrc === 'string') {\n return this.props.tinymceScriptSrc;\n }\n else {\n var channel = this.props.cloudChannel;\n var apiKey = this.props.apiKey ? this.props.apiKey : 'no-api-key';\n return \"https://cdn.tiny.cloud/1/\" + apiKey + \"/tinymce/\" + channel + \"/tinymce.min.js\";\n }\n };\n Editor.prototype.getInitialValue = function () {\n if (typeof this.props.initialValue === 'string') {\n return this.props.initialValue;\n }\n else if (typeof this.props.value === 'string') {\n return this.props.value;\n }\n else {\n return '';\n }\n };\n Editor.prototype.bindHandlers = function (prevProps) {\n var _this = this;\n if (this.editor !== undefined) {\n // typescript chokes trying to understand the type of the lookup function\n configHandlers(this.editor, prevProps, this.props, this.boundHandlers, function (key) { return _this.props[key]; });\n // check if we should monitor editor changes\n var isValueControlled = function (p) { return p.onEditorChange !== undefined || p.value !== undefined; };\n var wasControlled = isValueControlled(prevProps);\n var nowControlled = isValueControlled(this.props);\n if (!wasControlled && nowControlled) {\n this.editor.on(changeEvents(), this.handleEditorChange);\n this.editor.on(beforeInputEvent(), this.handleBeforeInput);\n this.editor.on('keydown', this.handleBeforeInputSpecial);\n this.editor.on('keyup', this.handleEditorChangeSpecial);\n this.editor.on('NewBlock', this.handleEditorChange);\n }\n else if (wasControlled && !nowControlled) {\n this.editor.off(changeEvents(), this.handleEditorChange);\n this.editor.off(beforeInputEvent(), this.handleBeforeInput);\n this.editor.off('keydown', this.handleBeforeInputSpecial);\n this.editor.off('keyup', this.handleEditorChangeSpecial);\n this.editor.off('NewBlock', this.handleEditorChange);\n }\n }\n };\n Editor.propTypes = EditorPropTypes;\n Editor.defaultProps = {\n cloudChannel: '5'\n };\n return Editor;\n}(React.Component));\nexport { Editor };\n","/**\n * Copyright (c) 2017-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\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};\nimport * as PropTypes from 'prop-types';\nexport var eventPropTypes = {\n onActivate: PropTypes.func,\n onAddUndo: PropTypes.func,\n onBeforeAddUndo: PropTypes.func,\n onBeforeExecCommand: PropTypes.func,\n onBeforeGetContent: PropTypes.func,\n onBeforeRenderUI: PropTypes.func,\n onBeforeSetContent: PropTypes.func,\n onBeforePaste: PropTypes.func,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onClearUndos: PropTypes.func,\n onClick: PropTypes.func,\n onContextMenu: PropTypes.func,\n onCopy: PropTypes.func,\n onCut: PropTypes.func,\n onDblclick: PropTypes.func,\n onDeactivate: PropTypes.func,\n onDirty: PropTypes.func,\n onDrag: PropTypes.func,\n onDragDrop: PropTypes.func,\n onDragEnd: PropTypes.func,\n onDragGesture: PropTypes.func,\n onDragOver: PropTypes.func,\n onDrop: PropTypes.func,\n onExecCommand: PropTypes.func,\n onFocus: PropTypes.func,\n onFocusIn: PropTypes.func,\n onFocusOut: PropTypes.func,\n onGetContent: PropTypes.func,\n onHide: PropTypes.func,\n onInit: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyPress: PropTypes.func,\n onKeyUp: PropTypes.func,\n onLoadContent: PropTypes.func,\n onMouseDown: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseMove: PropTypes.func,\n onMouseOut: PropTypes.func,\n onMouseOver: PropTypes.func,\n onMouseUp: PropTypes.func,\n onNodeChange: PropTypes.func,\n onObjectResizeStart: PropTypes.func,\n onObjectResized: PropTypes.func,\n onObjectSelected: PropTypes.func,\n onPaste: PropTypes.func,\n onPostProcess: PropTypes.func,\n onPostRender: PropTypes.func,\n onPreProcess: PropTypes.func,\n onProgressState: PropTypes.func,\n onRedo: PropTypes.func,\n onRemove: PropTypes.func,\n onReset: PropTypes.func,\n onSaveContent: PropTypes.func,\n onSelectionChange: PropTypes.func,\n onSetAttrib: PropTypes.func,\n onSetContent: PropTypes.func,\n onShow: PropTypes.func,\n onSubmit: PropTypes.func,\n onUndo: PropTypes.func,\n onVisualAid: PropTypes.func\n};\nexport var EditorPropTypes = __assign({ apiKey: PropTypes.string, id: PropTypes.string, inline: PropTypes.bool, init: PropTypes.object, initialValue: PropTypes.string, onEditorChange: PropTypes.func, outputFormat: PropTypes.oneOf(['html', 'text']), value: PropTypes.string, tagName: PropTypes.string, cloudChannel: PropTypes.string, plugins: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), toolbar: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), disabled: PropTypes.bool, textareaName: PropTypes.string, tinymceScriptSrc: PropTypes.string, rollback: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf([false])]), scriptLoading: PropTypes.shape({\n async: PropTypes.bool,\n defer: PropTypes.bool,\n delay: PropTypes.number\n }) }, eventPropTypes);\n","/**\n * Copyright (c) 2017-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nimport { eventPropTypes } from './components/EditorPropTypes';\nexport var isFunction = function (x) { return typeof x === 'function'; };\nvar isEventProp = function (name) { return name in eventPropTypes; };\nvar eventAttrToEventName = function (attrName) { return attrName.substr(2); };\nexport var configHandlers2 = function (handlerLookup, on, off, adapter, prevProps, props, boundHandlers) {\n var prevEventKeys = Object.keys(prevProps).filter(isEventProp);\n var currEventKeys = Object.keys(props).filter(isEventProp);\n var removedKeys = prevEventKeys.filter(function (key) { return props[key] === undefined; });\n var addedKeys = currEventKeys.filter(function (key) { return prevProps[key] === undefined; });\n removedKeys.forEach(function (key) {\n // remove event handler\n var eventName = eventAttrToEventName(key);\n var wrappedHandler = boundHandlers[eventName];\n off(eventName, wrappedHandler);\n delete boundHandlers[eventName];\n });\n addedKeys.forEach(function (key) {\n var wrappedHandler = adapter(handlerLookup, key);\n var eventName = eventAttrToEventName(key);\n boundHandlers[eventName] = wrappedHandler;\n on(eventName, wrappedHandler);\n });\n};\nexport var configHandlers = function (editor, prevProps, props, boundHandlers, lookup) {\n return configHandlers2(lookup, editor.on.bind(editor), editor.off.bind(editor), function (handlerLookup, key) { return function (e) { var _a; return (_a = handlerLookup(key)) === null || _a === void 0 ? void 0 : _a(e, editor); }; }, prevProps, props, boundHandlers);\n};\nvar unique = 0;\nexport var uuid = function (prefix) {\n var time = Date.now();\n var random = Math.floor(Math.random() * 1000000000);\n unique++;\n return prefix + '_' + random + unique + String(time);\n};\nexport var isTextareaOrInput = function (element) {\n return element !== null && (element.tagName.toLowerCase() === 'textarea' || element.tagName.toLowerCase() === 'input');\n};\nvar normalizePluginArray = function (plugins) {\n if (typeof plugins === 'undefined' || plugins === '') {\n return [];\n }\n return Array.isArray(plugins) ? plugins : plugins.split(' ');\n};\n// eslint-disable-next-line max-len\nexport var mergePlugins = function (initPlugins, inputPlugins) { return normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins)); };\nexport var isBeforeInputEventAvailable = function () { return window.InputEvent && typeof InputEvent.prototype.getTargetRanges === 'function'; };\nexport var isInDoc = function (elem) {\n if (!('isConnected' in Node.prototype)) {\n // Fallback for IE and old Edge\n var current = elem;\n var parent_1 = elem.parentNode;\n while (parent_1 != null) {\n current = parent_1;\n parent_1 = current.parentNode;\n }\n return current === elem.ownerDocument;\n }\n return elem.isConnected;\n};\n","/**\n * Copyright (c) 2017-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nvar getGlobal = function () { return (typeof window !== 'undefined' ? window : global); };\nvar getTinymce = function () {\n var global = getGlobal();\n return global && global.tinymce ? global.tinymce : null;\n};\nexport { getTinymce };\n","/*!\n\tautosize 4.0.4\n\tlicense: MIT\n\thttp://www.jacklmoore.com/autosize\n*/\n(function (global, factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\tdefine(['module', 'exports'], factory);\n\t} else if (typeof exports !== \"undefined\") {\n\t\tfactory(module, exports);\n\t} else {\n\t\tvar mod = {\n\t\t\texports: {}\n\t\t};\n\t\tfactory(mod, mod.exports);\n\t\tglobal.autosize = mod.exports;\n\t}\n})(this, function (module, exports) {\n\t'use strict';\n\n\tvar map = typeof Map === \"function\" ? new Map() : function () {\n\t\tvar keys = [];\n\t\tvar values = [];\n\n\t\treturn {\n\t\t\thas: function has(key) {\n\t\t\t\treturn keys.indexOf(key) > -1;\n\t\t\t},\n\t\t\tget: function get(key) {\n\t\t\t\treturn values[keys.indexOf(key)];\n\t\t\t},\n\t\t\tset: function set(key, value) {\n\t\t\t\tif (keys.indexOf(key) === -1) {\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t\tvalues.push(value);\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelete: function _delete(key) {\n\t\t\t\tvar index = keys.indexOf(key);\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tkeys.splice(index, 1);\n\t\t\t\t\tvalues.splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}();\n\n\tvar createEvent = function createEvent(name) {\n\t\treturn new Event(name, { bubbles: true });\n\t};\n\ttry {\n\t\tnew Event('test');\n\t} catch (e) {\n\t\t// IE does not support `new Event()`\n\t\tcreateEvent = function createEvent(name) {\n\t\t\tvar evt = document.createEvent('Event');\n\t\t\tevt.initEvent(name, true, false);\n\t\t\treturn evt;\n\t\t};\n\t}\n\n\tfunction assign(ta) {\n\t\tif (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;\n\n\t\tvar heightOffset = null;\n\t\tvar clientWidth = null;\n\t\tvar cachedHeight = null;\n\n\t\tfunction init() {\n\t\t\tvar style = window.getComputedStyle(ta, null);\n\n\t\t\tif (style.resize === 'vertical') {\n\t\t\t\tta.style.resize = 'none';\n\t\t\t} else if (style.resize === 'both') {\n\t\t\t\tta.style.resize = 'horizontal';\n\t\t\t}\n\n\t\t\tif (style.boxSizing === 'content-box') {\n\t\t\t\theightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n\t\t\t} else {\n\t\t\t\theightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n\t\t\t}\n\t\t\t// Fix when a textarea is not on document body and heightOffset is Not a Number\n\t\t\tif (isNaN(heightOffset)) {\n\t\t\t\theightOffset = 0;\n\t\t\t}\n\n\t\t\tupdate();\n\t\t}\n\n\t\tfunction changeOverflow(value) {\n\t\t\t{\n\t\t\t\t// Chrome/Safari-specific fix:\n\t\t\t\t// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space\n\t\t\t\t// made available by removing the scrollbar. The following forces the necessary text reflow.\n\t\t\t\tvar width = ta.style.width;\n\t\t\t\tta.style.width = '0px';\n\t\t\t\t// Force reflow:\n\t\t\t\t/* jshint ignore:start */\n\t\t\t\tta.offsetWidth;\n\t\t\t\t/* jshint ignore:end */\n\t\t\t\tta.style.width = width;\n\t\t\t}\n\n\t\t\tta.style.overflowY = value;\n\t\t}\n\n\t\tfunction getParentOverflows(el) {\n\t\t\tvar arr = [];\n\n\t\t\twhile (el && el.parentNode && el.parentNode instanceof Element) {\n\t\t\t\tif (el.parentNode.scrollTop) {\n\t\t\t\t\tarr.push({\n\t\t\t\t\t\tnode: el.parentNode,\n\t\t\t\t\t\tscrollTop: el.parentNode.scrollTop\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tel = el.parentNode;\n\t\t\t}\n\n\t\t\treturn arr;\n\t\t}\n\n\t\tfunction resize() {\n\t\t\tif (ta.scrollHeight === 0) {\n\t\t\t\t// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar overflows = getParentOverflows(ta);\n\t\t\tvar docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)\n\n\t\t\tta.style.height = '';\n\t\t\tta.style.height = ta.scrollHeight + heightOffset + 'px';\n\n\t\t\t// used to check if an update is actually necessary on window.resize\n\t\t\tclientWidth = ta.clientWidth;\n\n\t\t\t// prevents scroll-position jumping\n\t\t\toverflows.forEach(function (el) {\n\t\t\t\tel.node.scrollTop = el.scrollTop;\n\t\t\t});\n\n\t\t\tif (docTop) {\n\t\t\t\tdocument.documentElement.scrollTop = docTop;\n\t\t\t}\n\t\t}\n\n\t\tfunction update() {\n\t\t\tresize();\n\n\t\t\tvar styleHeight = Math.round(parseFloat(ta.style.height));\n\t\t\tvar computed = window.getComputedStyle(ta, null);\n\n\t\t\t// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box\n\t\t\tvar actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;\n\n\t\t\t// The actual height not matching the style height (set via the resize method) indicates that \n\t\t\t// the max-height has been exceeded, in which case the overflow should be allowed.\n\t\t\tif (actualHeight < styleHeight) {\n\t\t\t\tif (computed.overflowY === 'hidden') {\n\t\t\t\t\tchangeOverflow('scroll');\n\t\t\t\t\tresize();\n\t\t\t\t\tactualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.\n\t\t\t\tif (computed.overflowY !== 'hidden') {\n\t\t\t\t\tchangeOverflow('hidden');\n\t\t\t\t\tresize();\n\t\t\t\t\tactualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (cachedHeight !== actualHeight) {\n\t\t\t\tcachedHeight = actualHeight;\n\t\t\t\tvar evt = createEvent('autosize:resized');\n\t\t\t\ttry {\n\t\t\t\t\tta.dispatchEvent(evt);\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// Firefox will throw an error on dispatchEvent for a detached element\n\t\t\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=889376\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar pageResize = function pageResize() {\n\t\t\tif (ta.clientWidth !== clientWidth) {\n\t\t\t\tupdate();\n\t\t\t}\n\t\t};\n\n\t\tvar destroy = function (style) {\n\t\t\twindow.removeEventListener('resize', pageResize, false);\n\t\t\tta.removeEventListener('input', update, false);\n\t\t\tta.removeEventListener('keyup', update, false);\n\t\t\tta.removeEventListener('autosize:destroy', destroy, false);\n\t\t\tta.removeEventListener('autosize:update', update, false);\n\n\t\t\tObject.keys(style).forEach(function (key) {\n\t\t\t\tta.style[key] = style[key];\n\t\t\t});\n\n\t\t\tmap.delete(ta);\n\t\t}.bind(ta, {\n\t\t\theight: ta.style.height,\n\t\t\tresize: ta.style.resize,\n\t\t\toverflowY: ta.style.overflowY,\n\t\t\toverflowX: ta.style.overflowX,\n\t\t\twordWrap: ta.style.wordWrap\n\t\t});\n\n\t\tta.addEventListener('autosize:destroy', destroy, false);\n\n\t\t// IE9 does not fire onpropertychange or oninput for deletions,\n\t\t// so binding to onkeyup to catch most of those events.\n\t\t// There is no way that I know of to detect something like 'cut' in IE9.\n\t\tif ('onpropertychange' in ta && 'oninput' in ta) {\n\t\t\tta.addEventListener('keyup', update, false);\n\t\t}\n\n\t\twindow.addEventListener('resize', pageResize, false);\n\t\tta.addEventListener('input', update, false);\n\t\tta.addEventListener('autosize:update', update, false);\n\t\tta.style.overflowX = 'hidden';\n\t\tta.style.wordWrap = 'break-word';\n\n\t\tmap.set(ta, {\n\t\t\tdestroy: destroy,\n\t\t\tupdate: update\n\t\t});\n\n\t\tinit();\n\t}\n\n\tfunction destroy(ta) {\n\t\tvar methods = map.get(ta);\n\t\tif (methods) {\n\t\t\tmethods.destroy();\n\t\t}\n\t}\n\n\tfunction update(ta) {\n\t\tvar methods = map.get(ta);\n\t\tif (methods) {\n\t\t\tmethods.update();\n\t\t}\n\t}\n\n\tvar autosize = null;\n\n\t// Do nothing in Node.js environment and IE8 (or lower)\n\tif (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {\n\t\tautosize = function autosize(el) {\n\t\t\treturn el;\n\t\t};\n\t\tautosize.destroy = function (el) {\n\t\t\treturn el;\n\t\t};\n\t\tautosize.update = function (el) {\n\t\t\treturn el;\n\t\t};\n\t} else {\n\t\tautosize = function autosize(el, options) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], function (x) {\n\t\t\t\t\treturn assign(x, options);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t\tautosize.destroy = function (el) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], destroy);\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t\tautosize.update = function (el) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], update);\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t}\n\n\texports.default = autosize;\n\tmodule.exports = exports['default'];\n});","module.exports = {\n\ttrueFunc: function trueFunc(){\n\t\treturn true;\n\t},\n\tfalseFunc: function falseFunc(){\n\t\treturn false;\n\t}\n};","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t= l) {\n throw Error('Expected symbol but end of file reached.');\n }\n chr = str.charAt(pos);\n if (utils_1.identSpecialChars[chr]) {\n result += chr;\n }\n else if (utils_1.isHex(chr)) {\n var hex = chr;\n pos++;\n chr = str.charAt(pos);\n while (utils_1.isHex(chr)) {\n hex += chr;\n pos++;\n chr = str.charAt(pos);\n }\n if (chr === ' ') {\n pos++;\n chr = str.charAt(pos);\n }\n result += String.fromCharCode(parseInt(hex, 16));\n continue;\n }\n else {\n result += chr;\n }\n }\n else {\n return result;\n }\n pos++;\n chr = str.charAt(pos);\n }\n return result;\n }\n function skipWhitespace() {\n chr = str.charAt(pos);\n var result = false;\n while (chr === ' ' || chr === \"\\t\" || chr === \"\\n\" || chr === \"\\r\" || chr === \"\\f\") {\n result = true;\n pos++;\n chr = str.charAt(pos);\n }\n return result;\n }\n function parse() {\n var res = parseSelector();\n if (pos < l) {\n throw Error('Rule expected but \"' + str.charAt(pos) + '\" found.');\n }\n return res;\n }\n function parseSelector() {\n var selector = parseSingleSelector();\n if (!selector) {\n return null;\n }\n var res = selector;\n chr = str.charAt(pos);\n while (chr === ',') {\n pos++;\n skipWhitespace();\n if (res.type !== 'selectors') {\n res = {\n type: 'selectors',\n selectors: [selector]\n };\n }\n selector = parseSingleSelector();\n if (!selector) {\n throw Error('Rule expected after \",\".');\n }\n res.selectors.push(selector);\n }\n return res;\n }\n function parseSingleSelector() {\n skipWhitespace();\n var selector = {\n type: 'ruleSet'\n };\n var rule = parseRule();\n if (!rule) {\n return null;\n }\n var currentRule = selector;\n while (rule) {\n rule.type = 'rule';\n currentRule.rule = rule;\n currentRule = rule;\n skipWhitespace();\n chr = str.charAt(pos);\n if (pos >= l || chr === ',' || chr === ')') {\n break;\n }\n if (ruleNestingOperators[chr]) {\n var op = chr;\n pos++;\n skipWhitespace();\n rule = parseRule();\n if (!rule) {\n throw Error('Rule expected after \"' + op + '\".');\n }\n rule.nestingOperator = op;\n }\n else {\n rule = parseRule();\n if (rule) {\n rule.nestingOperator = null;\n }\n }\n }\n return selector;\n }\n // @ts-ignore no-overlap\n function parseRule() {\n var rule = null;\n while (pos < l) {\n chr = str.charAt(pos);\n if (chr === '*') {\n pos++;\n (rule = rule || {}).tagName = '*';\n }\n else if (utils_1.isIdentStart(chr) || chr === '\\\\') {\n (rule = rule || {}).tagName = getIdent();\n }\n else if (chr === '.') {\n pos++;\n rule = rule || {};\n (rule.classNames = rule.classNames || []).push(getIdent());\n }\n else if (chr === '#') {\n pos++;\n (rule = rule || {}).id = getIdent();\n }\n else if (chr === '[') {\n pos++;\n skipWhitespace();\n var attr = {\n name: getIdent()\n };\n skipWhitespace();\n // @ts-ignore\n if (chr === ']') {\n pos++;\n }\n else {\n var operator = '';\n if (attrEqualityMods[chr]) {\n operator = chr;\n pos++;\n chr = str.charAt(pos);\n }\n if (pos >= l) {\n throw Error('Expected \"=\" but end of file reached.');\n }\n if (chr !== '=') {\n throw Error('Expected \"=\" but \"' + chr + '\" found.');\n }\n attr.operator = operator + '=';\n pos++;\n skipWhitespace();\n var attrValue = '';\n attr.valueType = 'string';\n // @ts-ignore\n if (chr === '\"') {\n attrValue = getStr('\"', utils_1.doubleQuotesEscapeChars);\n // @ts-ignore\n }\n else if (chr === '\\'') {\n attrValue = getStr('\\'', utils_1.singleQuoteEscapeChars);\n // @ts-ignore\n }\n else if (substitutesEnabled && chr === '$') {\n pos++;\n attrValue = getIdent();\n attr.valueType = 'substitute';\n }\n else {\n while (pos < l) {\n if (chr === ']') {\n break;\n }\n attrValue += chr;\n pos++;\n chr = str.charAt(pos);\n }\n attrValue = attrValue.trim();\n }\n skipWhitespace();\n if (pos >= l) {\n throw Error('Expected \"]\" but end of file reached.');\n }\n if (chr !== ']') {\n throw Error('Expected \"]\" but \"' + chr + '\" found.');\n }\n pos++;\n attr.value = attrValue;\n }\n rule = rule || {};\n (rule.attrs = rule.attrs || []).push(attr);\n }\n else if (chr === ':') {\n pos++;\n var pseudoName = getIdent();\n var pseudo = {\n name: pseudoName\n };\n // @ts-ignore\n if (chr === '(') {\n pos++;\n var value = '';\n skipWhitespace();\n if (pseudos[pseudoName] === 'selector') {\n pseudo.valueType = 'selector';\n value = parseSelector();\n }\n else {\n pseudo.valueType = pseudos[pseudoName] || 'string';\n // @ts-ignore\n if (chr === '\"') {\n value = getStr('\"', utils_1.doubleQuotesEscapeChars);\n // @ts-ignore\n }\n else if (chr === '\\'') {\n value = getStr('\\'', utils_1.singleQuoteEscapeChars);\n // @ts-ignore\n }\n else if (substitutesEnabled && chr === '$') {\n pos++;\n value = getIdent();\n pseudo.valueType = 'substitute';\n }\n else {\n while (pos < l) {\n if (chr === ')') {\n break;\n }\n value += chr;\n pos++;\n chr = str.charAt(pos);\n }\n value = value.trim();\n }\n skipWhitespace();\n }\n if (pos >= l) {\n throw Error('Expected \")\" but end of file reached.');\n }\n if (chr !== ')') {\n throw Error('Expected \")\" but \"' + chr + '\" found.');\n }\n pos++;\n pseudo.value = value;\n }\n rule = rule || {};\n (rule.pseudos = rule.pseudos || []).push(pseudo);\n }\n else {\n break;\n }\n }\n return rule;\n }\n return parse();\n}\nexports.parseCssSelector = parseCssSelector;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = require(\"./utils\");\nfunction renderEntity(entity) {\n var res = '';\n switch (entity.type) {\n case 'ruleSet':\n var currentEntity = entity.rule;\n var parts = [];\n while (currentEntity) {\n if (currentEntity.nestingOperator) {\n parts.push(currentEntity.nestingOperator);\n }\n parts.push(renderEntity(currentEntity));\n currentEntity = currentEntity.rule;\n }\n res = parts.join(' ');\n break;\n case 'selectors':\n res = entity.selectors.map(renderEntity).join(', ');\n break;\n case 'rule':\n if (entity.tagName) {\n if (entity.tagName === '*') {\n res = '*';\n }\n else {\n res = utils_1.escapeIdentifier(entity.tagName);\n }\n }\n if (entity.id) {\n res += \"#\" + utils_1.escapeIdentifier(entity.id);\n }\n if (entity.classNames) {\n res += entity.classNames.map(function (cn) {\n return \".\" + (utils_1.escapeIdentifier(cn));\n }).join('');\n }\n if (entity.attrs) {\n res += entity.attrs.map(function (attr) {\n if ('operator' in attr) {\n if (attr.valueType === 'substitute') {\n return \"[\" + utils_1.escapeIdentifier(attr.name) + attr.operator + \"$\" + attr.value + \"]\";\n }\n else {\n return \"[\" + utils_1.escapeIdentifier(attr.name) + attr.operator + utils_1.escapeStr(attr.value) + \"]\";\n }\n }\n else {\n return \"[\" + utils_1.escapeIdentifier(attr.name) + \"]\";\n }\n }).join('');\n }\n if (entity.pseudos) {\n res += entity.pseudos.map(function (pseudo) {\n if (pseudo.valueType) {\n if (pseudo.valueType === 'selector') {\n return \":\" + utils_1.escapeIdentifier(pseudo.name) + \"(\" + renderEntity(pseudo.value) + \")\";\n }\n else if (pseudo.valueType === 'substitute') {\n return \":\" + utils_1.escapeIdentifier(pseudo.name) + \"($\" + pseudo.value + \")\";\n }\n else if (pseudo.valueType === 'numeric') {\n return \":\" + utils_1.escapeIdentifier(pseudo.name) + \"(\" + pseudo.value + \")\";\n }\n else {\n return (\":\" + utils_1.escapeIdentifier(pseudo.name) +\n \"(\" + utils_1.escapeIdentifier(pseudo.value) + \")\");\n }\n }\n else {\n return \":\" + utils_1.escapeIdentifier(pseudo.name);\n }\n }).join('');\n }\n break;\n default:\n throw Error('Unknown entity type: \"' + entity.type + '\".');\n }\n return res;\n}\nexports.renderEntity = renderEntity;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isIdentStart(c) {\n return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c === '-') || (c === '_');\n}\nexports.isIdentStart = isIdentStart;\nfunction isIdent(c) {\n return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c === '-' || c === '_';\n}\nexports.isIdent = isIdent;\nfunction isHex(c) {\n return (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') || (c >= '0' && c <= '9');\n}\nexports.isHex = isHex;\nfunction escapeIdentifier(s) {\n var len = s.length;\n var result = '';\n var i = 0;\n while (i < len) {\n var chr = s.charAt(i);\n if (exports.identSpecialChars[chr]) {\n result += '\\\\' + chr;\n }\n else {\n if (!(chr === '_' || chr === '-' ||\n (chr >= 'A' && chr <= 'Z') ||\n (chr >= 'a' && chr <= 'z') ||\n (i !== 0 && chr >= '0' && chr <= '9'))) {\n var charCode = chr.charCodeAt(0);\n if ((charCode & 0xF800) === 0xD800) {\n var extraCharCode = s.charCodeAt(i++);\n if ((charCode & 0xFC00) !== 0xD800 || (extraCharCode & 0xFC00) !== 0xDC00) {\n throw Error('UCS-2(decode): illegal sequence');\n }\n charCode = ((charCode & 0x3FF) << 10) + (extraCharCode & 0x3FF) + 0x10000;\n }\n result += '\\\\' + charCode.toString(16) + ' ';\n }\n else {\n result += chr;\n }\n }\n i++;\n }\n return result;\n}\nexports.escapeIdentifier = escapeIdentifier;\nfunction escapeStr(s) {\n var len = s.length;\n var result = '';\n var i = 0;\n var replacement;\n while (i < len) {\n var chr = s.charAt(i);\n if (chr === '\"') {\n chr = '\\\\\"';\n }\n else if (chr === '\\\\') {\n chr = '\\\\\\\\';\n }\n else if ((replacement = exports.strReplacementsRev[chr]) !== undefined) {\n chr = replacement;\n }\n result += chr;\n i++;\n }\n return \"\\\"\" + result + \"\\\"\";\n}\nexports.escapeStr = escapeStr;\nexports.identSpecialChars = {\n '!': true,\n '\"': true,\n '#': true,\n '$': true,\n '%': true,\n '&': true,\n '\\'': true,\n '(': true,\n ')': true,\n '*': true,\n '+': true,\n ',': true,\n '.': true,\n '/': true,\n ';': true,\n '<': true,\n '=': true,\n '>': true,\n '?': true,\n '@': true,\n '[': true,\n '\\\\': true,\n ']': true,\n '^': true,\n '`': true,\n '{': true,\n '|': true,\n '}': true,\n '~': true\n};\nexports.strReplacementsRev = {\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n '\\f': '\\\\f',\n '\\v': '\\\\v'\n};\nexports.singleQuoteEscapeChars = {\n n: '\\n',\n r: '\\r',\n t: '\\t',\n f: '\\f',\n '\\\\': '\\\\',\n '\\'': '\\''\n};\nexports.doubleQuotesEscapeChars = {\n n: '\\n',\n r: '\\r',\n t: '\\t',\n f: '\\f',\n '\\\\': '\\\\',\n '\"': '\"'\n};\n","var MILI = 'milliseconds'\n , SECONDS = 'seconds'\n , MINUTES = 'minutes'\n , HOURS = 'hours'\n , DAY = 'day'\n , WEEK = 'week'\n , MONTH = 'month'\n , YEAR = 'year'\n , DECADE = 'decade'\n , CENTURY = 'century';\n\nvar multiplierMilli = {\n 'milliseconds': 1,\n 'seconds': 1000,\n 'minutes': 60 * 1000,\n 'hours': 60 * 60 * 1000,\n 'day': 24 * 60 * 60 * 1000,\n 'week': 7 * 24 * 60 * 60 * 1000 \n}\n\nvar multiplierMonth = {\n 'month': 1,\n 'year': 12,\n 'decade': 10 * 12,\n 'century': 100 * 12\n}\n\nfunction daysOf(year) {\n return [31, daysInFeb(year), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n}\n\nfunction daysInFeb(year) {\n return (\n year % 4 === 0 \n && year % 100 !== 0\n ) || year % 400 === 0\n ? 29\n : 28\n}\n\nexport function add(d, num, unit) {\n d = new Date(d)\n\n switch (unit){\n case MILI:\n case SECONDS:\n case MINUTES:\n case HOURS:\n case DAY:\n case WEEK:\n return addMillis(d, num * multiplierMilli[unit])\n case MONTH:\n case YEAR:\n case DECADE:\n case CENTURY:\n return addMonths(d, num * multiplierMonth[unit])\n }\n\n throw new TypeError('Invalid units: \"' + unit + '\"')\n}\n\nfunction addMillis(d, num) {\n var nextDate = new Date(+(d) + num)\n\n return solveDST(d, nextDate)\n}\n\nfunction addMonths(d, num) {\n var year = d.getFullYear()\n , month = d.getMonth()\n , day = d.getDate()\n , totalMonths = year * 12 + month + num\n , nextYear = Math.trunc(totalMonths / 12)\n , nextMonth = totalMonths % 12\n , nextDay = Math.min(day, daysOf(nextYear)[nextMonth])\n\n var nextDate = new Date(d)\n nextDate.setFullYear(nextYear)\n\n // To avoid a bug when sets the Feb month\n // with a date > 28 or date > 29 (leap year)\n nextDate.setDate(1)\n\n nextDate.setMonth(nextMonth)\n nextDate.setDate(nextDay)\n\n return nextDate\n}\n\nfunction solveDST(currentDate, nextDate) {\n var currentOffset = currentDate.getTimezoneOffset()\n , nextOffset = nextDate.getTimezoneOffset()\n\n // if is DST, add the difference in minutes\n // else the difference is zero\n var diffMinutes = (nextOffset - currentOffset)\n\n return new Date(+(nextDate) + diffMinutes * multiplierMilli['minutes'])\n}\n\nexport function subtract(d, num, unit) {\n return add(d, -num, unit)\n}\n\nexport function startOf(d, unit, firstOfWeek) {\n d = new Date(d)\n\n switch (unit) {\n case CENTURY:\n case DECADE:\n case YEAR:\n d = month(d, 0);\n case MONTH:\n d = date(d, 1);\n case WEEK:\n case DAY:\n d = hours(d, 0);\n case HOURS:\n d = minutes(d, 0);\n case MINUTES:\n d = seconds(d, 0);\n case SECONDS:\n d = milliseconds(d, 0);\n }\n\n if (unit === DECADE)\n d = subtract(d, year(d) % 10, 'year')\n\n if (unit === CENTURY)\n d = subtract(d, year(d) % 100, 'year')\n\n if (unit === WEEK)\n d = weekday(d, 0, firstOfWeek);\n\n return d\n}\n\nexport function endOf(d, unit, firstOfWeek){\n d = new Date(d)\n d = startOf(d, unit, firstOfWeek)\n switch (unit) {\n case CENTURY:\n case DECADE:\n case YEAR:\n case MONTH:\n case WEEK:\n d = add(d, 1, unit)\n d = subtract(d, 1, DAY)\n d.setHours(23, 59, 59, 999)\n break;\n case DAY:\n d.setHours(23, 59, 59, 999)\n break;\n case HOURS:\n case MINUTES:\n case SECONDS:\n d = add(d, 1, unit)\n d = subtract(d, 1, MILI)\n }\n return d\n}\n\nexport var eq = createComparer(function(a, b){ return a === b })\nexport var neq = createComparer(function(a, b){ return a !== b })\nexport var gt = createComparer(function(a, b){ return a > b })\nexport var gte = createComparer(function(a, b){ return a >= b })\nexport var lt = createComparer(function(a, b){ return a < b })\nexport var lte = createComparer(function(a, b){ return a <= b })\n\nexport function min(){\n return new Date(Math.min.apply(Math, arguments))\n}\n\nexport function max(){\n return new Date(Math.max.apply(Math, arguments))\n}\n\nexport function inRange(day, min, max, unit){\n unit = unit || 'day'\n\n return (!min || gte(day, min, unit))\n && (!max || lte(day, max, unit))\n}\n\nexport var milliseconds = createAccessor('Milliseconds')\nexport var seconds = createAccessor('Seconds')\nexport var minutes = createAccessor('Minutes')\nexport var hours = createAccessor('Hours')\nexport var day = createAccessor('Day')\nexport var date = createAccessor('Date')\nexport var month = createAccessor('Month')\nexport var year = createAccessor('FullYear')\n\nexport function decade(d, val) {\n return val === undefined\n ? year(startOf(d, DECADE))\n : add(d, val + 10, YEAR);\n}\n\nexport function century(d, val) {\n return val === undefined\n ? year(startOf(d, CENTURY))\n : add(d, val + 100, YEAR);\n}\n\nexport function weekday(d, val, firstDay) {\n var w = (day(d) + 7 - (firstDay || 0) ) % 7;\n\n return val === undefined\n ? w\n : add(d, val - w, DAY);\n}\n\nexport function diff(date1, date2, unit, asFloat) {\n var dividend, divisor, result;\n\n switch (unit) {\n case MILI:\n case SECONDS:\n case MINUTES:\n case HOURS:\n case DAY:\n case WEEK:\n dividend = date2.getTime() - date1.getTime(); break;\n case MONTH:\n case YEAR:\n case DECADE:\n case CENTURY:\n dividend = (year(date2) - year(date1)) * 12 + month(date2) - month(date1); break;\n default:\n throw new TypeError('Invalid units: \"' + unit + '\"');\n }\n\n switch (unit) {\n case MILI:\n divisor = 1; break;\n case SECONDS:\n divisor = 1000; break;\n case MINUTES:\n divisor = 1000 * 60; break;\n case HOURS:\n divisor = 1000 * 60 * 60; break;\n case DAY:\n divisor = 1000 * 60 * 60 * 24; break;\n case WEEK:\n divisor = 1000 * 60 * 60 * 24 * 7; break;\n case MONTH:\n divisor = 1; break;\n case YEAR:\n divisor = 12; break;\n case DECADE:\n divisor = 120; break;\n case CENTURY:\n divisor = 1200; break;\n default:\n throw new TypeError('Invalid units: \"' + unit + '\"');\n }\n\n result = dividend / divisor;\n\n return asFloat ? result : Math.round(result);\n}\n\nfunction createAccessor(method){\n var hourLength = (function(method) { \n switch(method) {\n case 'Milliseconds':\n return 3600000;\n case 'Seconds':\n return 3600;\n case 'Minutes':\n return 60;\n case 'Hours':\n return 1;\n default:\n return null;\n }\n })(method);\n \n return function(d, val){\n if (val === undefined)\n return d['get' + method]()\n\n var dateOut = new Date(d)\n dateOut['set' + method](val)\n \n if(hourLength && dateOut['get'+method]() != val && (method === 'Hours' || val >=hourLength && (dateOut.getHours()-d.getHours() {\n const argMatch = arg.match(FN_ARG);\n return (argMatch && argMatch[1] || arg).trim();\n }) || [];\n}\n\n/**\n * @typedef { import('./index').ModuleDeclaration } ModuleDeclaration\n * @typedef { import('./index').ModuleDefinition } ModuleDefinition\n * @typedef { import('./index').InjectorContext } InjectorContext\n */\n\n/**\n * Create a new injector with the given modules.\n *\n * @param {ModuleDefinition[]} modules\n * @param {InjectorContext} [parent]\n */\nfunction Injector(modules, parent) {\n parent = parent || {\n get: function(name, strict) {\n currentlyResolving.push(name);\n\n if (strict === false) {\n return null;\n } else {\n throw error(`No provider for \"${ name }\"!`);\n }\n }\n };\n\n const currentlyResolving = [];\n const providers = this._providers = Object.create(parent._providers || null);\n const instances = this._instances = Object.create(null);\n\n const self = instances.injector = this;\n\n const error = function(msg) {\n const stack = currentlyResolving.join(' -> ');\n currentlyResolving.length = 0;\n return new Error(stack ? `${ msg } (Resolving: ${ stack })` : msg);\n };\n\n /**\n * Return a named service.\n *\n * @param {string} name\n * @param {boolean} [strict=true] if false, resolve missing services to null\n *\n * @return {any}\n */\n function get(name, strict) {\n if (!providers[name] && name.indexOf('.') !== -1) {\n const parts = name.split('.');\n let pivot = get(parts.shift());\n\n while (parts.length) {\n pivot = pivot[parts.shift()];\n }\n\n return pivot;\n }\n\n if (hasOwnProp(instances, name)) {\n return instances[name];\n }\n\n if (hasOwnProp(providers, name)) {\n if (currentlyResolving.indexOf(name) !== -1) {\n currentlyResolving.push(name);\n throw error('Cannot resolve circular dependency!');\n }\n\n currentlyResolving.push(name);\n instances[name] = providers[name][0](providers[name][1]);\n currentlyResolving.pop();\n\n return instances[name];\n }\n\n return parent.get(name, strict);\n }\n\n function fnDef(fn, locals) {\n\n if (typeof locals === 'undefined') {\n locals = {};\n }\n\n if (typeof fn !== 'function') {\n if (isArray(fn)) {\n fn = annotate(fn.slice());\n } else {\n throw error(`Cannot invoke \"${ fn }\". Expected a function!`);\n }\n }\n\n const inject = fn.$inject || parseAnnotations(fn);\n const dependencies = inject.map(dep => {\n if (hasOwnProp(locals, dep)) {\n return locals[dep];\n } else {\n return get(dep);\n }\n });\n\n return {\n fn: fn,\n dependencies: dependencies\n };\n }\n\n function instantiate(Type) {\n const {\n fn,\n dependencies\n } = fnDef(Type);\n\n // instantiate var args constructor\n const Constructor = Function.prototype.bind.apply(fn, [ null ].concat(dependencies));\n\n return new Constructor();\n }\n\n function invoke(func, context, locals) {\n const {\n fn,\n dependencies\n } = fnDef(func, locals);\n\n return fn.apply(context, dependencies);\n }\n\n /**\n * @param {Injector} childInjector\n *\n * @return {Function}\n */\n function createPrivateInjectorFactory(childInjector) {\n return annotate(key => childInjector.get(key));\n }\n\n /**\n * @param {ModuleDefinition[]} modules\n * @param {string[]} [forceNewInstances]\n *\n * @return {Injector}\n */\n function createChild(modules, forceNewInstances) {\n if (forceNewInstances && forceNewInstances.length) {\n const fromParentModule = Object.create(null);\n const matchedScopes = Object.create(null);\n\n const privateInjectorsCache = [];\n const privateChildInjectors = [];\n const privateChildFactories = [];\n\n let provider;\n let cacheIdx;\n let privateChildInjector;\n let privateChildInjectorFactory;\n\n for (let name in providers) {\n provider = providers[name];\n\n if (forceNewInstances.indexOf(name) !== -1) {\n if (provider[2] === 'private') {\n cacheIdx = privateInjectorsCache.indexOf(provider[3]);\n if (cacheIdx === -1) {\n privateChildInjector = provider[3].createChild([], forceNewInstances);\n privateChildInjectorFactory = createPrivateInjectorFactory(privateChildInjector);\n privateInjectorsCache.push(provider[3]);\n privateChildInjectors.push(privateChildInjector);\n privateChildFactories.push(privateChildInjectorFactory);\n fromParentModule[name] = [ privateChildInjectorFactory, name, 'private', privateChildInjector ];\n } else {\n fromParentModule[name] = [ privateChildFactories[cacheIdx], name, 'private', privateChildInjectors[cacheIdx] ];\n }\n } else {\n fromParentModule[name] = [ provider[2], provider[1] ];\n }\n matchedScopes[name] = true;\n }\n\n if ((provider[2] === 'factory' || provider[2] === 'type') && provider[1].$scope) {\n /* jshint -W083 */\n forceNewInstances.forEach(scope => {\n if (provider[1].$scope.indexOf(scope) !== -1) {\n fromParentModule[name] = [ provider[2], provider[1] ];\n matchedScopes[scope] = true;\n }\n });\n }\n }\n\n forceNewInstances.forEach(scope => {\n if (!matchedScopes[scope]) {\n throw new Error('No provider for \"' + scope + '\". Cannot use provider from the parent!');\n }\n });\n\n modules.unshift(fromParentModule);\n }\n\n return new Injector(modules, self);\n }\n\n const factoryMap = {\n factory: invoke,\n type: instantiate,\n value: function(value) {\n return value;\n }\n };\n\n /**\n * @param {ModuleDefinition} moduleDefinition\n * @param {Injector} injector\n */\n function createInitializer(moduleDefinition, injector) {\n\n const initializers = moduleDefinition.__init__ || [];\n\n return function() {\n initializers.forEach(initializer => {\n\n // eagerly resolve component (fn or string)\n if (typeof initializer === 'string') {\n injector.get(initializer);\n } else {\n injector.invoke(initializer);\n }\n });\n };\n }\n\n /**\n * @param {ModuleDefinition} moduleDefinition\n */\n function loadModule(moduleDefinition) {\n\n const moduleExports = moduleDefinition.__exports__;\n\n // private module\n if (moduleExports) {\n const nestedModules = moduleDefinition.__modules__;\n\n const clonedModule = Object.keys(moduleDefinition).reduce((clonedModule, key) => {\n\n if (key !== '__exports__' && key !== '__modules__' && key !== '__init__' && key !== '__depends__') {\n clonedModule[key] = moduleDefinition[key];\n }\n\n return clonedModule;\n }, Object.create(null));\n\n const childModules = (nestedModules || []).concat(clonedModule);\n\n const privateInjector = createChild(childModules);\n const getFromPrivateInjector = annotate(function(key) {\n return privateInjector.get(key);\n });\n\n moduleExports.forEach(function(key) {\n providers[key] = [ getFromPrivateInjector, key, 'private', privateInjector ];\n });\n\n // ensure child injector initializes\n const initializers = (moduleDefinition.__init__ || []).slice();\n\n initializers.unshift(function() {\n privateInjector.init();\n });\n\n moduleDefinition = Object.assign({}, moduleDefinition, {\n __init__: initializers\n });\n\n return createInitializer(moduleDefinition, privateInjector);\n }\n\n // normal module\n Object.keys(moduleDefinition).forEach(function(key) {\n\n if (key === '__init__' || key === '__depends__') {\n return;\n }\n\n if (moduleDefinition[key][2] === 'private') {\n providers[key] = moduleDefinition[key];\n return;\n }\n\n const type = moduleDefinition[key][0];\n const value = moduleDefinition[key][1];\n\n providers[key] = [ factoryMap[type], arrayUnwrap(type, value), type ];\n });\n\n return createInitializer(moduleDefinition, self);\n }\n\n /**\n * @param {ModuleDefinition[]} moduleDefinitions\n * @param {ModuleDefinition} moduleDefinition\n *\n * @return {ModuleDefinition[]}\n */\n function resolveDependencies(moduleDefinitions, moduleDefinition) {\n\n if (moduleDefinitions.indexOf(moduleDefinition) !== -1) {\n return moduleDefinitions;\n }\n\n moduleDefinitions = (moduleDefinition.__depends__ || []).reduce(resolveDependencies, moduleDefinitions);\n\n if (moduleDefinitions.indexOf(moduleDefinition) !== -1) {\n return moduleDefinitions;\n }\n\n return moduleDefinitions.concat(moduleDefinition);\n }\n\n /**\n * @param {ModuleDefinition[]} moduleDefinitions\n *\n * @return { () => void } initializerFn\n */\n function bootstrap(moduleDefinitions) {\n\n const initializers = moduleDefinitions\n .reduce(resolveDependencies, [])\n .map(loadModule);\n\n let initialized = false;\n\n return function() {\n\n if (initialized) {\n return;\n }\n\n initialized = true;\n\n initializers.forEach(initializer => initializer());\n };\n }\n\n // public API\n this.get = get;\n this.invoke = invoke;\n this.instantiate = instantiate;\n this.createChild = createChild;\n\n // setup\n this.init = bootstrap(modules);\n}\n\n\n// helpers ///////////////\n\nfunction arrayUnwrap(type, value) {\n if (type !== 'value' && isArray(value)) {\n value = annotate(value.slice());\n }\n\n return value;\n}\n\nexport { Injector, annotate, parseAnnotations };\n","'use strict';\n\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\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\n * THE SOFTWARE.\n *****************************************************************************/\nvar dijkstra = {\n single_source_shortest_paths: function(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = dijkstra.PriorityQueue.make();\n open.push(s, 0);\n\n var closest,\n u, v,\n cost_of_s_to_u,\n adjacent_nodes,\n cost_of_e,\n cost_of_s_to_u_plus_cost_of_e,\n cost_of_s_to_v,\n first_visit;\n while (!open.empty()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph[u] || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (v in adjacent_nodes) {\n if (adjacent_nodes.hasOwnProperty(v)) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = (typeof costs[v] === 'undefined');\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push(v, cost_of_s_to_u_plus_cost_of_e);\n predecessors[v] = u;\n }\n }\n }\n }\n\n if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(\n predecessors, d);\n },\n\n /**\n * A very naive priority queue implementation.\n */\n PriorityQueue: {\n make: function (opts) {\n var T = dijkstra.PriorityQueue,\n t = {},\n key;\n opts = opts || {};\n for (key in T) {\n if (T.hasOwnProperty(key)) {\n t[key] = T[key];\n }\n }\n t.queue = [];\n t.sorter = opts.sorter || T.default_sorter;\n return t;\n },\n\n default_sorter: function (a, b) {\n return a.cost - b.cost;\n },\n\n /**\n * Add a new item to the queue and ensure the highest priority element\n * is at the front of the queue.\n */\n push: function (value, cost) {\n var item = {value: value, cost: cost};\n this.queue.push(item);\n this.queue.sort(this.sorter);\n },\n\n /**\n * Return the highest priority element in the queue.\n */\n pop: function () {\n return this.queue.shift();\n },\n\n empty: function () {\n return this.queue.length === 0;\n }\n }\n};\n\n\n// node.js module exports\nif (typeof module !== 'undefined') {\n module.exports = dijkstra;\n}\n","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","import canUseDOM from './canUseDOM';\n\n/* https://github.com/component/raf */\nvar prev = new Date().getTime();\n\nfunction fallback(fn) {\n var curr = new Date().getTime();\n var ms = Math.max(0, 16 - (curr - prev));\n var handle = setTimeout(fn, ms);\n prev = curr;\n return handle;\n}\n\nvar vendors = ['', 'webkit', 'moz', 'o', 'ms'];\nvar cancelMethod = 'clearTimeout';\nvar rafImpl = fallback; // eslint-disable-next-line import/no-mutable-exports\n\nvar getKey = function getKey(vendor, k) {\n return vendor + (!vendor ? k : k[0].toUpperCase() + k.substr(1)) + \"AnimationFrame\";\n};\n\nif (canUseDOM) {\n vendors.some(function (vendor) {\n var rafMethod = getKey(vendor, 'request');\n\n if (rafMethod in window) {\n cancelMethod = getKey(vendor, 'cancel'); // @ts-ignore\n\n rafImpl = function rafImpl(cb) {\n return window[rafMethod](cb);\n };\n }\n\n return !!rafImpl;\n });\n}\n\nexport var cancel = function cancel(id) {\n // @ts-ignore\n if (typeof window[cancelMethod] === 'function') window[cancelMethod](id);\n};\nexport var request = rafImpl;","export default !!(typeof window !== 'undefined' && window.document && window.document.createElement);","var matchesImpl;\n/**\n * Checks if a given element matches a selector.\n * \n * @param node the element\n * @param selector the selector\n */\n\nexport default function matches(node, selector) {\n if (!matchesImpl) {\n var body = document.body;\n var nativeMatch = body.matches || body.matchesSelector || body.webkitMatchesSelector || body.mozMatchesSelector || body.msMatchesSelector;\n\n matchesImpl = function matchesImpl(n, s) {\n return nativeMatch.call(n, s);\n };\n }\n\n return matchesImpl(node, selector);\n}","import matches from './matches';\n/**\n * Returns the closest parent element that matches a given selector.\n * \n * @param node the reference element\n * @param selector the selector to match\n * @param stopAt stop traversing when this element is found\n */\n\nexport default function closest(node, selector, stopAt) {\n if (node.closest && !stopAt) node.closest(selector);\n var nextNode = node;\n\n do {\n if (matches(nextNode, selector)) return nextNode;\n nextNode = nextNode.parentElement;\n } while (nextNode && nextNode !== stopAt && nextNode.nodeType === document.ELEMENT_NODE);\n\n return null;\n}","/* eslint-disable no-bitwise, no-cond-assign */\n\n/**\n * Checks if an element contains another given element.\n * \n * @param context the context element\n * @param node the element to check\n */\nexport default function contains(context, node) {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n if (context.contains) return context.contains(node);\n if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);\n}","import isWindow from './isWindow';\nexport default function getscrollAccessor(offset) {\n var prop = offset === 'pageXOffset' ? 'scrollLeft' : 'scrollTop';\n\n function scrollAccessor(node, val) {\n var win = isWindow(node);\n\n if (val === undefined) {\n return win ? win[offset] : node[prop];\n }\n\n if (win) {\n win.scrollTo(win[offset], val);\n } else {\n node[prop] = val;\n }\n }\n\n return scrollAccessor;\n}","import getWindow from './isWindow';\nimport offset from './offset';\n/**\n * Returns the height of a given element.\n * \n * @param node the element\n * @param client whether to use `clientHeight` if possible\n */\n\nexport default function height(node, client) {\n var win = getWindow(node);\n return win ? win.innerHeight : client ? node.clientHeight : offset(node).height;\n}","import isDocument from './isDocument';\nexport default function isWindow(node) {\n if ('window' in node && node.window === node) return node;\n if (isDocument(node)) return node.defaultView || false;\n return false;\n}","export default function isDocument(element) {\n return 'nodeType' in element && element.nodeType === document.DOCUMENT_NODE;\n}","/* eslint-disable no-return-assign */\nimport canUseDOM from './canUseDOM';\nexport var optionsSupported = false;\nexport var onceSupported = false;\n\ntry {\n var options = {\n get passive() {\n return optionsSupported = true;\n },\n\n get once() {\n // eslint-disable-next-line no-multi-assign\n return onceSupported = optionsSupported = true;\n }\n\n };\n\n if (canUseDOM) {\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, true);\n }\n} catch (e) {\n /* */\n}\n\n/**\n * An `addEventListener` ponyfill, supports the `once` option\n * \n * @param node the element\n * @param eventName the event name\n * @param handle the handler\n * @param options event options\n */\nfunction addEventListener(node, eventName, handler, options) {\n if (options && typeof options !== 'boolean' && !onceSupported) {\n var once = options.once,\n capture = options.capture;\n var wrappedHandler = handler;\n\n if (!onceSupported && once) {\n wrappedHandler = handler.__once || function onceHandler(event) {\n this.removeEventListener(eventName, onceHandler, capture);\n handler.call(this, event);\n };\n\n handler.__once = wrappedHandler;\n }\n\n node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);\n }\n\n node.addEventListener(eventName, handler, options);\n}\n\nexport default addEventListener;","/**\n * A `removeEventListener` ponyfill\n * \n * @param node the element\n * @param eventName the event name\n * @param handle the handler\n * @param options event options\n */\nfunction removeEventListener(node, eventName, handler, options) {\n var capture = options && typeof options !== 'boolean' ? options.capture : options;\n node.removeEventListener(eventName, handler, capture);\n\n if (handler.__once) {\n node.removeEventListener(eventName, handler.__once, capture);\n }\n}\n\nexport default removeEventListener;","import addEventListener from './addEventListener';\nimport removeEventListener from './removeEventListener';\n\nfunction listen(node, eventName, handler, options) {\n addEventListener(node, eventName, handler, options);\n return function () {\n removeEventListener(node, eventName, handler, options);\n };\n}\n\nexport default listen;","import contains from './contains';\nimport ownerDocument from './ownerDocument';\nimport scrollLeft from './scrollLeft';\nimport scrollTop from './scrollTop';\n/**\n * Returns the offset of a given element, including top and left positions, width and height.\n * \n * @param node the element\n */\n\nexport default function offset(node) {\n var doc = ownerDocument(node);\n var box = {\n top: 0,\n left: 0,\n height: 0,\n width: 0\n };\n var docElem = doc && doc.documentElement; // Make sure it's not a disconnected DOM node\n\n if (!docElem || !contains(docElem, node)) return box;\n if (node.getBoundingClientRect !== undefined) box = node.getBoundingClientRect();\n box = {\n top: box.top + scrollTop(docElem) - (docElem.clientTop || 0),\n left: box.left + scrollLeft(docElem) - (docElem.clientLeft || 0),\n width: box.width,\n height: box.height\n };\n return box;\n}","/**\n * Returns the owner document of a given element.\n * \n * @param node the element\n */\nexport default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","var rUpper = /([A-Z])/g;\nexport default function hyphenate(string) {\n return string.replace(rUpper, '-$1').toLowerCase();\n}","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js\n */\nimport hyphenate from './hyphenate';\nvar msPattern = /^ms-/;\nexport default function hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}","var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;\nexport default function isTransform(value) {\n return !!(value && supportedTransforms.test(value));\n}","import getComputedStyle from './getComputedStyle';\nimport hyphenate from './hyphenateStyle';\nimport isTransform from './isTransform';\n\nfunction style(node, property) {\n var css = '';\n var transforms = '';\n\n if (typeof property === 'string') {\n return node.style.getPropertyValue(hyphenate(property)) || getComputedStyle(node).getPropertyValue(hyphenate(property));\n }\n\n Object.keys(property).forEach(function (key) {\n var value = property[key];\n\n if (!value && value !== 0) {\n node.style.removeProperty(hyphenate(key));\n } else if (isTransform(key)) {\n transforms += key + \"(\" + value + \") \";\n } else {\n css += hyphenate(key) + \": \" + value + \";\";\n }\n });\n\n if (transforms) {\n css += \"transform: \" + transforms + \";\";\n }\n\n node.style.cssText += \";\" + css;\n}\n\nexport default style;","import ownerWindow from './ownerWindow';\n/**\n * Returns one or all computed style properties of an element.\n * \n * @param node the element\n * @param psuedoElement the style property\n */\n\nexport default function getComputedStyle(node, psuedoElement) {\n return ownerWindow(node).getComputedStyle(node, psuedoElement);\n}","import ownerDocument from './ownerDocument';\n/**\n * Returns the owner window of a given element.\n * \n * @param node the element\n */\n\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc && doc.defaultView || window;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport css from './css';\nimport getOffset from './offset';\nimport getOffsetParent from './offsetParent';\nimport scrollLeft from './scrollLeft';\nimport scrollTop from './scrollTop';\n\nvar nodeName = function nodeName(node) {\n return node.nodeName && node.nodeName.toLowerCase();\n};\n/**\n * Returns the relative position of a given element.\n * \n * @param node the element\n * @param offsetParent the offset parent\n */\n\n\nexport default function position(node, offsetParent) {\n var parentOffset = {\n top: 0,\n left: 0\n };\n var offset; // Fixed elements are offset from window (parentOffset = {top:0, left: 0},\n // because it is its only offset parent\n\n if (css(node, 'position') === 'fixed') {\n offset = node.getBoundingClientRect();\n } else {\n var parent = offsetParent || getOffsetParent(node);\n offset = getOffset(node);\n if (nodeName(parent) !== 'html') parentOffset = getOffset(parent);\n var borderTop = String(css(parent, 'borderTopWidth') || 0);\n parentOffset.top += parseInt(borderTop, 10) - scrollTop(parent) || 0;\n var borderLeft = String(css(parent, 'borderLeftWidth') || 0);\n parentOffset.left += parseInt(borderLeft, 10) - scrollLeft(parent) || 0;\n }\n\n var marginTop = String(css(node, 'marginTop') || 0);\n var marginLeft = String(css(node, 'marginLeft') || 0); // Subtract parent offsets and node margins\n\n return _extends({}, offset, {\n top: offset.top - parentOffset.top - (parseInt(marginTop, 10) || 0),\n left: offset.left - parentOffset.left - (parseInt(marginLeft, 10) || 0)\n });\n}","import css from './css';\nimport ownerDocument from './ownerDocument';\n\nvar isHTMLElement = function isHTMLElement(e) {\n return !!e && 'offsetParent' in e;\n};\n\nexport default function offsetParent(node) {\n var doc = ownerDocument(node);\n var parent = node && node.offsetParent;\n\n while (isHTMLElement(parent) && parent.nodeName !== 'HTML' && css(parent, 'position') === 'static') {\n parent = parent.offsetParent;\n }\n\n return parent || doc.documentElement;\n}","var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);\n/**\n * Runs `querySelectorAll` on a given element.\n * \n * @param element the element\n * @param selector the selector\n */\n\nexport default function qsa(element, selector) {\n return toArray(element.querySelectorAll(selector));\n}","function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}","import getScrollAccessor from './getScrollAccessor';\n/**\n * Gets or sets the scroll left position of a given element.\n * \n * @param node the element\n * @param val the position to set\n */\n\nexport default getScrollAccessor('pageXOffset');","import getScrollAccessor from './getScrollAccessor';\n/**\n * Gets or sets the scroll top position of a given element.\n * \n * @param node the element\n * @param val the position to set\n */\n\nexport default getScrollAccessor('pageYOffset');","import canUseDOM from './canUseDOM';\nvar size;\nexport default function scrollbarSize(recalc) {\n if (!size && size !== 0 || recalc) {\n if (canUseDOM) {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.width = '50px';\n scrollDiv.style.height = '50px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n size = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n }\n }\n\n return size;\n}","import getWindow from './isWindow';\nimport offset from './offset';\n/**\n * Returns the width of a given element.\n * \n * @param node the element\n * @param client whether to use `clientWidth` if possible\n */\n\nexport default function getWidth(node, client) {\n var win = getWindow(node);\n return win ? win.innerWidth : client ? node.clientWidth : offset(node).width;\n}","/*! @license DOMPurify 2.5.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.8/LICENSE */\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 = typeof globalThis !== 'undefined' ? globalThis : global || self, global.DOMPurify = factory());\n})(this, (function () { 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n }\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n }\n function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n function _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n }\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n }\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n }\n function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n }\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n }\n function _nonIterableSpread() {\n 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 }\n\n var hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n var _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n if (!construct) {\n construct = function construct(Func, args) {\n return _construct(Func, _toConsumableArray(args));\n };\n }\n var arrayForEach = unapply(Array.prototype.forEach);\n var arrayPop = unapply(Array.prototype.pop);\n var arrayPush = unapply(Array.prototype.push);\n var stringToLowerCase = unapply(String.prototype.toLowerCase);\n var stringToString = unapply(String.prototype.toString);\n var stringMatch = unapply(String.prototype.match);\n var stringReplace = unapply(String.prototype.replace);\n var stringIndexOf = unapply(String.prototype.indexOf);\n var stringTrim = unapply(String.prototype.trim);\n var regExpTest = unapply(RegExp.prototype.test);\n var typeErrorCreate = unconstruct(TypeError);\n function unapply(func) {\n return function (thisArg) {\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 return apply(func, thisArg, args);\n };\n }\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return construct(func, args);\n };\n }\n\n /* Add properties to a lookup table */\n function addToSet(set, array, transformCaseFunc) {\n var _transformCaseFunc;\n transformCaseFunc = (_transformCaseFunc = transformCaseFunc) !== null && _transformCaseFunc !== void 0 ? _transformCaseFunc : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n var l = array.length;\n while (l--) {\n var element = array[l];\n if (typeof element === 'string') {\n var lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n }\n\n /* Shallow clone an object */\n function clone(object) {\n var newObject = create(null);\n var property;\n for (property in object) {\n if (apply(hasOwnProperty, object, [property]) === true) {\n newObject[property] = object[property];\n }\n }\n return newObject;\n }\n\n /* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n return fallbackValue;\n }\n\n var html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n var svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n var mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n var text = freeze(['#text']);\n\n var html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n var svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n var mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n var MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n var ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n var TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n var DOCTYPE_NAME = seal(/^html$/i);\n var CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html) {\n return html;\n },\n createScriptURL: function createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n function createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '2.5.8';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n var originalDocument = window.document;\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n HTMLFormElement = window.HTMLFormElement,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n var ElementPrototype = Element.prototype;\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment,\n getElementsByTagName = _document.getElementsByTagName;\n var importNode = originalDocument.importNode;\n var documentMode = {};\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n var hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined && documentMode !== 9;\n var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n ERB_EXPR$1 = ERB_EXPR,\n TMPLIT_EXPR$1 = TMPLIT_EXPR,\n DATA_ATTR$1 = DATA_ATTR,\n ARIA_ATTR$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$1 = ATTR_WHITESPACE,\n CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;\n var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));\n\n /* Allowed attribute names */\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n var FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n var FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n var ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n var ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n var ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n var SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n var SAFE_FOR_XML = true;\n\n /* Decide if document with ... should be returned */\n var WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n var SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n var FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n var RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n var RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n var RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n var SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n var SANITIZE_NAMED_PROPS = false;\n var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n var KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n var IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n var USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n var FORBID_CONTENTS = null;\n var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n var NAMESPACE = HTML_NAMESPACE;\n var IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n var ALLOWED_NAMESPACES = null;\n var DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\n /* Parsing of strict XHTML documents */\n var PARSER_MEDIA_TYPE;\n var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n var transformCaseFunc;\n\n /* Keep a reference to config to pass to hooks */\n var CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n var isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || _typeof(cfg) !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS),\n // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n var HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n var ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n var ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n var _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n try {\n node.outerHTML = emptyHTML;\n } catch (_) {\n node.remove();\n }\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n var _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc;\n var leadingWhitespace;\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '' + dirty + '';\n }\n var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n var body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null, false);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n var _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n var _isNode = function _isNode(object) {\n return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n arrayForEach(hooks[entryPoint], function (hook) {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check if tagname contains Unicode */\n if (regExpTest(/[\\u0080-\\uFFFF]/, currentNode.nodeName)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n var tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Mitigate a problem with templates inside select */\n if (tagName === 'select' && regExpTest(/